diff --git a/.changelog/1ea17cbdd9904aeeba1e12165e505902.json b/.changelog/1ea17cbdd9904aeeba1e12165e505902.json new file mode 100644 index 00000000000..9a8bbf5ae34 --- /dev/null +++ b/.changelog/1ea17cbdd9904aeeba1e12165e505902.json @@ -0,0 +1,8 @@ +{ + "id": "1ea17cbd-d990-4aee-ba1e-12165e505902", + "type": "documentation", + "description": "Removing multi-session as it isn't supported for pools", + "modules": [ + "service/workspaces" + ] +} \ No newline at end of file diff --git a/.changelog/5bda3012aaef4d0187d688eae3c596cf.json b/.changelog/5bda3012aaef4d0187d688eae3c596cf.json new file mode 100644 index 00000000000..5aefbdb1025 --- /dev/null +++ b/.changelog/5bda3012aaef4d0187d688eae3c596cf.json @@ -0,0 +1,8 @@ +{ + "id": "5bda3012-aaef-4d01-87d6-88eae3c596cf", + "type": "documentation", + "description": "Doc only update for changes to deletion API.", + "modules": [ + "service/elasticache" + ] +} \ No newline at end of file diff --git a/.changelog/61735058385a47a9992c5499839b8e9d.json b/.changelog/61735058385a47a9992c5499839b8e9d.json new file mode 100644 index 00000000000..9417d19d826 --- /dev/null +++ b/.changelog/61735058385a47a9992c5499839b8e9d.json @@ -0,0 +1,8 @@ +{ + "id": "61735058-385a-47a9-992c-5499839b8e9d", + "type": "feature", + "description": "This release adds new capabilities to the AMAZON.QnAIntent: Custom prompting, Guardrails integration and ExactResponse support for Bedrock Knowledge Base.", + "modules": [ + "service/lexmodelsv2" + ] +} \ No newline at end of file diff --git a/.changelog/649352b20f564794a5dd733c7cd022c0.json b/.changelog/649352b20f564794a5dd733c7cd022c0.json new file mode 100644 index 00000000000..db8002d005d --- /dev/null +++ b/.changelog/649352b20f564794a5dd733c7cd022c0.json @@ -0,0 +1,8 @@ +{ + "id": "649352b2-0f56-4794-a5dd-733c7cd022c0", + "type": "feature", + "description": "AWS CodePipeline V2 type pipelines now support stage level conditions to enable development teams to safely release changes that meet quality and compliance requirements.", + "modules": [ + "service/codepipeline" + ] +} \ No newline at end of file diff --git a/.changelog/723daf7106ff4892b691d1f927f30e51.json b/.changelog/723daf7106ff4892b691d1f927f30e51.json new file mode 100644 index 00000000000..0a13685501d --- /dev/null +++ b/.changelog/723daf7106ff4892b691d1f927f30e51.json @@ -0,0 +1,8 @@ +{ + "id": "723daf71-06ff-4892-b691-d1f927f30e51", + "type": "feature", + "description": "Added support for Red Hat Enterprise Linux 8 on Amazon AppStream 2.0", + "modules": [ + "service/appstream" + ] +} \ No newline at end of file diff --git a/.changelog/7ba606f0afb04e989335c5c7b8f19c1b.json b/.changelog/7ba606f0afb04e989335c5c7b8f19c1b.json new file mode 100644 index 00000000000..2fca34a39ca --- /dev/null +++ b/.changelog/7ba606f0afb04e989335c5c7b8f19c1b.json @@ -0,0 +1,8 @@ +{ + "id": "7ba606f0-afb0-4e98-9335-c5c7b8f19c1b", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/elasticloadbalancing" + ] +} \ No newline at end of file diff --git a/.changelog/83dcf3480276460aa27a3efa375c730c.json b/.changelog/83dcf3480276460aa27a3efa375c730c.json new file mode 100644 index 00000000000..74fd6d08819 --- /dev/null +++ b/.changelog/83dcf3480276460aa27a3efa375c730c.json @@ -0,0 +1,8 @@ +{ + "id": "83dcf348-0276-460a-a27a-3efa375c730c", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/eventbridge" + ] +} \ No newline at end of file diff --git a/.changelog/aaa7fd2e0c634e59a521e125169862ce.json b/.changelog/aaa7fd2e0c634e59a521e125169862ce.json new file mode 100644 index 00000000000..18f5d0ee923 --- /dev/null +++ b/.changelog/aaa7fd2e0c634e59a521e125169862ce.json @@ -0,0 +1,8 @@ +{ + "id": "aaa7fd2e-0c63-4e59-a521-e125169862ce", + "type": "feature", + "description": "IAM RolesAnywhere now supports custom role session name on the CreateSession. This release adds the acceptRoleSessionName option to a profile to control whether a role session name will be accepted in a session request with a given profile.", + "modules": [ + "service/rolesanywhere" + ] +} \ No newline at end of file diff --git a/.changelog/b6e28c9e0a55477e8c7bf79f8dba5656.json b/.changelog/b6e28c9e0a55477e8c7bf79f8dba5656.json new file mode 100644 index 00000000000..9b967c15e39 --- /dev/null +++ b/.changelog/b6e28c9e0a55477e8c7bf79f8dba5656.json @@ -0,0 +1,8 @@ +{ + "id": "b6e28c9e-0a55-477e-8c7b-f79f8dba5656", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/cloudwatchlogs" + ] +} \ No newline at end of file diff --git a/.changelog/f1406c43a55b4e9183deac2427f8c892.json b/.changelog/f1406c43a55b4e9183deac2427f8c892.json new file mode 100644 index 00000000000..bbb3efb1d09 --- /dev/null +++ b/.changelog/f1406c43a55b4e9183deac2427f8c892.json @@ -0,0 +1,8 @@ +{ + "id": "f1406c43-a55b-4e91-83de-ac2427f8c892", + "type": "feature", + "description": "This release adds Network Service Update, through which customers will be able to update their instantiated networks to a new network package. See the documentation for limitations. The release also enhances the Get network operation API to return parameter overrides used during the operation.", + "modules": [ + "service/tnb" + ] +} \ No newline at end of file diff --git a/.changelog/f517b20ebfbb4dd08fd5c448deea587d.json b/.changelog/f517b20ebfbb4dd08fd5c448deea587d.json new file mode 100644 index 00000000000..3e4c8b0d71e --- /dev/null +++ b/.changelog/f517b20ebfbb4dd08fd5c448deea587d.json @@ -0,0 +1,8 @@ +{ + "id": "f517b20e-bfbb-4dd0-8fd5-c448deea587d", + "type": "feature", + "description": "Increase the length limit for VPCZoneIdentifier from 2047 to 5000", + "modules": [ + "service/autoscaling" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 3f3560854f8..505e79ec5c4 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.53" +const goModuleVersion = "1.14.10" diff --git a/service/appstream/api_op_CreateFleet.go b/service/appstream/api_op_CreateFleet.go index 1364ac5e943..b8bc7acf4a9 100644 --- a/service/appstream/api_op_CreateFleet.go +++ b/service/appstream/api_op_CreateFleet.go @@ -136,7 +136,7 @@ type CreateFleetInput struct { // connected to their previous session. Otherwise, they are connected to a new // session with a new streaming instance. // - // Specify a value between 60 and 360000. + // Specify a value between 60 and 36000. DisconnectTimeoutInSeconds *int32 // The fleet name to display. @@ -183,7 +183,7 @@ type CreateFleetInput struct { // IdleDisconnectTimeoutInSeconds elapses, they are disconnected. // // To prevent users from being disconnected due to inactivity, specify a value of - // 0. Otherwise, specify a value between 60 and 3600. The default value is 0. + // 0. Otherwise, specify a value between 60 and 36000. The default value is 0. // // If you enable this feature, we recommend that you specify a value that // corresponds exactly to a whole number of minutes (for example, 60, 120, and diff --git a/service/appstream/api_op_UpdateFleet.go b/service/appstream/api_op_UpdateFleet.go index 4f3b331b017..3269a3849d6 100644 --- a/service/appstream/api_op_UpdateFleet.go +++ b/service/appstream/api_op_UpdateFleet.go @@ -70,7 +70,7 @@ type UpdateFleetInput struct { // connected to their previous session. Otherwise, they are connected to a new // session with a new streaming instance. // - // Specify a value between 60 and 360000. + // Specify a value between 60 and 36000. DisconnectTimeoutInSeconds *int32 // The fleet name to display. @@ -107,7 +107,7 @@ type UpdateFleetInput struct { // IdleDisconnectTimeoutInSeconds elapses, they are disconnected. // // To prevent users from being disconnected due to inactivity, specify a value of - // 0. Otherwise, specify a value between 60 and 3600. The default value is 0. + // 0. Otherwise, specify a value between 60 and 36000. The default value is 0. // // If you enable this feature, we recommend that you specify a value that // corresponds exactly to a whole number of minutes (for example, 60, 120, and diff --git a/service/appstream/types/enums.go b/service/appstream/types/enums.go index e06b9df557b..b827cc18fe7 100644 --- a/service/appstream/types/enums.go +++ b/service/appstream/types/enums.go @@ -549,6 +549,7 @@ const ( PlatformTypeWindowsServer2019 PlatformType = "WINDOWS_SERVER_2019" PlatformTypeWindowsServer2022 PlatformType = "WINDOWS_SERVER_2022" PlatformTypeAmazonLinux2 PlatformType = "AMAZON_LINUX2" + PlatformTypeRhel8 PlatformType = "RHEL8" ) // Values returns all known values for PlatformType. Note that this can be @@ -562,6 +563,7 @@ func (PlatformType) Values() []PlatformType { "WINDOWS_SERVER_2019", "WINDOWS_SERVER_2022", "AMAZON_LINUX2", + "RHEL8", } } diff --git a/service/appstream/types/types.go b/service/appstream/types/types.go index a22e6987090..c0f3f24d11a 100644 --- a/service/appstream/types/types.go +++ b/service/appstream/types/types.go @@ -623,7 +623,7 @@ type Fleet struct { // connected to their previous session. Otherwise, they are connected to a new // session with a new streaming instance. // - // Specify a value between 60 and 360000. + // Specify a value between 60 and 36000. DisconnectTimeoutInSeconds *int32 // The fleet name to display. @@ -673,7 +673,7 @@ type Fleet struct { // IdleDisconnectTimeoutInSeconds elapses, they are disconnected. // // To prevent users from being disconnected due to inactivity, specify a value of - // 0. Otherwise, specify a value between 60 and 3600. The default value is 0. + // 0. Otherwise, specify a value between 60 and 36000. The default value is 0. // // If you enable this feature, we recommend that you specify a value that // corresponds exactly to a whole number of minutes (for example, 60, 120, and @@ -1362,9 +1362,6 @@ type UserSetting struct { // This defaults to 20,971,520 (20 MB) when unspecified and the permission is // ENABLED . This can't be specified when the permission is DISABLED . // - // This can only be specified for AlwaysOn and OnDemand fleets. The attribute is - // not supported on Elastic fleets. - // // The value can be between 1 and 20,971,520 (20 MB). MaximumLength *int32 diff --git a/service/codepipeline/api_op_ListRuleExecutions.go b/service/codepipeline/api_op_ListRuleExecutions.go new file mode 100644 index 00000000000..a893d2d65d3 --- /dev/null +++ b/service/codepipeline/api_op_ListRuleExecutions.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codepipeline + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codepipeline/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the rule executions that have occurred in a pipeline configured for +// conditions with rules. +func (c *Client) ListRuleExecutions(ctx context.Context, params *ListRuleExecutionsInput, optFns ...func(*Options)) (*ListRuleExecutionsOutput, error) { + if params == nil { + params = &ListRuleExecutionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRuleExecutions", params, optFns, c.addOperationListRuleExecutionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRuleExecutionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRuleExecutionsInput struct { + + // The name of the pipeline for which you want to get execution summary + // information. + // + // This member is required. + PipelineName *string + + // Input information used to filter rule execution history. + Filter *types.RuleExecutionFilter + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. Pipeline + // history is limited to the most recent 12 months, based on pipeline execution + // start times. Default value is 100. + MaxResults *int32 + + // The token that was returned from the previous ListRuleExecutions call, which + // can be used to return the next set of rule executions in the list. + NextToken *string + + noSmithyDocumentSerde +} + +type ListRuleExecutionsOutput struct { + + // A token that can be used in the next ListRuleExecutions call. To view all items + // in the list, continue to call this operation with each subsequent token until no + // more nextToken values are returned. + NextToken *string + + // Details about the output for listing rule executions. + RuleExecutionDetails []types.RuleExecutionDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRuleExecutionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRuleExecutions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRuleExecutions{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRuleExecutions"); 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 = addComputePayloadSHA256(stack); 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 = addOpListRuleExecutionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListRuleExecutions(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 +} + +// ListRuleExecutionsPaginatorOptions is the paginator options for +// ListRuleExecutions +type ListRuleExecutionsPaginatorOptions 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. Pipeline + // history is limited to the most recent 12 months, based on pipeline execution + // start times. 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 +} + +// ListRuleExecutionsPaginator is a paginator for ListRuleExecutions +type ListRuleExecutionsPaginator struct { + options ListRuleExecutionsPaginatorOptions + client ListRuleExecutionsAPIClient + params *ListRuleExecutionsInput + nextToken *string + firstPage bool +} + +// NewListRuleExecutionsPaginator returns a new ListRuleExecutionsPaginator +func NewListRuleExecutionsPaginator(client ListRuleExecutionsAPIClient, params *ListRuleExecutionsInput, optFns ...func(*ListRuleExecutionsPaginatorOptions)) *ListRuleExecutionsPaginator { + if params == nil { + params = &ListRuleExecutionsInput{} + } + + options := ListRuleExecutionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListRuleExecutionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListRuleExecutionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListRuleExecutions page. +func (p *ListRuleExecutionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListRuleExecutionsOutput, 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.ListRuleExecutions(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 +} + +// ListRuleExecutionsAPIClient is a client that implements the ListRuleExecutions +// operation. +type ListRuleExecutionsAPIClient interface { + ListRuleExecutions(context.Context, *ListRuleExecutionsInput, ...func(*Options)) (*ListRuleExecutionsOutput, error) +} + +var _ ListRuleExecutionsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListRuleExecutions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRuleExecutions", + } +} diff --git a/service/codepipeline/api_op_ListRuleTypes.go b/service/codepipeline/api_op_ListRuleTypes.go new file mode 100644 index 00000000000..18bff77fbba --- /dev/null +++ b/service/codepipeline/api_op_ListRuleTypes.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codepipeline + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codepipeline/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the rules for the condition. +func (c *Client) ListRuleTypes(ctx context.Context, params *ListRuleTypesInput, optFns ...func(*Options)) (*ListRuleTypesOutput, error) { + if params == nil { + params = &ListRuleTypesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListRuleTypes", params, optFns, c.addOperationListRuleTypesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListRuleTypesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListRuleTypesInput struct { + + // The rule Region to filter on. + RegionFilter *string + + // The rule owner to filter on. + RuleOwnerFilter types.RuleOwner + + noSmithyDocumentSerde +} + +type ListRuleTypesOutput struct { + + // Lists the rules that are configured for the condition. + // + // This member is required. + RuleTypes []types.RuleType + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListRuleTypesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListRuleTypes{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListRuleTypes{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListRuleTypes"); 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 = addComputePayloadSHA256(stack); 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_opListRuleTypes(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_opListRuleTypes(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListRuleTypes", + } +} diff --git a/service/codepipeline/api_op_OverrideStageCondition.go b/service/codepipeline/api_op_OverrideStageCondition.go new file mode 100644 index 00000000000..edc6c3be331 --- /dev/null +++ b/service/codepipeline/api_op_OverrideStageCondition.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codepipeline + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/codepipeline/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Used to override a stage condition. +func (c *Client) OverrideStageCondition(ctx context.Context, params *OverrideStageConditionInput, optFns ...func(*Options)) (*OverrideStageConditionOutput, error) { + if params == nil { + params = &OverrideStageConditionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "OverrideStageCondition", params, optFns, c.addOperationOverrideStageConditionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*OverrideStageConditionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type OverrideStageConditionInput struct { + + // The type of condition to override for the stage, such as entry conditions, + // failure conditions, or success conditions. + // + // This member is required. + ConditionType types.ConditionType + + // The ID of the pipeline execution for the override. + // + // This member is required. + PipelineExecutionId *string + + // The name of the pipeline with the stage that will override the condition. + // + // This member is required. + PipelineName *string + + // The name of the stage for the override. + // + // This member is required. + StageName *string + + noSmithyDocumentSerde +} + +type OverrideStageConditionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationOverrideStageConditionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpOverrideStageCondition{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpOverrideStageCondition{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "OverrideStageCondition"); 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 = addComputePayloadSHA256(stack); 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 = addOpOverrideStageConditionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOverrideStageCondition(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_opOverrideStageCondition(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "OverrideStageCondition", + } +} diff --git a/service/codepipeline/deserializers.go b/service/codepipeline/deserializers.go index c43db6cd957..85d67882716 100644 --- a/service/codepipeline/deserializers.go +++ b/service/codepipeline/deserializers.go @@ -2210,14 +2210,14 @@ func awsAwsjson11_deserializeOpErrorListPipelines(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpListTagsForResource struct { +type awsAwsjson11_deserializeOpListRuleExecutions struct { } -func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson11_deserializeOpListRuleExecutions) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRuleExecutions) 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) @@ -2231,9 +2231,9 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRuleExecutions(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListRuleExecutionsOutput{} out.Result = output var buff [1024]byte @@ -2253,7 +2253,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListRuleExecutionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2267,7 +2267,7 @@ func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRuleExecutions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2304,14 +2304,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InvalidArnException", errorCode): - return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("PipelineExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineExecutionNotFoundException(response, errorBody) + + case strings.EqualFold("PipelineNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -2326,14 +2326,14 @@ func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpListWebhooks struct { +type awsAwsjson11_deserializeOpListRuleTypes struct { } -func (*awsAwsjson11_deserializeOpListWebhooks) ID() string { +func (*awsAwsjson11_deserializeOpListRuleTypes) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpListWebhooks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListRuleTypes) 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) @@ -2347,9 +2347,9 @@ func (m *awsAwsjson11_deserializeOpListWebhooks) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListWebhooks(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListRuleTypes(response, &metadata) } - output := &ListWebhooksOutput{} + output := &ListRuleTypesOutput{} out.Result = output var buff [1024]byte @@ -2369,7 +2369,7 @@ func (m *awsAwsjson11_deserializeOpListWebhooks) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentListWebhooksOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListRuleTypesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2383,7 +2383,7 @@ func (m *awsAwsjson11_deserializeOpListWebhooks) HandleDeserialize(ctx context.C return out, metadata, err } -func awsAwsjson11_deserializeOpErrorListWebhooks(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListRuleTypes(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2436,14 +2436,14 @@ func awsAwsjson11_deserializeOpErrorListWebhooks(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpPollForJobs struct { +type awsAwsjson11_deserializeOpListTagsForResource struct { } -func (*awsAwsjson11_deserializeOpPollForJobs) ID() string { +func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPollForJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2457,9 +2457,9 @@ func (m *awsAwsjson11_deserializeOpPollForJobs) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPollForJobs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PollForJobsOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -2479,7 +2479,7 @@ func (m *awsAwsjson11_deserializeOpPollForJobs) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPollForJobsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2493,7 +2493,7 @@ func (m *awsAwsjson11_deserializeOpPollForJobs) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPollForJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2530,8 +2530,14 @@ func awsAwsjson11_deserializeOpErrorPollForJobs(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ActionTypeNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) + case strings.EqualFold("InvalidArnException", errorCode): + return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) + + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -2546,14 +2552,14 @@ func awsAwsjson11_deserializeOpErrorPollForJobs(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpPollForThirdPartyJobs struct { +type awsAwsjson11_deserializeOpListWebhooks struct { } -func (*awsAwsjson11_deserializeOpPollForThirdPartyJobs) ID() string { +func (*awsAwsjson11_deserializeOpListWebhooks) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPollForThirdPartyJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpListWebhooks) 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) @@ -2567,9 +2573,9 @@ func (m *awsAwsjson11_deserializeOpPollForThirdPartyJobs) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorListWebhooks(response, &metadata) } - output := &PollForThirdPartyJobsOutput{} + output := &ListWebhooksOutput{} out.Result = output var buff [1024]byte @@ -2589,7 +2595,7 @@ func (m *awsAwsjson11_deserializeOpPollForThirdPartyJobs) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPollForThirdPartyJobsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentListWebhooksOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2603,7 +2609,7 @@ func (m *awsAwsjson11_deserializeOpPollForThirdPartyJobs) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorListWebhooks(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2640,8 +2646,8 @@ func awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response *smithyhttp.R errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ActionTypeNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -2656,14 +2662,14 @@ func awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpPutActionRevision struct { +type awsAwsjson11_deserializeOpOverrideStageCondition struct { } -func (*awsAwsjson11_deserializeOpPutActionRevision) ID() string { +func (*awsAwsjson11_deserializeOpOverrideStageCondition) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutActionRevision) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpOverrideStageCondition) 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) @@ -2677,43 +2683,21 @@ func (m *awsAwsjson11_deserializeOpPutActionRevision) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutActionRevision(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorOverrideStageCondition(response, &metadata) } - output := &PutActionRevisionOutput{} + output := &OverrideStageConditionOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentPutActionRevisionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutActionRevision(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorOverrideStageCondition(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2750,8 +2734,17 @@ func awsAwsjson11_deserializeOpErrorPutActionRevision(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ActionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorActionNotFoundException(response, errorBody) + case strings.EqualFold("ConcurrentPipelineExecutionsLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededException(response, errorBody) + + case strings.EqualFold("ConditionNotOverridableException", errorCode): + return awsAwsjson11_deserializeErrorConditionNotOverridableException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("NotLatestPipelineExecutionException", errorCode): + return awsAwsjson11_deserializeErrorNotLatestPipelineExecutionException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) @@ -2772,14 +2765,14 @@ func awsAwsjson11_deserializeOpErrorPutActionRevision(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpPutApprovalResult struct { +type awsAwsjson11_deserializeOpPollForJobs struct { } -func (*awsAwsjson11_deserializeOpPutApprovalResult) ID() string { +func (*awsAwsjson11_deserializeOpPollForJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutApprovalResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPollForJobs) 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) @@ -2793,9 +2786,9 @@ func (m *awsAwsjson11_deserializeOpPutApprovalResult) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutApprovalResult(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPollForJobs(response, &metadata) } - output := &PutApprovalResultOutput{} + output := &PollForJobsOutput{} out.Result = output var buff [1024]byte @@ -2815,7 +2808,7 @@ func (m *awsAwsjson11_deserializeOpPutApprovalResult) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentPutApprovalResultOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPollForJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2829,7 +2822,7 @@ func (m *awsAwsjson11_deserializeOpPutApprovalResult) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutApprovalResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPollForJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2866,20 +2859,8 @@ func awsAwsjson11_deserializeOpErrorPutApprovalResult(response *smithyhttp.Respo errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ActionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorActionNotFoundException(response, errorBody) - - case strings.EqualFold("ApprovalAlreadyCompletedException", errorCode): - return awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response, errorBody) - - case strings.EqualFold("InvalidApprovalTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidApprovalTokenException(response, errorBody) - - case strings.EqualFold("PipelineNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) - - case strings.EqualFold("StageNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) + case strings.EqualFold("ActionTypeNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -2894,14 +2875,14 @@ func awsAwsjson11_deserializeOpErrorPutApprovalResult(response *smithyhttp.Respo } } -type awsAwsjson11_deserializeOpPutJobFailureResult struct { +type awsAwsjson11_deserializeOpPollForThirdPartyJobs struct { } -func (*awsAwsjson11_deserializeOpPutJobFailureResult) ID() string { +func (*awsAwsjson11_deserializeOpPollForThirdPartyJobs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutJobFailureResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPollForThirdPartyJobs) 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) @@ -2915,21 +2896,43 @@ func (m *awsAwsjson11_deserializeOpPutJobFailureResult) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutJobFailureResult(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response, &metadata) } - output := &PutJobFailureResultOutput{} + output := &PollForThirdPartyJobsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPollForThirdPartyJobsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutJobFailureResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPollForThirdPartyJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2966,11 +2969,8 @@ func awsAwsjson11_deserializeOpErrorPutJobFailureResult(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InvalidJobStateException", errorCode): - return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) - - case strings.EqualFold("JobNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) + case strings.EqualFold("ActionTypeNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -2985,14 +2985,14 @@ func awsAwsjson11_deserializeOpErrorPutJobFailureResult(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpPutJobSuccessResult struct { +type awsAwsjson11_deserializeOpPutActionRevision struct { } -func (*awsAwsjson11_deserializeOpPutJobSuccessResult) ID() string { +func (*awsAwsjson11_deserializeOpPutActionRevision) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutJobSuccessResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutActionRevision) 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) @@ -3006,21 +3006,43 @@ func (m *awsAwsjson11_deserializeOpPutJobSuccessResult) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutActionRevision(response, &metadata) } - output := &PutJobSuccessResultOutput{} + output := &PutActionRevisionOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutActionRevisionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutActionRevision(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3057,14 +3079,17 @@ func awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InvalidJobStateException", errorCode): - return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) + case strings.EqualFold("ActionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorActionNotFoundException(response, errorBody) - case strings.EqualFold("JobNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) + case strings.EqualFold("ConcurrentPipelineExecutionsLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededException(response, errorBody) - case strings.EqualFold("OutputVariablesSizeExceededException", errorCode): - return awsAwsjson11_deserializeErrorOutputVariablesSizeExceededException(response, errorBody) + case strings.EqualFold("PipelineNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) + + case strings.EqualFold("StageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -3079,14 +3104,14 @@ func awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult struct { +type awsAwsjson11_deserializeOpPutApprovalResult struct { } -func (*awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult) ID() string { +func (*awsAwsjson11_deserializeOpPutApprovalResult) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutApprovalResult) 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) @@ -3100,21 +3125,43 @@ func (m *awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutApprovalResult(response, &metadata) } - output := &PutThirdPartyJobFailureResultOutput{} + output := &PutApprovalResultOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentPutApprovalResultOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutApprovalResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3151,14 +3198,20 @@ func awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response *smit errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InvalidClientTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) + case strings.EqualFold("ActionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorActionNotFoundException(response, errorBody) - case strings.EqualFold("InvalidJobStateException", errorCode): - return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) + case strings.EqualFold("ApprovalAlreadyCompletedException", errorCode): + return awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response, errorBody) - case strings.EqualFold("JobNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) + case strings.EqualFold("InvalidApprovalTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidApprovalTokenException(response, errorBody) + + case strings.EqualFold("PipelineNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) + + case strings.EqualFold("StageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -3173,14 +3226,14 @@ func awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response *smit } } -type awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult struct { +type awsAwsjson11_deserializeOpPutJobFailureResult struct { } -func (*awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) ID() string { +func (*awsAwsjson11_deserializeOpPutJobFailureResult) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutJobFailureResult) 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) @@ -3194,9 +3247,9 @@ func (m *awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutJobFailureResult(response, &metadata) } - output := &PutThirdPartyJobSuccessResultOutput{} + output := &PutJobFailureResultOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3208,7 +3261,7 @@ func (m *awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) HandleDeserial return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutJobFailureResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3245,9 +3298,6 @@ func awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response *smit errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InvalidClientTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) - case strings.EqualFold("InvalidJobStateException", errorCode): return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) @@ -3267,14 +3317,14 @@ func awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response *smit } } -type awsAwsjson11_deserializeOpPutWebhook struct { +type awsAwsjson11_deserializeOpPutJobSuccessResult struct { } -func (*awsAwsjson11_deserializeOpPutWebhook) ID() string { +func (*awsAwsjson11_deserializeOpPutJobSuccessResult) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpPutWebhook) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutJobSuccessResult) 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) @@ -3288,43 +3338,21 @@ func (m *awsAwsjson11_deserializeOpPutWebhook) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutWebhook(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response, &metadata) } - output := &PutWebhookOutput{} + output := &PutJobSuccessResultOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentPutWebhookOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorPutWebhook(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutJobSuccessResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3361,26 +3389,14 @@ func awsAwsjson11_deserializeOpErrorPutWebhook(response *smithyhttp.Response, me errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidTagsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) - - case strings.EqualFold("InvalidWebhookAuthenticationParametersException", errorCode): - return awsAwsjson11_deserializeErrorInvalidWebhookAuthenticationParametersException(response, errorBody) - - case strings.EqualFold("InvalidWebhookFilterPatternException", errorCode): - return awsAwsjson11_deserializeErrorInvalidWebhookFilterPatternException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("InvalidJobStateException", errorCode): + return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) - case strings.EqualFold("PipelineNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) + case strings.EqualFold("JobNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("OutputVariablesSizeExceededException", errorCode): + return awsAwsjson11_deserializeErrorOutputVariablesSizeExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -3395,14 +3411,14 @@ func awsAwsjson11_deserializeOpErrorPutWebhook(response *smithyhttp.Response, me } } -type awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty struct { +type awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult struct { } -func (*awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty) ID() string { +func (*awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutThirdPartyJobFailureResult) 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) @@ -3416,43 +3432,21 @@ func (m *awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response, &metadata) } - output := &RegisterWebhookWithThirdPartyOutput{} + output := &PutThirdPartyJobFailureResultOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentRegisterWebhookWithThirdPartyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutThirdPartyJobFailureResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3489,12 +3483,18 @@ func awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response *smit errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) + + case strings.EqualFold("InvalidJobStateException", errorCode): + return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) + + case strings.EqualFold("JobNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - case strings.EqualFold("WebhookNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorWebhookNotFoundException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3505,14 +3505,14 @@ func awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response *smit } } -type awsAwsjson11_deserializeOpRetryStageExecution struct { +type awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult struct { } -func (*awsAwsjson11_deserializeOpRetryStageExecution) ID() string { +func (*awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRetryStageExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutThirdPartyJobSuccessResult) 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) @@ -3526,43 +3526,21 @@ func (m *awsAwsjson11_deserializeOpRetryStageExecution) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRetryStageExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response, &metadata) } - output := &RetryStageExecutionOutput{} + output := &PutThirdPartyJobSuccessResultOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentRetryStageExecutionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), } - return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRetryStageExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutThirdPartyJobSuccessResult(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3599,20 +3577,14 @@ func awsAwsjson11_deserializeOpErrorRetryStageExecution(response *smithyhttp.Res errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("NotLatestPipelineExecutionException", errorCode): - return awsAwsjson11_deserializeErrorNotLatestPipelineExecutionException(response, errorBody) - - case strings.EqualFold("PipelineNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) + case strings.EqualFold("InvalidClientTokenException", errorCode): + return awsAwsjson11_deserializeErrorInvalidClientTokenException(response, errorBody) - case strings.EqualFold("StageNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) + case strings.EqualFold("InvalidJobStateException", errorCode): + return awsAwsjson11_deserializeErrorInvalidJobStateException(response, errorBody) - case strings.EqualFold("StageNotRetryableException", errorCode): - return awsAwsjson11_deserializeErrorStageNotRetryableException(response, errorBody) + case strings.EqualFold("JobNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorJobNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -3627,14 +3599,14 @@ func awsAwsjson11_deserializeOpErrorRetryStageExecution(response *smithyhttp.Res } } -type awsAwsjson11_deserializeOpRollbackStage struct { +type awsAwsjson11_deserializeOpPutWebhook struct { } -func (*awsAwsjson11_deserializeOpRollbackStage) ID() string { +func (*awsAwsjson11_deserializeOpPutWebhook) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpRollbackStage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpPutWebhook) 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) @@ -3648,9 +3620,9 @@ func (m *awsAwsjson11_deserializeOpRollbackStage) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRollbackStage(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorPutWebhook(response, &metadata) } - output := &RollbackStageOutput{} + output := &PutWebhookOutput{} out.Result = output var buff [1024]byte @@ -3670,7 +3642,7 @@ func (m *awsAwsjson11_deserializeOpRollbackStage) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentRollbackStageOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentPutWebhookOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3684,7 +3656,7 @@ func (m *awsAwsjson11_deserializeOpRollbackStage) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorRollbackStage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorPutWebhook(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3721,23 +3693,26 @@ func awsAwsjson11_deserializeOpErrorRollbackStage(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("PipelineExecutionNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorPipelineExecutionNotFoundException(response, errorBody) + case strings.EqualFold("InvalidTagsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) - case strings.EqualFold("PipelineExecutionOutdatedException", errorCode): - return awsAwsjson11_deserializeErrorPipelineExecutionOutdatedException(response, errorBody) + case strings.EqualFold("InvalidWebhookAuthenticationParametersException", errorCode): + return awsAwsjson11_deserializeErrorInvalidWebhookAuthenticationParametersException(response, errorBody) + + case strings.EqualFold("InvalidWebhookFilterPatternException", errorCode): + return awsAwsjson11_deserializeErrorInvalidWebhookFilterPatternException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) - case strings.EqualFold("StageNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) - - case strings.EqualFold("UnableToRollbackStageException", errorCode): - return awsAwsjson11_deserializeErrorUnableToRollbackStageException(response, errorBody) + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -3752,14 +3727,14 @@ func awsAwsjson11_deserializeOpErrorRollbackStage(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpStartPipelineExecution struct { +type awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty struct { } -func (*awsAwsjson11_deserializeOpStartPipelineExecution) ID() string { +func (*awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStartPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRegisterWebhookWithThirdParty) 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) @@ -3773,9 +3748,9 @@ func (m *awsAwsjson11_deserializeOpStartPipelineExecution) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStartPipelineExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response, &metadata) } - output := &StartPipelineExecutionOutput{} + output := &RegisterWebhookWithThirdPartyOutput{} out.Result = output var buff [1024]byte @@ -3795,7 +3770,7 @@ func (m *awsAwsjson11_deserializeOpStartPipelineExecution) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStartPipelineExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRegisterWebhookWithThirdPartyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3809,7 +3784,7 @@ func (m *awsAwsjson11_deserializeOpStartPipelineExecution) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStartPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRegisterWebhookWithThirdParty(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3846,18 +3821,12 @@ func awsAwsjson11_deserializeOpErrorStartPipelineExecution(response *smithyhttp. errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentPipelineExecutionsLimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("PipelineNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + case strings.EqualFold("WebhookNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorWebhookNotFoundException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3868,14 +3837,14 @@ func awsAwsjson11_deserializeOpErrorStartPipelineExecution(response *smithyhttp. } } -type awsAwsjson11_deserializeOpStopPipelineExecution struct { +type awsAwsjson11_deserializeOpRetryStageExecution struct { } -func (*awsAwsjson11_deserializeOpStopPipelineExecution) ID() string { +func (*awsAwsjson11_deserializeOpRetryStageExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRetryStageExecution) 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) @@ -3889,9 +3858,9 @@ func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopPipelineExecution(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRetryStageExecution(response, &metadata) } - output := &StopPipelineExecutionOutput{} + output := &RetryStageExecutionOutput{} out.Result = output var buff [1024]byte @@ -3911,7 +3880,7 @@ func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRetryStageExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3925,7 +3894,7 @@ func (m *awsAwsjson11_deserializeOpStopPipelineExecution) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRetryStageExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3962,18 +3931,24 @@ func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.R errorMessage = bodyInfo.Message } switch { + case strings.EqualFold("ConcurrentPipelineExecutionsLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("DuplicatedStopRequestException", errorCode): - return awsAwsjson11_deserializeErrorDuplicatedStopRequestException(response, errorBody) - - case strings.EqualFold("PipelineExecutionNotStoppableException", errorCode): - return awsAwsjson11_deserializeErrorPipelineExecutionNotStoppableException(response, errorBody) + case strings.EqualFold("NotLatestPipelineExecutionException", errorCode): + return awsAwsjson11_deserializeErrorNotLatestPipelineExecutionException(response, errorBody) case strings.EqualFold("PipelineNotFoundException", errorCode): return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) + case strings.EqualFold("StageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) + + case strings.EqualFold("StageNotRetryableException", errorCode): + return awsAwsjson11_deserializeErrorStageNotRetryableException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -3987,14 +3962,14 @@ func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpTagResource struct { +type awsAwsjson11_deserializeOpRollbackStage struct { } -func (*awsAwsjson11_deserializeOpTagResource) ID() string { +func (*awsAwsjson11_deserializeOpRollbackStage) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpRollbackStage) 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) @@ -4008,9 +3983,9 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorRollbackStage(response, &metadata) } - output := &TagResourceOutput{} + output := &RollbackStageOutput{} out.Result = output var buff [1024]byte @@ -4030,7 +4005,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentRollbackStageOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4044,7 +4019,7 @@ func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorRollbackStage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4081,20 +4056,23 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InvalidArnException", errorCode): - return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) + case strings.EqualFold("PipelineExecutionNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineExecutionNotFoundException(response, errorBody) - case strings.EqualFold("InvalidTagsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) + case strings.EqualFold("PipelineExecutionOutdatedException", errorCode): + return awsAwsjson11_deserializeErrorPipelineExecutionOutdatedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("PipelineNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) - case strings.EqualFold("TooManyTagsException", errorCode): - return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) + case strings.EqualFold("StageNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorStageNotFoundException(response, errorBody) + + case strings.EqualFold("UnableToRollbackStageException", errorCode): + return awsAwsjson11_deserializeErrorUnableToRollbackStageException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -4109,14 +4087,14 @@ func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson11_deserializeOpUntagResource struct { +type awsAwsjson11_deserializeOpStartPipelineExecution struct { } -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { +func (*awsAwsjson11_deserializeOpStartPipelineExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStartPipelineExecution) 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) @@ -4130,9 +4108,9 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStartPipelineExecution(response, &metadata) } - output := &UntagResourceOutput{} + output := &StartPipelineExecutionOutput{} out.Result = output var buff [1024]byte @@ -4152,7 +4130,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentStartPipelineExecutionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4166,7 +4144,7 @@ func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStartPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4203,17 +4181,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidArnException", errorCode): - return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) + case strings.EqualFold("ConcurrentPipelineExecutionsLimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededException(response, errorBody) - case strings.EqualFold("InvalidTagsException", errorCode): - return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("PipelineNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -4228,14 +4203,14 @@ func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson11_deserializeOpUpdateActionType struct { +type awsAwsjson11_deserializeOpStopPipelineExecution struct { } -func (*awsAwsjson11_deserializeOpUpdateActionType) ID() string { +func (*awsAwsjson11_deserializeOpStopPipelineExecution) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateActionType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpStopPipelineExecution) 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) @@ -4249,21 +4224,43 @@ func (m *awsAwsjson11_deserializeOpUpdateActionType) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateActionType(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorStopPipelineExecution(response, &metadata) } - output := &UpdateActionTypeOutput{} + output := &StopPipelineExecutionOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentStopPipelineExecutionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateActionType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorStopPipelineExecution(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4300,11 +4297,17 @@ func awsAwsjson11_deserializeOpErrorUpdateActionType(response *smithyhttp.Respon errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("ActionTypeNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("RequestFailedException", errorCode): - return awsAwsjson11_deserializeErrorRequestFailedException(response, errorBody) + case strings.EqualFold("DuplicatedStopRequestException", errorCode): + return awsAwsjson11_deserializeErrorDuplicatedStopRequestException(response, errorBody) + + case strings.EqualFold("PipelineExecutionNotStoppableException", errorCode): + return awsAwsjson11_deserializeErrorPipelineExecutionNotStoppableException(response, errorBody) + + case strings.EqualFold("PipelineNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorPipelineNotFoundException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -4319,14 +4322,14 @@ func awsAwsjson11_deserializeOpErrorUpdateActionType(response *smithyhttp.Respon } } -type awsAwsjson11_deserializeOpUpdatePipeline struct { +type awsAwsjson11_deserializeOpTagResource struct { } -func (*awsAwsjson11_deserializeOpUpdatePipeline) ID() string { +func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdatePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4340,9 +4343,9 @@ func (m *awsAwsjson11_deserializeOpUpdatePipeline) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePipeline(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdatePipelineOutput{} + output := &TagResourceOutput{} out.Result = output var buff [1024]byte @@ -4362,7 +4365,7 @@ func (m *awsAwsjson11_deserializeOpUpdatePipeline) HandleDeserialize(ctx context return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdatePipelineOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4376,7 +4379,7 @@ func (m *awsAwsjson11_deserializeOpUpdatePipeline) HandleDeserialize(ctx context return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdatePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4413,20 +4416,20 @@ func awsAwsjson11_deserializeOpErrorUpdatePipeline(response *smithyhttp.Response errorMessage = bodyInfo.Message } switch { - case strings.EqualFold("InvalidActionDeclarationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidActionDeclarationException(response, errorBody) + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - case strings.EqualFold("InvalidBlockerDeclarationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidBlockerDeclarationException(response, errorBody) + case strings.EqualFold("InvalidArnException", errorCode): + return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) - case strings.EqualFold("InvalidStageDeclarationException", errorCode): - return awsAwsjson11_deserializeErrorInvalidStageDeclarationException(response, errorBody) + case strings.EqualFold("InvalidTagsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) - case strings.EqualFold("InvalidStructureException", errorCode): - return awsAwsjson11_deserializeErrorInvalidStructureException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("TooManyTagsException", errorCode): + return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson11_deserializeErrorValidationException(response, errorBody) @@ -4441,11 +4444,36 @@ func awsAwsjson11_deserializeOpErrorUpdatePipeline(response *smithyhttp.Response } } -func awsAwsjson11_deserializeErrorActionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpUntagResource struct { +} + +func (*awsAwsjson11_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4456,12 +4484,10 @@ func awsAwsjson11_deserializeErrorActionNotFoundException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ActionNotFoundException{} - err := awsAwsjson11_deserializeDocumentActionNotFoundException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4469,22 +4495,32 @@ func awsAwsjson11_deserializeErrorActionNotFoundException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorActionTypeNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -4494,9 +4530,93 @@ func awsAwsjson11_deserializeErrorActionTypeNotFoundException(response *smithyht return err } - output := &types.ActionTypeNotFoundException{} - err := awsAwsjson11_deserializeDocumentActionTypeNotFoundException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ConcurrentModificationException", errorCode): + return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) + + case strings.EqualFold("InvalidArnException", errorCode): + return awsAwsjson11_deserializeErrorInvalidArnException(response, errorBody) + + case strings.EqualFold("InvalidTagsException", errorCode): + return awsAwsjson11_deserializeErrorInvalidTagsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateActionType struct { +} + +func (*awsAwsjson11_deserializeOpUpdateActionType) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateActionType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateActionType(response, &metadata) + } + output := &UpdateActionTypeOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateActionType(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4508,14 +4628,62 @@ func awsAwsjson11_deserializeErrorActionTypeNotFoundException(response *smithyht } errorBody.Seek(0, io.SeekStart) - return output + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("ActionTypeNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorActionTypeNotFoundException(response, errorBody) + + case strings.EqualFold("RequestFailedException", errorCode): + return awsAwsjson11_deserializeErrorRequestFailedException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +type awsAwsjson11_deserializeOpUpdatePipeline struct { +} + +func (*awsAwsjson11_deserializeOpUpdatePipeline) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdatePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorUpdatePipeline(response, &metadata) + } + output := &UpdatePipelineOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4526,12 +4694,10 @@ func awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response *sm Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ApprovalAlreadyCompletedException{} - err := awsAwsjson11_deserializeDocumentApprovalAlreadyCompletedException(&output, shape) - + err = awsAwsjson11_deserializeOpDocumentUpdatePipelineOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4539,22 +4705,32 @@ func awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response *sm Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeOpErrorUpdatePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -4564,24 +4740,43 @@ func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smit return err } - output := &types.ConcurrentModificationException{} - err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("InvalidActionDeclarationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidActionDeclarationException(response, errorBody) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + case strings.EqualFold("InvalidBlockerDeclarationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidBlockerDeclarationException(response, errorBody) + + case strings.EqualFold("InvalidStageDeclarationException", errorCode): + return awsAwsjson11_deserializeErrorInvalidStageDeclarationException(response, errorBody) + + case strings.EqualFold("InvalidStructureException", errorCode): + return awsAwsjson11_deserializeErrorInvalidStructureException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err - } + return genericError - errorBody.Seek(0, io.SeekStart) - return output + } } -func awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorActionNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4599,8 +4794,8 @@ func awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededExcep return err } - output := &types.ConcurrentPipelineExecutionsLimitExceededException{} - err := awsAwsjson11_deserializeDocumentConcurrentPipelineExecutionsLimitExceededException(&output, shape) + output := &types.ActionNotFoundException{} + err := awsAwsjson11_deserializeDocumentActionNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4616,7 +4811,7 @@ func awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededExcep return output } -func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorActionTypeNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4634,8 +4829,8 @@ func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Respons return err } - output := &types.ConflictException{} - err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) + output := &types.ActionTypeNotFoundException{} + err := awsAwsjson11_deserializeDocumentActionTypeNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer @@ -4651,7 +4846,7 @@ func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Respons return output } -func awsAwsjson11_deserializeErrorDuplicatedStopRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson11_deserializeErrorApprovalAlreadyCompletedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -4669,7 +4864,182 @@ func awsAwsjson11_deserializeErrorDuplicatedStopRequestException(response *smith return err } - output := &types.DuplicatedStopRequestException{} + output := &types.ApprovalAlreadyCompletedException{} + err := awsAwsjson11_deserializeDocumentApprovalAlreadyCompletedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConcurrentModificationException{} + err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorConcurrentPipelineExecutionsLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConcurrentPipelineExecutionsLimitExceededException{} + err := awsAwsjson11_deserializeDocumentConcurrentPipelineExecutionsLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorConditionNotOverridableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConditionNotOverridableException{} + err := awsAwsjson11_deserializeDocumentConditionNotOverridableException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConflictException{} + err := awsAwsjson11_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson11_deserializeErrorDuplicatedStopRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.DuplicatedStopRequestException{} err := awsAwsjson11_deserializeDocumentDuplicatedStopRequestException(&output, shape) if err != nil { @@ -8234,6 +8604,42 @@ func awsAwsjson11_deserializeDocumentAWSSessionCredentials(v **types.AWSSessionC return nil } +func awsAwsjson11_deserializeDocumentBeforeEntryConditions(v **types.BeforeEntryConditions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BeforeEntryConditions + if *v == nil { + sv = &types.BeforeEntryConditions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "conditions": + if err := awsAwsjson11_deserializeDocumentConditionList(&sv.Conditions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentBlockerDeclaration(v **types.BlockerDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8363,7 +8769,7 @@ func awsAwsjson11_deserializeDocumentConcurrentPipelineExecutionsLimitExceededEx return nil } -func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsAwsjson11_deserializeDocumentCondition(v **types.Condition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8376,22 +8782,27 @@ func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.Condition if *v == nil { - sv = &types.ConflictException{} + sv = &types.Condition{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "result": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) + return fmt.Errorf("expected Result to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Result = types.Result(jtv) + } + + case "rules": + if err := awsAwsjson11_deserializeDocumentRuleDeclarationList(&sv.Rules, value); err != nil { + return err } default: @@ -8403,7 +8814,7 @@ func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsAwsjson11_deserializeDocumentDuplicatedStopRequestException(v **types.DuplicatedStopRequestException, value interface{}) error { +func awsAwsjson11_deserializeDocumentConditionExecution(v **types.ConditionExecution, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8416,22 +8827,47 @@ func awsAwsjson11_deserializeDocumentDuplicatedStopRequestException(v **types.Du return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DuplicatedStopRequestException + var sv *types.ConditionExecution if *v == nil { - sv = &types.DuplicatedStopRequestException{} + sv = &types.ConditionExecution{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "lastStatusChange": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastStatusChange = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) + return fmt.Errorf("expected ConditionExecutionStatus to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Status = types.ConditionExecutionStatus(jtv) + } + + case "summary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionSummary to be of type string, got %T instead", value) + } + sv.Summary = ptr.String(jtv) } default: @@ -8443,7 +8879,7 @@ func awsAwsjson11_deserializeDocumentDuplicatedStopRequestException(v **types.Du return nil } -func awsAwsjson11_deserializeDocumentEncryptionKey(v **types.EncryptionKey, value interface{}) error { +func awsAwsjson11_deserializeDocumentConditionList(v *[]types.Condition, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8451,19 +8887,248 @@ func awsAwsjson11_deserializeDocumentEncryptionKey(v **types.EncryptionKey, valu return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EncryptionKey + var cv []types.Condition if *v == nil { - sv = &types.EncryptionKey{} + cv = []types.Condition{} } else { - sv = *v + cv = *v } - for key, value := range shape { + for _, value := range shape { + var col types.Condition + destAddr := &col + if err := awsAwsjson11_deserializeDocumentCondition(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentConditionNotOverridableException(v **types.ConditionNotOverridableException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConditionNotOverridableException + if *v == nil { + sv = &types.ConditionNotOverridableException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentConditionState(v **types.ConditionState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConditionState + if *v == nil { + sv = &types.ConditionState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "latestExecution": + if err := awsAwsjson11_deserializeDocumentConditionExecution(&sv.LatestExecution, value); err != nil { + return err + } + + case "ruleStates": + if err := awsAwsjson11_deserializeDocumentRuleStateList(&sv.RuleStates, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentConditionStateList(v *[]types.ConditionState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ConditionState + if *v == nil { + cv = []types.ConditionState{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConditionState + destAddr := &col + if err := awsAwsjson11_deserializeDocumentConditionState(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentDuplicatedStopRequestException(v **types.DuplicatedStopRequestException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DuplicatedStopRequestException + if *v == nil { + sv = &types.DuplicatedStopRequestException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentEncryptionKey(v **types.EncryptionKey, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.EncryptionKey + if *v == nil { + sv = &types.EncryptionKey{} + } else { + sv = *v + } + + for key, value := range shape { switch key { case "id": if value != nil { @@ -8653,6 +9318,11 @@ func awsAwsjson11_deserializeDocumentFailureConditions(v **types.FailureConditio for key, value := range shape { switch key { + case "conditions": + if err := awsAwsjson11_deserializeDocumentConditionList(&sv.Conditions, value); err != nil { + return err + } + case "result": if value != nil { jtv, ok := value.(string) @@ -11449,7 +12119,1122 @@ func awsAwsjson11_deserializeDocumentPipelineTriggerDeclaration(v **types.Pipeli return nil } -func awsAwsjson11_deserializeDocumentPipelineTriggerDeclarationList(v *[]types.PipelineTriggerDeclaration, value interface{}) error { +func awsAwsjson11_deserializeDocumentPipelineTriggerDeclarationList(v *[]types.PipelineTriggerDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PipelineTriggerDeclaration + if *v == nil { + cv = []types.PipelineTriggerDeclaration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PipelineTriggerDeclaration + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPipelineTriggerDeclaration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(v **types.PipelineVariableDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PipelineVariableDeclaration + if *v == nil { + sv = &types.PipelineVariableDeclaration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "defaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineVariableValue to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineVariableDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineVariableName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPipelineVariableDeclarationList(v *[]types.PipelineVariableDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PipelineVariableDeclaration + if *v == nil { + cv = []types.PipelineVariableDeclaration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PipelineVariableDeclaration + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPipelineVersionNotFoundException(v **types.PipelineVersionNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PipelineVersionNotFoundException + if *v == nil { + sv = &types.PipelineVersionNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPollingAccountList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPollingServicePrincipalList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ServicePrincipal to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRequestFailedException(v **types.RequestFailedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RequestFailedException + if *v == nil { + sv = &types.RequestFailedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedActionConfigurationMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedPipelineVariable(v **types.ResolvedPipelineVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResolvedPipelineVariable + if *v == nil { + sv = &types.ResolvedPipelineVariable{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "resolvedValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResolvedValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedPipelineVariableList(v *[]types.ResolvedPipelineVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResolvedPipelineVariable + if *v == nil { + cv = []types.ResolvedPipelineVariable{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResolvedPipelineVariable + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResolvedPipelineVariable(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedRuleConfigurationMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResourceNotFoundException + if *v == nil { + sv = &types.ResourceNotFoundException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Message to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleConfigurationMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleConfigurationValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleConfigurationProperty(v **types.RuleConfigurationProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RuleConfigurationProperty + if *v == nil { + sv = &types.RuleConfigurationProperty{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Key = jtv + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleConfigurationKey to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "queryable": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Queryable = jtv + } + + case "required": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Required = jtv + } + + case "secret": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Secret = jtv + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleConfigurationPropertyType to be of type string, got %T instead", value) + } + sv.Type = types.RuleConfigurationPropertyType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleConfigurationPropertyList(v *[]types.RuleConfigurationProperty, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RuleConfigurationProperty + if *v == nil { + cv = []types.RuleConfigurationProperty{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RuleConfigurationProperty + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRuleConfigurationProperty(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleDeclaration(v **types.RuleDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RuleDeclaration + if *v == nil { + sv = &types.RuleDeclaration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "configuration": + if err := awsAwsjson11_deserializeDocumentRuleConfigurationMap(&sv.Configuration, value); err != nil { + return err + } + + case "inputArtifacts": + if err := awsAwsjson11_deserializeDocumentInputArtifactList(&sv.InputArtifacts, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AWSRegionName to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "ruleTypeId": + if err := awsAwsjson11_deserializeDocumentRuleTypeId(&sv.RuleTypeId, value); err != nil { + return err + } + + case "timeoutInMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RuleTimeout to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutInMinutes = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleDeclarationList(v *[]types.RuleDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RuleDeclaration + if *v == nil { + cv = []types.RuleDeclaration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RuleDeclaration + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRuleDeclaration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleExecution(v **types.RuleExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RuleExecution + if *v == nil { + sv = &types.RuleExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errorDetails": + if err := awsAwsjson11_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { + return err + } + + case "externalExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionId to be of type string, got %T instead", value) + } + sv.ExternalExecutionId = ptr.String(jtv) + } + + case "externalExecutionUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.ExternalExecutionUrl = ptr.String(jtv) + } + + case "lastStatusChange": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastStatusChange = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "lastUpdatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdatedBy to be of type string, got %T instead", value) + } + sv.LastUpdatedBy = ptr.String(jtv) + } + + case "ruleExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleExecutionId to be of type string, got %T instead", value) + } + sv.RuleExecutionId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.RuleExecutionStatus(jtv) + } + + case "summary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionSummary to be of type string, got %T instead", value) + } + sv.Summary = ptr.String(jtv) + } + + case "token": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleExecutionToken to be of type string, got %T instead", value) + } + sv.Token = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleExecutionDetail(v **types.RuleExecutionDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RuleExecutionDetail + if *v == nil { + sv = &types.RuleExecutionDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "input": + if err := awsAwsjson11_deserializeDocumentRuleExecutionInput(&sv.Input, value); err != nil { + return err + } + + case "lastUpdateTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdateTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "output": + if err := awsAwsjson11_deserializeDocumentRuleExecutionOutput(&sv.Output, value); err != nil { + return err + } + + case "pipelineExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineExecutionId to be of type string, got %T instead", value) + } + sv.PipelineExecutionId = ptr.String(jtv) + } + + case "pipelineVersion": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PipelineVersion to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelineVersion = ptr.Int32(int32(i64)) + } + + case "ruleExecutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleExecutionId to be of type string, got %T instead", value) + } + sv.RuleExecutionId = ptr.String(jtv) + } + + case "ruleName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) + } + sv.RuleName = ptr.String(jtv) + } + + case "stageName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StageName to be of type string, got %T instead", value) + } + sv.StageName = ptr.String(jtv) + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.RuleExecutionStatus(jtv) + } + + case "updatedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LastUpdatedBy to be of type string, got %T instead", value) + } + sv.UpdatedBy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleExecutionDetailList(v *[]types.RuleExecutionDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RuleExecutionDetail + if *v == nil { + cv = []types.RuleExecutionDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RuleExecutionDetail + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRuleExecutionDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleExecutionInput(v **types.RuleExecutionInput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.RuleExecutionInput + if *v == nil { + sv = &types.RuleExecutionInput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "configuration": + if err := awsAwsjson11_deserializeDocumentRuleConfigurationMap(&sv.Configuration, value); err != nil { + return err + } + + case "inputArtifacts": + if err := awsAwsjson11_deserializeDocumentArtifactDetailList(&sv.InputArtifacts, value); err != nil { + return err + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AWSRegionName to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "resolvedConfiguration": + if err := awsAwsjson11_deserializeDocumentResolvedRuleConfigurationMap(&sv.ResolvedConfiguration, value); err != nil { + return err + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "ruleTypeId": + if err := awsAwsjson11_deserializeDocumentRuleTypeId(&sv.RuleTypeId, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRuleExecutionOutput(v **types.RuleExecutionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11457,33 +13242,35 @@ func awsAwsjson11_deserializeDocumentPipelineTriggerDeclarationList(v *[]types.P return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PipelineTriggerDeclaration + var sv *types.RuleExecutionOutput if *v == nil { - cv = []types.PipelineTriggerDeclaration{} + sv = &types.RuleExecutionOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.PipelineTriggerDeclaration - destAddr := &col - if err := awsAwsjson11_deserializeDocumentPipelineTriggerDeclaration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "executionResult": + if err := awsAwsjson11_deserializeDocumentRuleExecutionResult(&sv.ExecutionResult, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(v **types.PipelineVariableDeclaration, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleExecutionResult(v **types.RuleExecutionResult, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11496,40 +13283,45 @@ func awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(v **types.Pipel return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PipelineVariableDeclaration + var sv *types.RuleExecutionResult if *v == nil { - sv = &types.PipelineVariableDeclaration{} + sv = &types.RuleExecutionResult{} } else { sv = *v } for key, value := range shape { switch key { - case "defaultValue": + case "errorDetails": + if err := awsAwsjson11_deserializeDocumentErrorDetails(&sv.ErrorDetails, value); err != nil { + return err + } + + case "externalExecutionId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PipelineVariableValue to be of type string, got %T instead", value) + return fmt.Errorf("expected ExternalExecutionId to be of type string, got %T instead", value) } - sv.DefaultValue = ptr.String(jtv) + sv.ExternalExecutionId = ptr.String(jtv) } - case "description": + case "externalExecutionSummary": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PipelineVariableDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected ExternalExecutionSummary to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.ExternalExecutionSummary = ptr.String(jtv) } - case "name": + case "externalExecutionUrl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PipelineVariableName to be of type string, got %T instead", value) + return fmt.Errorf("expected Url to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.ExternalExecutionUrl = ptr.String(jtv) } default: @@ -11541,41 +13333,7 @@ func awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(v **types.Pipel return nil } -func awsAwsjson11_deserializeDocumentPipelineVariableDeclarationList(v *[]types.PipelineVariableDeclaration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.PipelineVariableDeclaration - if *v == nil { - cv = []types.PipelineVariableDeclaration{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.PipelineVariableDeclaration - destAddr := &col - if err := awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentPipelineVersionNotFoundException(v **types.PipelineVersionNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleRevision(v **types.RuleRevision, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11588,22 +13346,47 @@ func awsAwsjson11_deserializeDocumentPipelineVersionNotFoundException(v **types. return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PipelineVersionNotFoundException + var sv *types.RuleRevision if *v == nil { - sv = &types.PipelineVersionNotFoundException{} + sv = &types.RuleRevision{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "created": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Created = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "revisionChangeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) + return fmt.Errorf("expected RevisionChangeIdentifier to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.RevisionChangeId = ptr.String(jtv) + } + + case "revisionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Revision to be of type string, got %T instead", value) + } + sv.RevisionId = ptr.String(jtv) } default: @@ -11615,7 +13398,7 @@ func awsAwsjson11_deserializeDocumentPipelineVersionNotFoundException(v **types. return nil } -func awsAwsjson11_deserializeDocumentPollingAccountList(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleState(v **types.RuleState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11623,35 +13406,67 @@ func awsAwsjson11_deserializeDocumentPollingAccountList(v *[]string, value inter return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.RuleState if *v == nil { - cv = []string{} + sv = &types.RuleState{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountId to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "currentRevision": + if err := awsAwsjson11_deserializeDocumentRuleRevision(&sv.CurrentRevision, value); err != nil { + return err } - col = jtv - } - cv = append(cv, col) + case "entityUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.EntityUrl = ptr.String(jtv) + } + + case "latestExecution": + if err := awsAwsjson11_deserializeDocumentRuleExecution(&sv.LatestExecution, value); err != nil { + return err + } + + case "revisionUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.RevisionUrl = ptr.String(jtv) + } + + case "ruleName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleName to be of type string, got %T instead", value) + } + sv.RuleName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsAwsjson11_deserializeDocumentPollingServicePrincipalList(v *[]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleStateList(v *[]types.RuleState, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11664,22 +13479,20 @@ func awsAwsjson11_deserializeDocumentPollingServicePrincipalList(v *[]string, va return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.RuleState if *v == nil { - cv = []string{} + cv = []types.RuleState{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ServicePrincipal to be of type string, got %T instead", value) - } - col = jtv + var col types.RuleState + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRuleState(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -11687,7 +13500,7 @@ func awsAwsjson11_deserializeDocumentPollingServicePrincipalList(v *[]string, va return nil } -func awsAwsjson11_deserializeDocumentRequestFailedException(v **types.RequestFailedException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleType(v **types.RuleType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11700,22 +13513,33 @@ func awsAwsjson11_deserializeDocumentRequestFailedException(v **types.RequestFai return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RequestFailedException + var sv *types.RuleType if *v == nil { - sv = &types.RequestFailedException{} + sv = &types.RuleType{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) + case "id": + if err := awsAwsjson11_deserializeDocumentRuleTypeId(&sv.Id, value); err != nil { + return err + } + + case "inputArtifactDetails": + if err := awsAwsjson11_deserializeDocumentArtifactDetails(&sv.InputArtifactDetails, value); err != nil { + return err + } + + case "ruleConfigurationProperties": + if err := awsAwsjson11_deserializeDocumentRuleConfigurationPropertyList(&sv.RuleConfigurationProperties, value); err != nil { + return err + } + + case "settings": + if err := awsAwsjson11_deserializeDocumentRuleTypeSettings(&sv.Settings, value); err != nil { + return err } default: @@ -11727,7 +13551,7 @@ func awsAwsjson11_deserializeDocumentRequestFailedException(v **types.RequestFai return nil } -func awsAwsjson11_deserializeDocumentResolvedActionConfigurationMap(v *map[string]string, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleTypeId(v **types.RuleTypeId, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11740,67 +13564,49 @@ func awsAwsjson11_deserializeDocumentResolvedActionConfigurationMap(v *map[strin return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var sv *types.RuleTypeId if *v == nil { - mv = map[string]string{} + sv = &types.RuleTypeId{} } else { - mv = *v + sv = *v } for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + switch key { + case "category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleCategory to be of type string, got %T instead", value) + } + sv.Category = types.RuleCategory(jtv) } - parsedVal = jtv - } - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsAwsjson11_deserializeDocumentResolvedPipelineVariable(v **types.ResolvedPipelineVariable, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - var sv *types.ResolvedPipelineVariable - if *v == nil { - sv = &types.ResolvedPipelineVariable{} - } else { - sv = *v - } + case "owner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RuleOwner to be of type string, got %T instead", value) + } + sv.Owner = types.RuleOwner(jtv) + } - for key, value := range shape { - switch key { - case "name": + case "provider": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected RuleProvider to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.Provider = ptr.String(jtv) } - case "resolvedValue": + case "version": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Version to be of type string, got %T instead", value) } - sv.ResolvedValue = ptr.String(jtv) + sv.Version = ptr.String(jtv) } default: @@ -11812,7 +13618,7 @@ func awsAwsjson11_deserializeDocumentResolvedPipelineVariable(v **types.Resolved return nil } -func awsAwsjson11_deserializeDocumentResolvedPipelineVariableList(v *[]types.ResolvedPipelineVariable, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleTypeList(v *[]types.RuleType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11825,17 +13631,17 @@ func awsAwsjson11_deserializeDocumentResolvedPipelineVariableList(v *[]types.Res return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ResolvedPipelineVariable + var cv []types.RuleType if *v == nil { - cv = []types.ResolvedPipelineVariable{} + cv = []types.RuleType{} } else { cv = *v } for _, value := range shape { - var col types.ResolvedPipelineVariable + var col types.RuleType destAddr := &col - if err := awsAwsjson11_deserializeDocumentResolvedPipelineVariable(&destAddr, value); err != nil { + if err := awsAwsjson11_deserializeDocumentRuleType(&destAddr, value); err != nil { return err } col = *destAddr @@ -11846,7 +13652,7 @@ func awsAwsjson11_deserializeDocumentResolvedPipelineVariableList(v *[]types.Res return nil } -func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { +func awsAwsjson11_deserializeDocumentRuleTypeSettings(v **types.RuleTypeSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11859,22 +13665,49 @@ func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.Resourc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceNotFoundException + var sv *types.RuleTypeSettings if *v == nil { - sv = &types.ResourceNotFoundException{} + sv = &types.RuleTypeSettings{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "entityUrlTemplate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Message to be of type string, got %T instead", value) + return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.EntityUrlTemplate = ptr.String(jtv) + } + + case "executionUrlTemplate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) + } + sv.ExecutionUrlTemplate = ptr.String(jtv) + } + + case "revisionUrlTemplate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UrlTemplate to be of type string, got %T instead", value) + } + sv.RevisionUrlTemplate = ptr.String(jtv) + } + + case "thirdPartyConfigurationUrl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Url to be of type string, got %T instead", value) + } + sv.ThirdPartyConfigurationUrl = ptr.String(jtv) } default: @@ -12153,6 +13986,96 @@ func awsAwsjson11_deserializeDocumentStageBlockerDeclarationList(v *[]types.Bloc return nil } +func awsAwsjson11_deserializeDocumentStageConditionsExecution(v **types.StageConditionsExecution, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.StageConditionsExecution + if *v == nil { + sv = &types.StageConditionsExecution{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConditionExecutionStatus to be of type string, got %T instead", value) + } + sv.Status = types.ConditionExecutionStatus(jtv) + } + + case "summary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExecutionSummary to be of type string, got %T instead", value) + } + sv.Summary = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentStageConditionState(v **types.StageConditionState, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.StageConditionState + if *v == nil { + sv = &types.StageConditionState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "conditionStates": + if err := awsAwsjson11_deserializeDocumentConditionStateList(&sv.ConditionStates, value); err != nil { + return err + } + + case "latestExecution": + if err := awsAwsjson11_deserializeDocumentStageConditionsExecution(&sv.LatestExecution, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentStageContext(v **types.StageContext, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12220,6 +14143,11 @@ func awsAwsjson11_deserializeDocumentStageDeclaration(v **types.StageDeclaration return err } + case "beforeEntry": + if err := awsAwsjson11_deserializeDocumentBeforeEntryConditions(&sv.BeforeEntry, value); err != nil { + return err + } + case "blockers": if err := awsAwsjson11_deserializeDocumentStageBlockerDeclarationList(&sv.Blockers, value); err != nil { return err @@ -12239,6 +14167,11 @@ func awsAwsjson11_deserializeDocumentStageDeclaration(v **types.StageDeclaration return err } + case "onSuccess": + if err := awsAwsjson11_deserializeDocumentSuccessConditions(&sv.OnSuccess, value); err != nil { + return err + } + default: _, _ = key, value @@ -12447,6 +14380,11 @@ func awsAwsjson11_deserializeDocumentStageState(v **types.StageState, value inte return err } + case "beforeEntryConditionState": + if err := awsAwsjson11_deserializeDocumentStageConditionState(&sv.BeforeEntryConditionState, value); err != nil { + return err + } + case "inboundExecution": if err := awsAwsjson11_deserializeDocumentStageExecution(&sv.InboundExecution, value); err != nil { return err @@ -12467,6 +14405,16 @@ func awsAwsjson11_deserializeDocumentStageState(v **types.StageState, value inte return err } + case "onFailureConditionState": + if err := awsAwsjson11_deserializeDocumentStageConditionState(&sv.OnFailureConditionState, value); err != nil { + return err + } + + case "onSuccessConditionState": + if err := awsAwsjson11_deserializeDocumentStageConditionState(&sv.OnSuccessConditionState, value); err != nil { + return err + } + case "stageName": if value != nil { jtv, ok := value.(string) @@ -12559,6 +14507,42 @@ func awsAwsjson11_deserializeDocumentStopExecutionTrigger(v **types.StopExecutio return nil } +func awsAwsjson11_deserializeDocumentSuccessConditions(v **types.SuccessConditions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.SuccessConditions + if *v == nil { + sv = &types.SuccessConditions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "conditions": + if err := awsAwsjson11_deserializeDocumentConditionList(&sv.Conditions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14001,6 +15985,87 @@ func awsAwsjson11_deserializeOpDocumentListPipelinesOutput(v **ListPipelinesOutp return nil } +func awsAwsjson11_deserializeOpDocumentListRuleExecutionsOutput(v **ListRuleExecutionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRuleExecutionsOutput + if *v == nil { + sv = &ListRuleExecutionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ruleExecutionDetails": + if err := awsAwsjson11_deserializeDocumentRuleExecutionDetailList(&sv.RuleExecutionDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeOpDocumentListRuleTypesOutput(v **ListRuleTypesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRuleTypesOutput + if *v == nil { + sv = &ListRuleTypesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ruleTypes": + if err := awsAwsjson11_deserializeDocumentRuleTypeList(&sv.RuleTypes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/codepipeline/generated.json b/service/codepipeline/generated.json index 07dca6af346..8afd53c3489 100644 --- a/service/codepipeline/generated.json +++ b/service/codepipeline/generated.json @@ -28,8 +28,11 @@ "api_op_ListActionTypes.go", "api_op_ListPipelineExecutions.go", "api_op_ListPipelines.go", + "api_op_ListRuleExecutions.go", + "api_op_ListRuleTypes.go", "api_op_ListTagsForResource.go", "api_op_ListWebhooks.go", + "api_op_OverrideStageCondition.go", "api_op_PollForJobs.go", "api_op_PollForThirdPartyJobs.go", "api_op_PutActionRevision.go", diff --git a/service/codepipeline/serializers.go b/service/codepipeline/serializers.go index eb13a2fb9e2..bb6b588f32e 100644 --- a/service/codepipeline/serializers.go +++ b/service/codepipeline/serializers.go @@ -1116,6 +1116,116 @@ func (m *awsAwsjson11_serializeOpListPipelines) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListRuleExecutions struct { +} + +func (*awsAwsjson11_serializeOpListRuleExecutions) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListRuleExecutions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListRuleExecutionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodePipeline_20150709.ListRuleExecutions") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListRuleExecutionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson11_serializeOpListRuleTypes struct { +} + +func (*awsAwsjson11_serializeOpListRuleTypes) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListRuleTypes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListRuleTypesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodePipeline_20150709.ListRuleTypes") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListRuleTypesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListTagsForResource struct { } @@ -1226,6 +1336,61 @@ func (m *awsAwsjson11_serializeOpListWebhooks) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpOverrideStageCondition struct { +} + +func (*awsAwsjson11_serializeOpOverrideStageCondition) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpOverrideStageCondition) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*OverrideStageConditionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("CodePipeline_20150709.OverrideStageCondition") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentOverrideStageConditionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpPollForJobs struct { } @@ -2749,6 +2914,20 @@ func awsAwsjson11_serializeDocumentArtifactStoreMap(v map[string]types.ArtifactS return nil } +func awsAwsjson11_serializeDocumentBeforeEntryConditions(v *types.BeforeEntryConditions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Conditions != nil { + ok := object.Key("conditions") + if err := awsAwsjson11_serializeDocumentConditionList(v.Conditions, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentBlockerDeclaration(v *types.BlockerDeclaration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2766,6 +2945,38 @@ func awsAwsjson11_serializeDocumentBlockerDeclaration(v *types.BlockerDeclaratio return nil } +func awsAwsjson11_serializeDocumentCondition(v *types.Condition, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Result) > 0 { + ok := object.Key("result") + ok.String(string(v.Result)) + } + + if v.Rules != nil { + ok := object.Key("rules") + if err := awsAwsjson11_serializeDocumentRuleDeclarationList(v.Rules, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentConditionList(v []types.Condition, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentCondition(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentCurrentRevision(v *types.CurrentRevision, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2857,6 +3068,13 @@ func awsAwsjson11_serializeDocumentFailureConditions(v *types.FailureConditions, object := value.Object() defer object.Close() + if v.Conditions != nil { + ok := object.Key("conditions") + if err := awsAwsjson11_serializeDocumentConditionList(v.Conditions, ok); err != nil { + return err + } + } + if len(v.Result) > 0 { ok := object.Key("result") ok.String(string(v.Result)) @@ -3437,6 +3655,124 @@ func awsAwsjson11_serializeDocumentQueryParamMap(v map[string]string, value smit return nil } +func awsAwsjson11_serializeDocumentRuleConfigurationMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsAwsjson11_serializeDocumentRuleDeclaration(v *types.RuleDeclaration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Configuration != nil { + ok := object.Key("configuration") + if err := awsAwsjson11_serializeDocumentRuleConfigurationMap(v.Configuration, ok); err != nil { + return err + } + } + + if v.InputArtifacts != nil { + ok := object.Key("inputArtifacts") + if err := awsAwsjson11_serializeDocumentInputArtifactList(v.InputArtifacts, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Region != nil { + ok := object.Key("region") + ok.String(*v.Region) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.RuleTypeId != nil { + ok := object.Key("ruleTypeId") + if err := awsAwsjson11_serializeDocumentRuleTypeId(v.RuleTypeId, ok); err != nil { + return err + } + } + + if v.TimeoutInMinutes != nil { + ok := object.Key("timeoutInMinutes") + ok.Integer(*v.TimeoutInMinutes) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRuleDeclarationList(v []types.RuleDeclaration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentRuleDeclaration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentRuleExecutionFilter(v *types.RuleExecutionFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LatestInPipelineExecution != nil { + ok := object.Key("latestInPipelineExecution") + if err := awsAwsjson11_serializeDocumentLatestInPipelineExecutionFilter(v.LatestInPipelineExecution, ok); err != nil { + return err + } + } + + if v.PipelineExecutionId != nil { + ok := object.Key("pipelineExecutionId") + ok.String(*v.PipelineExecutionId) + } + + return nil +} + +func awsAwsjson11_serializeDocumentRuleTypeId(v *types.RuleTypeId, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Category) > 0 { + ok := object.Key("category") + ok.String(string(v.Category)) + } + + if len(v.Owner) > 0 { + ok := object.Key("owner") + ok.String(string(v.Owner)) + } + + if v.Provider != nil { + ok := object.Key("provider") + ok.String(*v.Provider) + } + + if v.Version != nil { + ok := object.Key("version") + ok.String(*v.Version) + } + + return nil +} + func awsAwsjson11_serializeDocumentSourceRevisionOverride(v *types.SourceRevisionOverride, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3509,6 +3845,13 @@ func awsAwsjson11_serializeDocumentStageDeclaration(v *types.StageDeclaration, v } } + if v.BeforeEntry != nil { + ok := object.Key("beforeEntry") + if err := awsAwsjson11_serializeDocumentBeforeEntryConditions(v.BeforeEntry, ok); err != nil { + return err + } + } + if v.Blockers != nil { ok := object.Key("blockers") if err := awsAwsjson11_serializeDocumentStageBlockerDeclarationList(v.Blockers, ok); err != nil { @@ -3528,6 +3871,13 @@ func awsAwsjson11_serializeDocumentStageDeclaration(v *types.StageDeclaration, v } } + if v.OnSuccess != nil { + ok := object.Key("onSuccess") + if err := awsAwsjson11_serializeDocumentSuccessConditions(v.OnSuccess, ok); err != nil { + return err + } + } + return nil } @@ -3543,6 +3893,20 @@ func awsAwsjson11_serializeDocumentSucceededInStageFilter(v *types.SucceededInSt return nil } +func awsAwsjson11_serializeDocumentSuccessConditions(v *types.SuccessConditions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Conditions != nil { + ok := object.Key("conditions") + if err := awsAwsjson11_serializeDocumentConditionList(v.Conditions, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4095,6 +4459,52 @@ func awsAwsjson11_serializeOpDocumentListPipelinesInput(v *ListPipelinesInput, v return nil } +func awsAwsjson11_serializeOpDocumentListRuleExecutionsInput(v *ListRuleExecutionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsAwsjson11_serializeDocumentRuleExecutionFilter(v.Filter, ok); err != nil { + return err + } + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.PipelineName != nil { + ok := object.Key("pipelineName") + ok.String(*v.PipelineName) + } + + return nil +} + +func awsAwsjson11_serializeOpDocumentListRuleTypesInput(v *ListRuleTypesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RegionFilter != nil { + ok := object.Key("regionFilter") + ok.String(*v.RegionFilter) + } + + if len(v.RuleOwnerFilter) > 0 { + ok := object.Key("ruleOwnerFilter") + ok.String(string(v.RuleOwnerFilter)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4134,6 +4544,33 @@ func awsAwsjson11_serializeOpDocumentListWebhooksInput(v *ListWebhooksInput, val return nil } +func awsAwsjson11_serializeOpDocumentOverrideStageConditionInput(v *OverrideStageConditionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ConditionType) > 0 { + ok := object.Key("conditionType") + ok.String(string(v.ConditionType)) + } + + if v.PipelineExecutionId != nil { + ok := object.Key("pipelineExecutionId") + ok.String(*v.PipelineExecutionId) + } + + if v.PipelineName != nil { + ok := object.Key("pipelineName") + ok.String(*v.PipelineName) + } + + if v.StageName != nil { + ok := object.Key("stageName") + ok.String(*v.StageName) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentPollForJobsInput(v *PollForJobsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/codepipeline/snapshot/api_op_ListRuleExecutions.go.snap b/service/codepipeline/snapshot/api_op_ListRuleExecutions.go.snap new file mode 100644 index 00000000000..c344e0c5338 --- /dev/null +++ b/service/codepipeline/snapshot/api_op_ListRuleExecutions.go.snap @@ -0,0 +1,36 @@ +ListRuleExecutions + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/codepipeline/snapshot/api_op_ListRuleTypes.go.snap b/service/codepipeline/snapshot/api_op_ListRuleTypes.go.snap new file mode 100644 index 00000000000..59393b1e394 --- /dev/null +++ b/service/codepipeline/snapshot/api_op_ListRuleTypes.go.snap @@ -0,0 +1,35 @@ +ListRuleTypes + 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 + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/codepipeline/snapshot/api_op_OverrideStageCondition.go.snap b/service/codepipeline/snapshot/api_op_OverrideStageCondition.go.snap new file mode 100644 index 00000000000..a863ddbc949 --- /dev/null +++ b/service/codepipeline/snapshot/api_op_OverrideStageCondition.go.snap @@ -0,0 +1,36 @@ +OverrideStageCondition + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/codepipeline/snapshot_test.go b/service/codepipeline/snapshot_test.go index dc507891b5c..0b67c56ff00 100644 --- a/service/codepipeline/snapshot_test.go +++ b/service/codepipeline/snapshot_test.go @@ -302,6 +302,30 @@ func TestCheckSnapshot_ListPipelines(t *testing.T) { } } +func TestCheckSnapshot_ListRuleExecutions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRuleExecutions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListRuleExecutions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListRuleTypes(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRuleTypes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListRuleTypes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { @@ -326,6 +350,18 @@ func TestCheckSnapshot_ListWebhooks(t *testing.T) { } } +func TestCheckSnapshot_OverrideStageCondition(t *testing.T) { + svc := New(Options{}) + _, err := svc.OverrideStageCondition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "OverrideStageCondition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_PollForJobs(t *testing.T) { svc := New(Options{}) _, err := svc.PollForJobs(context.Background(), nil, func(o *Options) { @@ -781,6 +817,30 @@ func TestUpdateSnapshot_ListPipelines(t *testing.T) { } } +func TestUpdateSnapshot_ListRuleExecutions(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRuleExecutions(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListRuleExecutions") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListRuleTypes(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListRuleTypes(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListRuleTypes") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { @@ -805,6 +865,18 @@ func TestUpdateSnapshot_ListWebhooks(t *testing.T) { } } +func TestUpdateSnapshot_OverrideStageCondition(t *testing.T) { + svc := New(Options{}) + _, err := svc.OverrideStageCondition(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "OverrideStageCondition") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_PollForJobs(t *testing.T) { svc := New(Options{}) _, err := svc.PollForJobs(context.Background(), nil, func(o *Options) { diff --git a/service/codepipeline/types/enums.go b/service/codepipeline/types/enums.go index b4898cc4600..aa27c1bf66d 100644 --- a/service/codepipeline/types/enums.go +++ b/service/codepipeline/types/enums.go @@ -165,6 +165,54 @@ func (BlockerType) Values() []BlockerType { } } +type ConditionExecutionStatus string + +// Enum values for ConditionExecutionStatus +const ( + ConditionExecutionStatusInProgress ConditionExecutionStatus = "InProgress" + ConditionExecutionStatusFailed ConditionExecutionStatus = "Failed" + ConditionExecutionStatusErrored ConditionExecutionStatus = "Errored" + ConditionExecutionStatusSucceeded ConditionExecutionStatus = "Succeeded" + ConditionExecutionStatusCancelled ConditionExecutionStatus = "Cancelled" + ConditionExecutionStatusAbandoned ConditionExecutionStatus = "Abandoned" + ConditionExecutionStatusOverridden ConditionExecutionStatus = "Overridden" +) + +// Values returns all known values for ConditionExecutionStatus. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ConditionExecutionStatus) Values() []ConditionExecutionStatus { + return []ConditionExecutionStatus{ + "InProgress", + "Failed", + "Errored", + "Succeeded", + "Cancelled", + "Abandoned", + "Overridden", + } +} + +type ConditionType string + +// Enum values for ConditionType +const ( + ConditionTypeBeforeEntry ConditionType = "BEFORE_ENTRY" + ConditionTypeOnSuccess ConditionType = "ON_SUCCESS" +) + +// Values returns all known values for ConditionType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ConditionType) Values() []ConditionType { + return []ConditionType{ + "BEFORE_ENTRY", + "ON_SUCCESS", + } +} + type EncryptionKeyType string // Enum values for EncryptionKeyType @@ -388,6 +436,7 @@ type Result string // Enum values for Result const ( ResultRollback Result = "ROLLBACK" + ResultFail Result = "FAIL" ) // Values returns all known values for Result. Note that this can be expanded in @@ -397,6 +446,86 @@ const ( func (Result) Values() []Result { return []Result{ "ROLLBACK", + "FAIL", + } +} + +type RuleCategory string + +// Enum values for RuleCategory +const ( + RuleCategoryRule RuleCategory = "Rule" +) + +// Values returns all known values for RuleCategory. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RuleCategory) Values() []RuleCategory { + return []RuleCategory{ + "Rule", + } +} + +type RuleConfigurationPropertyType string + +// Enum values for RuleConfigurationPropertyType +const ( + RuleConfigurationPropertyTypeString RuleConfigurationPropertyType = "String" + RuleConfigurationPropertyTypeNumber RuleConfigurationPropertyType = "Number" + RuleConfigurationPropertyTypeBoolean RuleConfigurationPropertyType = "Boolean" +) + +// Values returns all known values for RuleConfigurationPropertyType. Note that +// this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RuleConfigurationPropertyType) Values() []RuleConfigurationPropertyType { + return []RuleConfigurationPropertyType{ + "String", + "Number", + "Boolean", + } +} + +type RuleExecutionStatus string + +// Enum values for RuleExecutionStatus +const ( + RuleExecutionStatusInProgress RuleExecutionStatus = "InProgress" + RuleExecutionStatusAbandoned RuleExecutionStatus = "Abandoned" + RuleExecutionStatusSucceeded RuleExecutionStatus = "Succeeded" + RuleExecutionStatusFailed RuleExecutionStatus = "Failed" +) + +// Values returns all known values for RuleExecutionStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RuleExecutionStatus) Values() []RuleExecutionStatus { + return []RuleExecutionStatus{ + "InProgress", + "Abandoned", + "Succeeded", + "Failed", + } +} + +type RuleOwner string + +// Enum values for RuleOwner +const ( + RuleOwnerAws RuleOwner = "AWS" +) + +// Values returns all known values for RuleOwner. Note that this can be expanded +// in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (RuleOwner) Values() []RuleOwner { + return []RuleOwner{ + "AWS", } } diff --git a/service/codepipeline/types/errors.go b/service/codepipeline/types/errors.go index ba90eb2bdf5..bcc83eb8c51 100644 --- a/service/codepipeline/types/errors.go +++ b/service/codepipeline/types/errors.go @@ -139,6 +139,32 @@ func (e *ConcurrentPipelineExecutionsLimitExceededException) ErrorFault() smithy return smithy.FaultClient } +// Unable to override because the condition does not allow overrides. +type ConditionNotOverridableException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConditionNotOverridableException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConditionNotOverridableException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConditionNotOverridableException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConditionNotOverridableException" + } + return *e.ErrorCodeOverride +} +func (e *ConditionNotOverridableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Your request cannot be handled because the pipeline is busy handling ongoing // activities. Try again later. type ConflictException struct { diff --git a/service/codepipeline/types/types.go b/service/codepipeline/types/types.go index dbdc59b2300..6516c851aab 100644 --- a/service/codepipeline/types/types.go +++ b/service/codepipeline/types/types.go @@ -833,6 +833,17 @@ type AWSSessionCredentials struct { noSmithyDocumentSerde } +// The conditions for making checks for entry to a stage. +type BeforeEntryConditions struct { + + // The conditions that are configured as entry conditions. + // + // This member is required. + Conditions []Condition + + noSmithyDocumentSerde +} + // Reserved for future use. type BlockerDeclaration struct { @@ -849,6 +860,47 @@ type BlockerDeclaration struct { noSmithyDocumentSerde } +// The condition for the stage. A condition is made up of the rules and the result +// for the condition. +type Condition struct { + + // The action to be done when the condition is met. For example, rolling back an + // execution for a failure condition. + Result Result + + // The rules that make up the condition. + Rules []RuleDeclaration + + noSmithyDocumentSerde +} + +// The run of a condition. +type ConditionExecution struct { + + // The last status change of the condition. + LastStatusChange *time.Time + + // The status of the run for a condition. + Status ConditionExecutionStatus + + // The summary of information about a run for a condition. + Summary *string + + noSmithyDocumentSerde +} + +// Information about the state of the condition. +type ConditionState struct { + + // The state of the latest run of the rule. + LatestExecution *ConditionExecution + + // The state of the rules for the condition. + RuleStates []RuleState + + noSmithyDocumentSerde +} + // Represents information about a current revision. type CurrentRevision struct { @@ -961,6 +1013,9 @@ type ExecutorConfiguration struct { // stage failure. type FailureConditions struct { + // The conditions that are configured as failure conditions. + Conditions []Condition + // The specified result for when the failure conditions are met, such as rolling // back the stage. Result Result @@ -1689,6 +1744,368 @@ type ResolvedPipelineVariable struct { noSmithyDocumentSerde } +// Represents information about a rule configuration property. +type RuleConfigurationProperty struct { + + // Whether the configuration property is a key. + // + // This member is required. + Key bool + + // The name of the rule configuration property. + // + // This member is required. + Name *string + + // Whether the configuration property is a required value. + // + // This member is required. + Required bool + + // Whether the configuration property is secret. + // + // When updating a pipeline, passing * * * * * without changing any other values + // of the action preserves the previous value of the secret. + // + // This member is required. + Secret bool + + // The description of the action configuration property that is displayed to users. + Description *string + + // Indicates whether the property can be queried. + // + // If you create a pipeline with a condition and rule, and that rule contains a + // queryable property, the value for that configuration property is subject to + // other restrictions. The value must be less than or equal to twenty (20) + // characters. The value can contain only alphanumeric characters, underscores, and + // hyphens. + Queryable bool + + // The type of the configuration property. + Type RuleConfigurationPropertyType + + noSmithyDocumentSerde +} + +// Represents information about the rule to be created for an associated +// condition. An example would be creating a new rule for an entry condition, such +// as a rule that checks for a test result before allowing the run to enter the +// deployment stage. +type RuleDeclaration struct { + + // The name of the rule that is created for the condition, such as CheckAllResults. + // + // This member is required. + Name *string + + // The ID for the rule type, which is made up of the combined values for category, + // owner, provider, and version. + // + // This member is required. + RuleTypeId *RuleTypeId + + // The action configuration fields for the rule. + Configuration map[string]string + + // The input artifacts fields for the rule, such as specifying an input file for + // the rule. + InputArtifacts []InputArtifact + + // The Region for the condition associated with the rule. + Region *string + + // The pipeline role ARN associated with the rule. + RoleArn *string + + // The action timeout for the rule. + TimeoutInMinutes *int32 + + noSmithyDocumentSerde +} + +// Represents information about each time a rule is run as part of the pipeline +// execution for a pipeline configured with conditions. +type RuleExecution struct { + + // Represents information about an error in CodePipeline. + ErrorDetails *ErrorDetails + + // The external ID of the run of the rule. + ExternalExecutionId *string + + // The URL of a resource external to Amazon Web Services that is used when running + // the rule (for example, an external repository URL). + ExternalExecutionUrl *string + + // The last status change of the rule. + LastStatusChange *time.Time + + // The ARN of the user who last changed the rule. + LastUpdatedBy *string + + // The execution ID for the run of the rule. + RuleExecutionId *string + + // The status of the run of the rule, such as FAILED. + Status RuleExecutionStatus + + // A summary of the run of the rule. + Summary *string + + // The system-generated token used to identify a unique request. + Token *string + + noSmithyDocumentSerde +} + +// The details of the runs for a rule and the results produced on an artifact as +// it passes through stages in the pipeline. +type RuleExecutionDetail struct { + + // Input details for the rule execution, such as role ARN, Region, and input + // artifacts. + Input *RuleExecutionInput + + // The date and time of the last change to the rule execution, in timestamp format. + LastUpdateTime *time.Time + + // Output details for the rule execution, such as the rule execution result. + Output *RuleExecutionOutput + + // The ID of the pipeline execution in the stage where the rule was run. Use the GetPipelineState + // action to retrieve the current pipelineExecutionId of the stage. + PipelineExecutionId *string + + // The version number of the pipeline with the stage where the rule was run. + PipelineVersion *int32 + + // The ID of the run for the rule. + RuleExecutionId *string + + // The name of the rule that was run in the stage. + RuleName *string + + // The name of the stage where the rule was run. + StageName *string + + // The start time of the rule execution. + StartTime *time.Time + + // The status of the rule execution. Status categories are InProgress , Succeeded , + // and Failed . + Status RuleExecutionStatus + + // The ARN of the user who changed the rule execution details. + UpdatedBy *string + + noSmithyDocumentSerde +} + +// Filter values for the rule execution. +type RuleExecutionFilter struct { + + // The field that specifies to filter on the latest execution in the pipeline. + // + // Filtering on the latest execution is available for executions run on or after + // February 08, 2024. + LatestInPipelineExecution *LatestInPipelineExecutionFilter + + // The pipeline execution ID used to filter rule execution history. + PipelineExecutionId *string + + noSmithyDocumentSerde +} + +// Input information used for a rule execution. +type RuleExecutionInput struct { + + // Configuration data for a rule execution, such as the resolved values for that + // run. + Configuration map[string]string + + // Details of input artifacts of the rule that correspond to the rule execution. + InputArtifacts []ArtifactDetail + + // The Amazon Web Services Region for the rule, such as us-east-1. + Region *string + + // Configuration data for a rule execution with all variable references replaced + // with their real values for the execution. + ResolvedConfiguration map[string]string + + // The ARN of the IAM service role that performs the declared rule. This is + // assumed through the roleArn for the pipeline. + RoleArn *string + + // The ID for the rule type, which is made up of the combined values for category, + // owner, provider, and version. + RuleTypeId *RuleTypeId + + noSmithyDocumentSerde +} + +// Output details listed for a rule execution, such as the rule execution result. +type RuleExecutionOutput struct { + + // Execution result information listed in the output details for a rule execution. + ExecutionResult *RuleExecutionResult + + noSmithyDocumentSerde +} + +// Execution result information, such as the external execution ID. +type RuleExecutionResult struct { + + // Represents information about an error in CodePipeline. + ErrorDetails *ErrorDetails + + // The external ID for the rule execution. + ExternalExecutionId *string + + // The external provider summary for the rule execution. + ExternalExecutionSummary *string + + // The deepest external link to the external resource (for example, a repository + // URL or deployment endpoint) that is used when running the rule. + ExternalExecutionUrl *string + + noSmithyDocumentSerde +} + +// The change to a rule that creates a revision of the rule. +type RuleRevision struct { + + // The date and time when the most recent version of the rule was created, in + // timestamp format. + // + // This member is required. + Created *time.Time + + // The unique identifier of the change that set the state to this revision (for + // example, a deployment ID or timestamp). + // + // This member is required. + RevisionChangeId *string + + // The system-generated unique ID that identifies the revision number of the rule. + // + // This member is required. + RevisionId *string + + noSmithyDocumentSerde +} + +// Returns information about the state of a rule. +// +// Values returned in the revisionId field indicate the rule revision information, +// such as the commit ID, for the current state. +type RuleState struct { + + // The ID of the current revision of the artifact successfully worked on by the + // job. + CurrentRevision *RuleRevision + + // A URL link for more information about the state of the action, such as a + // details page. + EntityUrl *string + + // Represents information about the latest run of an rule. + LatestExecution *RuleExecution + + // A URL link for more information about the revision, such as a commit details + // page. + RevisionUrl *string + + // The name of the rule. + RuleName *string + + noSmithyDocumentSerde +} + +// The rule type, which is made up of the combined values for category, owner, +// provider, and version. +type RuleType struct { + + // Represents information about a rule type. + // + // This member is required. + Id *RuleTypeId + + // Returns information about the details of an artifact. + // + // This member is required. + InputArtifactDetails *ArtifactDetails + + // The configuration properties for the rule type. + RuleConfigurationProperties []RuleConfigurationProperty + + // Returns information about the settings for a rule type. + Settings *RuleTypeSettings + + noSmithyDocumentSerde +} + +// The ID for the rule type, which is made up of the combined values for category, +// owner, provider, and version. +type RuleTypeId struct { + + // A category defines what kind of rule can be run in the stage, and constrains + // the provider type for the rule. Valid categories are limited to one of the + // following values. + // + // - INVOKE + // + // - Approval + // + // - Rule + // + // This member is required. + Category RuleCategory + + // The provider of the service being called by the rule. Valid providers are + // determined by the rulecategory. For example, a managed rule in the Rule category + // type has an owner of AWS, which would be specified as AWS . + // + // This member is required. + Provider *string + + // The creator of the rule being called. The valid value for the Owner field in + // the rule category is AWS . + Owner RuleOwner + + // A string that describes the rule version. + Version *string + + noSmithyDocumentSerde +} + +// Returns information about the settings for a rule type. +type RuleTypeSettings struct { + + // The URL returned to the CodePipeline console that provides a deep link to the + // resources of the external system, such as the configuration page for a + // CodeDeploy deployment group. This link is provided as part of the action display + // in the pipeline. + EntityUrlTemplate *string + + // The URL returned to the CodePipeline console that contains a link to the + // top-level landing page for the external system, such as the console page for + // CodeDeploy. This link is shown on the pipeline view page in the CodePipeline + // console and provides a link to the execution entity of the external action. + ExecutionUrlTemplate *string + + // The URL returned to the CodePipeline console that contains a link to the page + // where customers can update or change the configuration of the external action. + RevisionUrlTemplate *string + + // The URL of a sign-up page where users can sign up for an external service and + // perform initial configuration of the action provided by that service. + ThirdPartyConfigurationUrl *string + + noSmithyDocumentSerde +} + // The location of the S3 bucket that contains a revision. type S3ArtifactLocation struct { @@ -1774,6 +2191,30 @@ type SourceRevisionOverride struct { noSmithyDocumentSerde } +// Represents information about the run of a condition for a stage. +type StageConditionsExecution struct { + + // The status of a run of a condition for a stage. + Status ConditionExecutionStatus + + // A summary of the run of the condition for a stage. + Summary *string + + noSmithyDocumentSerde +} + +// The state of a run of a condition for a stage. +type StageConditionState struct { + + // The states of the conditions for a run of a condition for a stage. + ConditionStates []ConditionState + + // Represents information about the latest run of a condition for a stage. + LatestExecution *StageConditionsExecution + + noSmithyDocumentSerde +} + // Represents information about a stage to a job worker. type StageContext struct { @@ -1796,6 +2237,10 @@ type StageDeclaration struct { // This member is required. Name *string + // The method to use when a stage allows entry. For example, configuring this + // field for conditions will allow entry to the stage when the conditions are met. + BeforeEntry *BeforeEntryConditions + // Reserved for future use. Blockers []BlockerDeclaration @@ -1804,6 +2249,11 @@ type StageDeclaration struct { // to the last successful pipeline execution in the stage. OnFailure *FailureConditions + // The method to use when a stage has succeeded. For example, configuring this + // field for conditions will allow the stage to succeed when the conditions are + // met. + OnSuccess *SuccessConditions + noSmithyDocumentSerde } @@ -1836,6 +2286,9 @@ type StageState struct { // The state of the stage. ActionStates []ActionState + // The state of the entry conditions for a stage. + BeforeEntryConditionState *StageConditionState + // Represents information about the run of a stage. InboundExecution *StageExecution @@ -1849,6 +2302,12 @@ type StageState struct { // status. LatestExecution *StageExecution + // The state of the failure conditions for a stage. + OnFailureConditionState *StageConditionState + + // The state of the success conditions for a stage. + OnSuccessConditionState *StageConditionState + // The name of the stage. StageName *string @@ -1875,6 +2334,17 @@ type SucceededInStageFilter struct { noSmithyDocumentSerde } +// The conditions for making checks that, if met, succeed a stage. +type SuccessConditions struct { + + // The conditions that are success conditions. + // + // This member is required. + Conditions []Condition + + noSmithyDocumentSerde +} + // A tag is a key-value pair that is used to manage the resource. type Tag struct { diff --git a/service/codepipeline/validators.go b/service/codepipeline/validators.go index 4d1b3b9b47c..b668879b986 100644 --- a/service/codepipeline/validators.go +++ b/service/codepipeline/validators.go @@ -350,6 +350,26 @@ func (m *validateOpListPipelineExecutions) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpListRuleExecutions struct { +} + +func (*validateOpListRuleExecutions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListRuleExecutions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListRuleExecutionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListRuleExecutionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -370,6 +390,26 @@ func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpOverrideStageCondition struct { +} + +func (*validateOpOverrideStageCondition) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpOverrideStageCondition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*OverrideStageConditionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpOverrideStageConditionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpPollForJobs struct { } @@ -778,10 +818,18 @@ func addOpListPipelineExecutionsValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpListPipelineExecutions{}, middleware.After) } +func addOpListRuleExecutionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRuleExecutions{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } +func addOpOverrideStageConditionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpOverrideStageCondition{}, middleware.After) +} + func addOpPollForJobsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPollForJobs{}, middleware.After) } @@ -1202,6 +1250,25 @@ func validateArtifactStoreMap(v map[string]types.ArtifactStore) error { } } +func validateBeforeEntryConditions(v *types.BeforeEntryConditions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BeforeEntryConditions"} + if v.Conditions == nil { + invalidParams.Add(smithy.NewErrParamRequired("Conditions")) + } else if v.Conditions != nil { + if err := validateConditionList(v.Conditions); err != nil { + invalidParams.AddNested("Conditions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateBlockerDeclaration(v *types.BlockerDeclaration) error { if v == nil { return nil @@ -1220,6 +1287,40 @@ func validateBlockerDeclaration(v *types.BlockerDeclaration) error { } } +func validateCondition(v *types.Condition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Condition"} + if v.Rules != nil { + if err := validateRuleDeclarationList(v.Rules); err != nil { + invalidParams.AddNested("Rules", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateConditionList(v []types.Condition) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConditionList"} + for i := range v { + if err := validateCondition(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateCurrentRevision(v *types.CurrentRevision) error { if v == nil { return nil @@ -1273,6 +1374,23 @@ func validateExecutorConfiguration(v *types.ExecutorConfiguration) error { } } +func validateFailureConditions(v *types.FailureConditions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "FailureConditions"} + if v.Conditions != nil { + if err := validateConditionList(v.Conditions); err != nil { + invalidParams.AddNested("Conditions", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateFailureDetails(v *types.FailureDetails) error { if v == nil { return nil @@ -1571,6 +1689,85 @@ func validatePipelineVariableList(v []types.PipelineVariable) error { } } +func validateRuleDeclaration(v *types.RuleDeclaration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleDeclaration"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.RuleTypeId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RuleTypeId")) + } else if v.RuleTypeId != nil { + if err := validateRuleTypeId(v.RuleTypeId); err != nil { + invalidParams.AddNested("RuleTypeId", err.(smithy.InvalidParamsError)) + } + } + if v.InputArtifacts != nil { + if err := validateInputArtifactList(v.InputArtifacts); err != nil { + invalidParams.AddNested("InputArtifacts", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRuleDeclarationList(v []types.RuleDeclaration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleDeclarationList"} + for i := range v { + if err := validateRuleDeclaration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRuleExecutionFilter(v *types.RuleExecutionFilter) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleExecutionFilter"} + if v.LatestInPipelineExecution != nil { + if err := validateLatestInPipelineExecutionFilter(v.LatestInPipelineExecution); err != nil { + invalidParams.AddNested("LatestInPipelineExecution", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRuleTypeId(v *types.RuleTypeId) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RuleTypeId"} + if len(v.Category) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Category")) + } + if v.Provider == nil { + invalidParams.Add(smithy.NewErrParamRequired("Provider")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSourceRevisionOverride(v *types.SourceRevisionOverride) error { if v == nil { return nil @@ -1663,6 +1860,40 @@ func validateStageDeclaration(v *types.StageDeclaration) error { invalidParams.AddNested("Actions", err.(smithy.InvalidParamsError)) } } + if v.OnFailure != nil { + if err := validateFailureConditions(v.OnFailure); err != nil { + invalidParams.AddNested("OnFailure", err.(smithy.InvalidParamsError)) + } + } + if v.OnSuccess != nil { + if err := validateSuccessConditions(v.OnSuccess); err != nil { + invalidParams.AddNested("OnSuccess", err.(smithy.InvalidParamsError)) + } + } + if v.BeforeEntry != nil { + if err := validateBeforeEntryConditions(v.BeforeEntry); err != nil { + invalidParams.AddNested("BeforeEntry", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSuccessConditions(v *types.SuccessConditions) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SuccessConditions"} + if v.Conditions == nil { + invalidParams.Add(smithy.NewErrParamRequired("Conditions")) + } else if v.Conditions != nil { + if err := validateConditionList(v.Conditions); err != nil { + invalidParams.AddNested("Conditions", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2115,6 +2346,26 @@ func validateOpListPipelineExecutionsInput(v *ListPipelineExecutionsInput) error } } +func validateOpListRuleExecutionsInput(v *ListRuleExecutionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListRuleExecutionsInput"} + if v.PipelineName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PipelineName")) + } + if v.Filter != nil { + if err := validateRuleExecutionFilter(v.Filter); err != nil { + invalidParams.AddNested("Filter", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -2130,6 +2381,30 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } +func validateOpOverrideStageConditionInput(v *OverrideStageConditionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OverrideStageConditionInput"} + if v.PipelineName == nil { + invalidParams.Add(smithy.NewErrParamRequired("PipelineName")) + } + if v.StageName == nil { + invalidParams.Add(smithy.NewErrParamRequired("StageName")) + } + if v.PipelineExecutionId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PipelineExecutionId")) + } + if len(v.ConditionType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ConditionType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpPollForJobsInput(v *PollForJobsInput) error { if v == nil { return nil diff --git a/service/dax/internal/endpoints/endpoints.go b/service/dax/internal/endpoints/endpoints.go index eebd18e3591..279847a45bb 100644 --- a/service/dax/internal/endpoints/endpoints.go +++ b/service/dax/internal/endpoints/endpoints.go @@ -154,6 +154,12 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/elasticache/api_op_DeleteReplicationGroup.go b/service/elasticache/api_op_DeleteReplicationGroup.go index 10570160011..f21a3036a07 100644 --- a/service/elasticache/api_op_DeleteReplicationGroup.go +++ b/service/elasticache/api_op_DeleteReplicationGroup.go @@ -21,7 +21,10 @@ import ( // immediately begins deleting the selected resources; you cannot cancel or revert // this operation. // -// This operation is valid for Redis OSS only. +// - CreateSnapshot permission is required to create a final snapshot. Without +// this permission, the API call will fail with an Access Denied exception. +// +// - This operation is valid for Redis OSS only. func (c *Client) DeleteReplicationGroup(ctx context.Context, params *DeleteReplicationGroupInput, optFns ...func(*Options)) (*DeleteReplicationGroupOutput, error) { if params == nil { params = &DeleteReplicationGroupInput{} diff --git a/service/elasticache/api_op_DeleteServerlessCache.go b/service/elasticache/api_op_DeleteServerlessCache.go index 526973348fd..6a109ab2bbe 100644 --- a/service/elasticache/api_op_DeleteServerlessCache.go +++ b/service/elasticache/api_op_DeleteServerlessCache.go @@ -12,6 +12,10 @@ import ( ) // Deletes a specified existing serverless cache. +// +// CreateServerlessCacheSnapshot permission is required to create a final +// snapshot. Without this permission, the API call will fail with an Access Denied +// exception. func (c *Client) DeleteServerlessCache(ctx context.Context, params *DeleteServerlessCacheInput, optFns ...func(*Options)) (*DeleteServerlessCacheOutput, error) { if params == nil { params = &DeleteServerlessCacheInput{} diff --git a/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go b/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go index 20a2f932c48..ce252165ef4 100644 --- a/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go +++ b/service/lexmodelsv2/api_op_CreateResourcePolicyStatement.go @@ -16,6 +16,9 @@ import ( // policy doesn't exist, a new policy is created. // // You can't create a resource policy statement that allows cross-account access. +// +// You need to add the CreateResourcePolicy or UpdateResourcePolicy action to the +// bot role in order to call the API. func (c *Client) CreateResourcePolicyStatement(ctx context.Context, params *CreateResourcePolicyStatementInput, optFns ...func(*Options)) (*CreateResourcePolicyStatementOutput, error) { if params == nil { params = &CreateResourcePolicyStatementInput{} diff --git a/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go b/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go index 1157be53037..cd3b6e5dfd9 100644 --- a/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go +++ b/service/lexmodelsv2/api_op_DeleteResourcePolicyStatement.go @@ -14,6 +14,9 @@ import ( // statement from a policy, the policy is deleted. If you specify a statement ID // that doesn't exist in the policy, or if the bot or bot alias doesn't have a // policy attached, Amazon Lex returns an exception. +// +// You need to add the DeleteResourcePolicy or UpdateResourcePolicy action to the +// bot role in order to call the API. func (c *Client) DeleteResourcePolicyStatement(ctx context.Context, params *DeleteResourcePolicyStatementInput, optFns ...func(*Options)) (*DeleteResourcePolicyStatementOutput, error) { if params == nil { params = &DeleteResourcePolicyStatementInput{} diff --git a/service/lexmodelsv2/deserializers.go b/service/lexmodelsv2/deserializers.go index ab14b4067f2..751da6faa06 100644 --- a/service/lexmodelsv2/deserializers.go +++ b/service/lexmodelsv2/deserializers.go @@ -23345,6 +23345,55 @@ func awsRestjson1_deserializeDocumentAudioSpecification(v **types.AudioSpecifica return nil } +func awsRestjson1_deserializeDocumentBedrockGuardrailConfiguration(v **types.BedrockGuardrailConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BedrockGuardrailConfiguration + if *v == nil { + sv = &types.BedrockGuardrailConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "identifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BedrockGuardrailIdentifier to be of type string, got %T instead", value) + } + sv.Identifier = ptr.String(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BedrockGuardrailVersion to be of type string, got %T instead", value) + } + sv.Version = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentBedrockKnowledgeStoreConfiguration(v **types.BedrockKnowledgeStoreConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -23376,6 +23425,60 @@ func awsRestjson1_deserializeDocumentBedrockKnowledgeStoreConfiguration(v **type sv.BedrockKnowledgeBaseArn = ptr.String(jtv) } + case "exactResponse": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.ExactResponse = jtv + } + + case "exactResponseFields": + if err := awsRestjson1_deserializeDocumentBedrockKnowledgeStoreExactResponseFields(&sv.ExactResponseFields, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBedrockKnowledgeStoreExactResponseFields(v **types.BedrockKnowledgeStoreExactResponseFields, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BedrockKnowledgeStoreExactResponseFields + if *v == nil { + sv = &types.BedrockKnowledgeStoreExactResponseFields{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "answerField": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnswerField to be of type string, got %T instead", value) + } + sv.AnswerField = ptr.String(jtv) + } + default: _, _ = key, value @@ -23407,6 +23510,20 @@ func awsRestjson1_deserializeDocumentBedrockModelSpecification(v **types.Bedrock for key, value := range shape { switch key { + case "customPrompt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BedrockModelCustomPrompt to be of type string, got %T instead", value) + } + sv.CustomPrompt = ptr.String(jtv) + } + + case "guardrail": + if err := awsRestjson1_deserializeDocumentBedrockGuardrailConfiguration(&sv.Guardrail, value); err != nil { + return err + } + case "modelArn": if value != nil { jtv, ok := value.(string) @@ -23416,6 +23533,15 @@ func awsRestjson1_deserializeDocumentBedrockModelSpecification(v **types.Bedrock sv.ModelArn = ptr.String(jtv) } + case "traceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BedrockTraceStatus to be of type string, got %T instead", value) + } + sv.TraceStatus = types.BedrockTraceStatus(jtv) + } + default: _, _ = key, value diff --git a/service/lexmodelsv2/serializers.go b/service/lexmodelsv2/serializers.go index 754930cb4c7..8a7d74aec46 100644 --- a/service/lexmodelsv2/serializers.go +++ b/service/lexmodelsv2/serializers.go @@ -10900,6 +10900,23 @@ func awsRestjson1_serializeDocumentAudioSpecification(v *types.AudioSpecificatio return nil } +func awsRestjson1_serializeDocumentBedrockGuardrailConfiguration(v *types.BedrockGuardrailConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifier != nil { + ok := object.Key("identifier") + ok.String(*v.Identifier) + } + + if v.Version != nil { + ok := object.Key("version") + ok.String(*v.Version) + } + + return nil +} + func awsRestjson1_serializeDocumentBedrockKnowledgeStoreConfiguration(v *types.BedrockKnowledgeStoreConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -10909,6 +10926,30 @@ func awsRestjson1_serializeDocumentBedrockKnowledgeStoreConfiguration(v *types.B ok.String(*v.BedrockKnowledgeBaseArn) } + if v.ExactResponse { + ok := object.Key("exactResponse") + ok.Boolean(v.ExactResponse) + } + + if v.ExactResponseFields != nil { + ok := object.Key("exactResponseFields") + if err := awsRestjson1_serializeDocumentBedrockKnowledgeStoreExactResponseFields(v.ExactResponseFields, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentBedrockKnowledgeStoreExactResponseFields(v *types.BedrockKnowledgeStoreExactResponseFields, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnswerField != nil { + ok := object.Key("answerField") + ok.String(*v.AnswerField) + } + return nil } @@ -10916,11 +10957,28 @@ func awsRestjson1_serializeDocumentBedrockModelSpecification(v *types.BedrockMod object := value.Object() defer object.Close() + if v.CustomPrompt != nil { + ok := object.Key("customPrompt") + ok.String(*v.CustomPrompt) + } + + if v.Guardrail != nil { + ok := object.Key("guardrail") + if err := awsRestjson1_serializeDocumentBedrockGuardrailConfiguration(v.Guardrail, ok); err != nil { + return err + } + } + if v.ModelArn != nil { ok := object.Key("modelArn") ok.String(*v.ModelArn) } + if len(v.TraceStatus) > 0 { + ok := object.Key("traceStatus") + ok.String(string(v.TraceStatus)) + } + return nil } diff --git a/service/lexmodelsv2/types/enums.go b/service/lexmodelsv2/types/enums.go index 6ee69fe5ecb..130b5ce7d08 100644 --- a/service/lexmodelsv2/types/enums.go +++ b/service/lexmodelsv2/types/enums.go @@ -638,6 +638,25 @@ func (AudioRecognitionStrategy) Values() []AudioRecognitionStrategy { } } +type BedrockTraceStatus string + +// Enum values for BedrockTraceStatus +const ( + BedrockTraceStatusEnabled BedrockTraceStatus = "ENABLED" + BedrockTraceStatusDisabled BedrockTraceStatus = "DISABLED" +) + +// Values returns all known values for BedrockTraceStatus. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (BedrockTraceStatus) Values() []BedrockTraceStatus { + return []BedrockTraceStatus{ + "ENABLED", + "DISABLED", + } +} + type BotAliasReplicationStatus string // Enum values for BotAliasReplicationStatus diff --git a/service/lexmodelsv2/types/types.go b/service/lexmodelsv2/types/types.go index 8d160e3f82b..6f715987903 100644 --- a/service/lexmodelsv2/types/types.go +++ b/service/lexmodelsv2/types/types.go @@ -1304,14 +1304,46 @@ type AudioSpecification struct { noSmithyDocumentSerde } +// The details on the Bedrock guardrail configuration. +type BedrockGuardrailConfiguration struct { + + // The unique guardrail id for the Bedrock guardrail configuration. + // + // This member is required. + Identifier *string + + // The guardrail version for the Bedrock guardrail configuration. + // + // This member is required. + Version *string + + noSmithyDocumentSerde +} + // Contains details about the configuration of a Amazon Bedrock knowledge base. type BedrockKnowledgeStoreConfiguration struct { - // The ARN of the knowledge base used. + // The base ARN of the knowledge base used. // // This member is required. BedrockKnowledgeBaseArn *string + // Specifies whether to return an exact response, or to return an answer generated + // by the model, using the fields you specify from the database. + ExactResponse bool + + // Contains the names of the fields used for an exact response to the user. + ExactResponseFields *BedrockKnowledgeStoreExactResponseFields + + noSmithyDocumentSerde +} + +// The exact response fields given by the Bedrock knowledge store. +type BedrockKnowledgeStoreExactResponseFields struct { + + // The answer field used for an exact response from Bedrock Knowledge Store. + AnswerField *string + noSmithyDocumentSerde } @@ -1324,6 +1356,15 @@ type BedrockModelSpecification struct { // This member is required. ModelArn *string + // The custom prompt used in the Bedrock model specification details. + CustomPrompt *string + + // The guardrail configuration in the Bedrock model specification details. + Guardrail *BedrockGuardrailConfiguration + + // The Bedrock trace status in the Bedrock model specification details. + TraceStatus BedrockTraceStatus + noSmithyDocumentSerde } diff --git a/service/lexmodelsv2/validators.go b/service/lexmodelsv2/validators.go index 7e35e6da5bb..07af5093d5f 100644 --- a/service/lexmodelsv2/validators.go +++ b/service/lexmodelsv2/validators.go @@ -3166,6 +3166,24 @@ func validateAudioSpecification(v *types.AudioSpecification) error { } } +func validateBedrockGuardrailConfiguration(v *types.BedrockGuardrailConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BedrockGuardrailConfiguration"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if v.Version == nil { + invalidParams.Add(smithy.NewErrParamRequired("Version")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateBedrockKnowledgeStoreConfiguration(v *types.BedrockKnowledgeStoreConfiguration) error { if v == nil { return nil @@ -3189,6 +3207,11 @@ func validateBedrockModelSpecification(v *types.BedrockModelSpecification) error if v.ModelArn == nil { invalidParams.Add(smithy.NewErrParamRequired("ModelArn")) } + if v.Guardrail != nil { + if err := validateBedrockGuardrailConfiguration(v.Guardrail); err != nil { + invalidParams.AddNested("Guardrail", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/rolesanywhere/api_op_CreateProfile.go b/service/rolesanywhere/api_op_CreateProfile.go index 73980087e56..5101a0fd441 100644 --- a/service/rolesanywhere/api_op_CreateProfile.go +++ b/service/rolesanywhere/api_op_CreateProfile.go @@ -43,6 +43,10 @@ type CreateProfileInput struct { // This member is required. RoleArns []string + // Used to determine if a custom role session name will be accepted in a temporary + // credential request. + AcceptRoleSessionName *bool + // Used to determine how long sessions vended using this profile are valid for. // See the Expiration section of the [CreateSession API documentation] page for more details. In requests, if this // value is not provided, the default value will be 3600. diff --git a/service/rolesanywhere/api_op_UpdateProfile.go b/service/rolesanywhere/api_op_UpdateProfile.go index 2076a274103..59aa93544f4 100644 --- a/service/rolesanywhere/api_op_UpdateProfile.go +++ b/service/rolesanywhere/api_op_UpdateProfile.go @@ -38,6 +38,10 @@ type UpdateProfileInput struct { // This member is required. ProfileId *string + // Used to determine if a custom role session name will be accepted in a temporary + // credential request. + AcceptRoleSessionName *bool + // Used to determine how long sessions vended using this profile are valid for. // See the Expiration section of the [CreateSession API documentation] page for more details. In requests, if this // value is not provided, the default value will be 3600. diff --git a/service/rolesanywhere/deserializers.go b/service/rolesanywhere/deserializers.go index 122868dc35e..6030858b1e7 100644 --- a/service/rolesanywhere/deserializers.go +++ b/service/rolesanywhere/deserializers.go @@ -5379,6 +5379,15 @@ func awsRestjson1_deserializeDocumentProfileDetail(v **types.ProfileDetail, valu for key, value := range shape { switch key { + case "acceptRoleSessionName": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AcceptRoleSessionName = ptr.Bool(jtv) + } + case "attributeMappings": if err := awsRestjson1_deserializeDocumentAttributeMappings(&sv.AttributeMappings, value); err != nil { return err diff --git a/service/rolesanywhere/serializers.go b/service/rolesanywhere/serializers.go index c2f6b74e9f8..5c9888f878b 100644 --- a/service/rolesanywhere/serializers.go +++ b/service/rolesanywhere/serializers.go @@ -81,6 +81,11 @@ func awsRestjson1_serializeOpDocumentCreateProfileInput(v *CreateProfileInput, v object := value.Object() defer object.Close() + if v.AcceptRoleSessionName != nil { + ok := object.Key("acceptRoleSessionName") + ok.Boolean(*v.AcceptRoleSessionName) + } + if v.DurationSeconds != nil { ok := object.Key("durationSeconds") ok.Integer(*v.DurationSeconds) @@ -2160,6 +2165,11 @@ func awsRestjson1_serializeOpDocumentUpdateProfileInput(v *UpdateProfileInput, v object := value.Object() defer object.Close() + if v.AcceptRoleSessionName != nil { + ok := object.Key("acceptRoleSessionName") + ok.Boolean(*v.AcceptRoleSessionName) + } + if v.DurationSeconds != nil { ok := object.Key("durationSeconds") ok.Integer(*v.DurationSeconds) diff --git a/service/rolesanywhere/types/types.go b/service/rolesanywhere/types/types.go index 52a013c7d76..387d75873bb 100644 --- a/service/rolesanywhere/types/types.go +++ b/service/rolesanywhere/types/types.go @@ -190,6 +190,10 @@ type NotificationSettingKey struct { // The state of the profile after a read or write operation. type ProfileDetail struct { + // Used to determine if a custom role session name will be accepted in a temporary + // credential request. + AcceptRoleSessionName *bool + // A mapping applied to the authenticating end-entity certificate. AttributeMappings []AttributeMapping diff --git a/service/tnb/api_op_GetSolFunctionInstance.go b/service/tnb/api_op_GetSolFunctionInstance.go index 8a579049e12..73723494af9 100644 --- a/service/tnb/api_op_GetSolFunctionInstance.go +++ b/service/tnb/api_op_GetSolFunctionInstance.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Gets the details of a network function instance, including the instantation +// Gets the details of a network function instance, including the instantiation // state and metadata from the function package descriptor in the network function // package. // diff --git a/service/tnb/api_op_GetSolNetworkOperation.go b/service/tnb/api_op_GetSolNetworkOperation.go index 42ebb217086..d73fd8d798f 100644 --- a/service/tnb/api_op_GetSolNetworkOperation.go +++ b/service/tnb/api_op_GetSolNetworkOperation.go @@ -74,6 +74,10 @@ type GetSolNetworkOperationOutput struct { // All tasks associated with this operation occurrence. Tasks []types.GetSolNetworkOperationTaskDetails + // Type of the update. Only present if the network operation lcmOperationType is + // UPDATE . + UpdateType types.UpdateSolNetworkType + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/tnb/api_op_InstantiateSolNetworkInstance.go b/service/tnb/api_op_InstantiateSolNetworkInstance.go index 7e11392ef59..b1abb285bd9 100644 --- a/service/tnb/api_op_InstantiateSolNetworkInstance.go +++ b/service/tnb/api_op_InstantiateSolNetworkInstance.go @@ -54,8 +54,9 @@ type InstantiateSolNetworkInstanceInput struct { // A tag is a label that you assign to an Amazon Web Services resource. Each tag // consists of a key and an optional value. When you use this API, the tags are - // transferred to the network operation that is created. Use tags to search and - // filter your resources or track your Amazon Web Services costs. + // only applied to the network operation that is created. These tags are not + // applied to the network instance. Use tags to search and filter your resources or + // track your Amazon Web Services costs. Tags map[string]string noSmithyDocumentSerde @@ -70,8 +71,9 @@ type InstantiateSolNetworkInstanceOutput struct { // A tag is a label that you assign to an Amazon Web Services resource. Each tag // consists of a key and an optional value. When you use this API, the tags are - // transferred to the network operation that is created. Use tags to search and - // filter your resources or track your Amazon Web Services costs. + // only applied to the network operation that is created. These tags are not + // applied to the network instance. Use tags to search and filter your resources or + // track your Amazon Web Services costs. Tags map[string]string // Metadata pertaining to the operation's result. diff --git a/service/tnb/api_op_ListSolNetworkOperations.go b/service/tnb/api_op_ListSolNetworkOperations.go index c9605e4c228..d743b58e1a2 100644 --- a/service/tnb/api_op_ListSolNetworkOperations.go +++ b/service/tnb/api_op_ListSolNetworkOperations.go @@ -39,6 +39,10 @@ type ListSolNetworkOperationsInput struct { // The token for the next page of results. NextToken *string + // Network instance id filter, to retrieve network operations associated to a + // network instance. + NsInstanceId *string + noSmithyDocumentSerde } diff --git a/service/tnb/api_op_TerminateSolNetworkInstance.go b/service/tnb/api_op_TerminateSolNetworkInstance.go index a388750f094..cd6b7e8ec87 100644 --- a/service/tnb/api_op_TerminateSolNetworkInstance.go +++ b/service/tnb/api_op_TerminateSolNetworkInstance.go @@ -41,8 +41,9 @@ type TerminateSolNetworkInstanceInput struct { // A tag is a label that you assign to an Amazon Web Services resource. Each tag // consists of a key and an optional value. When you use this API, the tags are - // transferred to the network operation that is created. Use tags to search and - // filter your resources or track your Amazon Web Services costs. + // only applied to the network operation that is created. These tags are not + // applied to the network instance. Use tags to search and filter your resources or + // track your Amazon Web Services costs. Tags map[string]string noSmithyDocumentSerde @@ -55,8 +56,9 @@ type TerminateSolNetworkInstanceOutput struct { // A tag is a label that you assign to an Amazon Web Services resource. Each tag // consists of a key and an optional value. When you use this API, the tags are - // transferred to the network operation that is created. Use tags to search and - // filter your resources or track your Amazon Web Services costs. + // only applied to the network operation that is created. These tags are not + // applied to the network instance. Use tags to search and filter your resources or + // track your Amazon Web Services costs. Tags map[string]string // Metadata pertaining to the operation's result. diff --git a/service/tnb/api_op_UpdateSolNetworkInstance.go b/service/tnb/api_op_UpdateSolNetworkInstance.go index 4f2d3b14743..b95f68fadb6 100644 --- a/service/tnb/api_op_UpdateSolNetworkInstance.go +++ b/service/tnb/api_op_UpdateSolNetworkInstance.go @@ -16,6 +16,9 @@ import ( // A network instance is a single network created in Amazon Web Services TNB that // can be deployed and on which life-cycle operations (like terminate, update, and // delete) can be performed. +// +// Choose the updateType parameter to target the necessary update of the network +// instance. func (c *Client) UpdateSolNetworkInstance(ctx context.Context, params *UpdateSolNetworkInstanceInput, optFns ...func(*Options)) (*UpdateSolNetworkInstanceOutput, error) { if params == nil { params = &UpdateSolNetworkInstanceInput{} @@ -40,19 +43,34 @@ type UpdateSolNetworkInstanceInput struct { // The type of update. // + // - Use the MODIFY_VNF_INFORMATION update type, to update a specific network + // function configuration, in the network instance. + // + // - Use the UPDATE_NS update type, to update the network instance to a new + // network service descriptor. + // // This member is required. UpdateType types.UpdateSolNetworkType // Identifies the network function information parameters and/or the configurable // properties of the network function to be modified. + // + // Include this property only if the update type is MODIFY_VNF_INFORMATION . ModifyVnfInfoData *types.UpdateSolNetworkModify // A tag is a label that you assign to an Amazon Web Services resource. Each tag // consists of a key and an optional value. When you use this API, the tags are - // transferred to the network operation that is created. Use tags to search and - // filter your resources or track your Amazon Web Services costs. + // only applied to the network operation that is created. These tags are not + // applied to the network instance. Use tags to search and filter your resources or + // track your Amazon Web Services costs. Tags map[string]string + // Identifies the network service descriptor and the configurable properties of + // the descriptor, to be used for the update. + // + // Include this property only if the update type is UPDATE_NS . + UpdateNs *types.UpdateSolNetworkServiceData + noSmithyDocumentSerde } @@ -63,8 +81,9 @@ type UpdateSolNetworkInstanceOutput struct { // A tag is a label that you assign to an Amazon Web Services resource. Each tag // consists of a key and an optional value. When you use this API, the tags are - // transferred to the network operation that is created. Use tags to search and - // filter your resources or track your Amazon Web Services costs. + // only applied to the network operation that is created. These tags are not + // applied to the network instance. Use tags to search and filter your resources or + // track your Amazon Web Services costs. Tags map[string]string // Metadata pertaining to the operation's result. diff --git a/service/tnb/deserializers.go b/service/tnb/deserializers.go index 3568e2ab84c..01df2faef3f 100644 --- a/service/tnb/deserializers.go +++ b/service/tnb/deserializers.go @@ -8,6 +8,8 @@ import ( "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/tnb/document" + internaldocument "github.com/aws/aws-sdk-go-v2/service/tnb/internal/document" "github.com/aws/aws-sdk-go-v2/service/tnb/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" @@ -2254,6 +2256,15 @@ func awsRestjson1_deserializeOpDocumentGetSolNetworkOperationOutput(v **GetSolNe return err } + case "updateType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateSolNetworkType to be of type string, got %T instead", value) + } + sv.UpdateType = types.UpdateSolNetworkType(jtv) + } + default: _, _ = key, value @@ -6213,6 +6224,11 @@ func awsRestjson1_deserializeDocumentGetSolNetworkOperationMetadata(v **types.Ge sv.CreatedAt = ptr.Time(t) } + case "instantiateMetadata": + if err := awsRestjson1_deserializeDocumentInstantiateMetadata(&sv.InstantiateMetadata, value); err != nil { + return err + } + case "lastModified": if value != nil { jtv, ok := value.(string) @@ -6226,6 +6242,16 @@ func awsRestjson1_deserializeDocumentGetSolNetworkOperationMetadata(v **types.Ge sv.LastModified = ptr.Time(t) } + case "modifyVnfInfoMetadata": + if err := awsRestjson1_deserializeDocumentModifyVnfInfoMetadata(&sv.ModifyVnfInfoMetadata, value); err != nil { + return err + } + + case "updateNsMetadata": + if err := awsRestjson1_deserializeDocumentUpdateNsMetadata(&sv.UpdateNsMetadata, value); err != nil { + return err + } + default: _, _ = key, value @@ -6589,6 +6615,51 @@ func awsRestjson1_deserializeDocumentGetSolVnfInfo(v **types.GetSolVnfInfo, valu return nil } +func awsRestjson1_deserializeDocumentInstantiateMetadata(v **types.InstantiateMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InstantiateMetadata + if *v == nil { + sv = &types.InstantiateMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "additionalParamsForNs": + if err := awsRestjson1_deserializeDocumentDocument(&sv.AdditionalParamsForNs, value); err != nil { + return err + } + + case "nsdInfoId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NsdInfoId to be of type string, got %T instead", value) + } + sv.NsdInfoId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7330,6 +7401,15 @@ func awsRestjson1_deserializeDocumentListSolNetworkOperationsInfo(v **types.List sv.OperationState = types.NsLcmOperationState(jtv) } + case "updateType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateSolNetworkType to be of type string, got %T instead", value) + } + sv.UpdateType = types.UpdateSolNetworkType(jtv) + } + default: _, _ = key, value @@ -7387,6 +7467,24 @@ func awsRestjson1_deserializeDocumentListSolNetworkOperationsMetadata(v **types. sv.LastModified = ptr.Time(t) } + case "nsdInfoId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NsdInfoId to be of type string, got %T instead", value) + } + sv.NsdInfoId = ptr.String(jtv) + } + + case "vnfInstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VnfInstanceId to be of type string, got %T instead", value) + } + sv.VnfInstanceId = ptr.String(jtv) + } + default: _, _ = key, value @@ -7652,6 +7750,51 @@ func awsRestjson1_deserializeDocumentListSolNetworkPackageResources(v *[]types.L return nil } +func awsRestjson1_deserializeDocumentModifyVnfInfoMetadata(v **types.ModifyVnfInfoMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ModifyVnfInfoMetadata + if *v == nil { + sv = &types.ModifyVnfInfoMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "vnfConfigurableProperties": + if err := awsRestjson1_deserializeDocumentDocument(&sv.VnfConfigurableProperties, value); err != nil { + return err + } + + case "vnfInstanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VnfInstanceId to be of type string, got %T instead", value) + } + sv.VnfInstanceId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentNetworkArtifactMeta(v **types.NetworkArtifactMeta, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8084,6 +8227,51 @@ func awsRestjson1_deserializeDocumentToscaOverride(v **types.ToscaOverride, valu return nil } +func awsRestjson1_deserializeDocumentUpdateNsMetadata(v **types.UpdateNsMetadata, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.UpdateNsMetadata + if *v == nil { + sv = &types.UpdateNsMetadata{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "additionalParamsForNs": + if err := awsRestjson1_deserializeDocumentDocument(&sv.AdditionalParamsForNs, value); err != nil { + return err + } + + case "nsdInfoId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NsdInfoId to be of type string, got %T instead", value) + } + sv.NsdInfoId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentValidateSolFunctionPackageContentMetadata(v **types.ValidateSolFunctionPackageContentMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8231,3 +8419,11 @@ func awsRestjson1_deserializeDocumentVnfPkgIdList(v *[]string, value interface{} *v = cv return nil } + +func awsRestjson1_deserializeDocumentDocument(v *document.Interface, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + *v = internaldocument.NewDocumentUnmarshaler(value) + return nil +} diff --git a/service/tnb/endpoints.go b/service/tnb/endpoints.go index 5da7bb01f9d..1d40419e2a4 100644 --- a/service/tnb/endpoints.go +++ b/service/tnb/endpoints.go @@ -384,7 +384,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://tnb-fips.") diff --git a/service/tnb/serializers.go b/service/tnb/serializers.go index b4939c2d679..679408ec394 100644 --- a/service/tnb/serializers.go +++ b/service/tnb/serializers.go @@ -1476,6 +1476,10 @@ func awsRestjson1_serializeOpHttpBindingsListSolNetworkOperationsInput(v *ListSo encoder.SetQuery("nextpage_opaque_marker").String(*v.NextToken) } + if v.NsInstanceId != nil { + encoder.SetQuery("nsInstanceId").String(*v.NsInstanceId) + } + return nil } @@ -2205,6 +2209,13 @@ func awsRestjson1_serializeOpDocumentUpdateSolNetworkInstanceInput(v *UpdateSolN } } + if v.UpdateNs != nil { + ok := object.Key("updateNs") + if err := awsRestjson1_serializeDocumentUpdateSolNetworkServiceData(v.UpdateNs, ok); err != nil { + return err + } + } + if len(v.UpdateType) > 0 { ok := object.Key("updateType") ok.String(string(v.UpdateType)) @@ -2495,6 +2506,25 @@ func awsRestjson1_serializeDocumentUpdateSolNetworkModify(v *types.UpdateSolNetw return nil } +func awsRestjson1_serializeDocumentUpdateSolNetworkServiceData(v *types.UpdateSolNetworkServiceData, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AdditionalParamsForNs != nil { + ok := object.Key("additionalParamsForNs") + if err := awsRestjson1_serializeDocumentDocument(v.AdditionalParamsForNs, ok); err != nil { + return err + } + } + + if v.NsdInfoId != nil { + ok := object.Key("nsdInfoId") + ok.String(*v.NsdInfoId) + } + + return nil +} + func awsRestjson1_serializeDocumentDocument(v document.Interface, value smithyjson.Value) error { if v == nil { return nil diff --git a/service/tnb/types/enums.go b/service/tnb/types/enums.go index da60e5bdc7a..b60815f3ee2 100644 --- a/service/tnb/types/enums.go +++ b/service/tnb/types/enums.go @@ -128,14 +128,17 @@ type NsState string // Enum values for NsState const ( - NsStateInstantiated NsState = "INSTANTIATED" - NsStateNotInstantiated NsState = "NOT_INSTANTIATED" - NsStateImpaired NsState = "IMPAIRED" - NsStateStopped NsState = "STOPPED" - NsStateDeleted NsState = "DELETED" - NsStateInstantiateInProgress NsState = "INSTANTIATE_IN_PROGRESS" - NsStateUpdateInProgress NsState = "UPDATE_IN_PROGRESS" - NsStateTerminateInProgress NsState = "TERMINATE_IN_PROGRESS" + NsStateInstantiated NsState = "INSTANTIATED" + NsStateNotInstantiated NsState = "NOT_INSTANTIATED" + NsStateUpdated NsState = "UPDATED" + NsStateImpaired NsState = "IMPAIRED" + NsStateUpdateFailed NsState = "UPDATE_FAILED" + NsStateStopped NsState = "STOPPED" + NsStateDeleted NsState = "DELETED" + NsStateInstantiateInProgress NsState = "INSTANTIATE_IN_PROGRESS" + NsStateIntentToUpdateInProgress NsState = "INTENT_TO_UPDATE_IN_PROGRESS" + NsStateUpdateInProgress NsState = "UPDATE_IN_PROGRESS" + NsStateTerminateInProgress NsState = "TERMINATE_IN_PROGRESS" ) // Values returns all known values for NsState. Note that this can be expanded in @@ -146,10 +149,13 @@ func (NsState) Values() []NsState { return []NsState{ "INSTANTIATED", "NOT_INSTANTIATED", + "UPDATED", "IMPAIRED", + "UPDATE_FAILED", "STOPPED", "DELETED", "INSTANTIATE_IN_PROGRESS", + "INTENT_TO_UPDATE_IN_PROGRESS", "UPDATE_IN_PROGRESS", "TERMINATE_IN_PROGRESS", } @@ -246,6 +252,7 @@ type UpdateSolNetworkType string // Enum values for UpdateSolNetworkType const ( UpdateSolNetworkTypeModifyVnfInformation UpdateSolNetworkType = "MODIFY_VNF_INFORMATION" + UpdateSolNetworkTypeUpdateNs UpdateSolNetworkType = "UPDATE_NS" ) // Values returns all known values for UpdateSolNetworkType. Note that this can be @@ -255,6 +262,7 @@ const ( func (UpdateSolNetworkType) Values() []UpdateSolNetworkType { return []UpdateSolNetworkType{ "MODIFY_VNF_INFORMATION", + "UPDATE_NS", } } diff --git a/service/tnb/types/types.go b/service/tnb/types/types.go index cfe438c5554..d71c2606cf5 100644 --- a/service/tnb/types/types.go +++ b/service/tnb/types/types.go @@ -123,6 +123,20 @@ type GetSolNetworkOperationMetadata struct { // This member is required. LastModified *time.Time + // Metadata related to the network operation occurrence for network instantiation. + // This is populated only if the lcmOperationType is INSTANTIATE . + InstantiateMetadata *InstantiateMetadata + + // Metadata related to the network operation occurrence for network function + // updates in a network instance. This is populated only if the lcmOperationType is + // UPDATE and the updateType is MODIFY_VNF_INFORMATION . + ModifyVnfInfoMetadata *ModifyVnfInfoMetadata + + // Metadata related to the network operation occurrence for network instance + // updates. This is populated only if the lcmOperationType is UPDATE and the + // updateType is UPDATE_NS . + UpdateNsMetadata *UpdateNsMetadata + noSmithyDocumentSerde } @@ -223,6 +237,21 @@ type GetSolVnfInfo struct { noSmithyDocumentSerde } +// Metadata related to the configuration properties used during instantiation of +// the network instance. +type InstantiateMetadata struct { + + // The network service descriptor used for instantiating the network instance. + // + // This member is required. + NsdInfoId *string + + // The configurable properties used during instantiation. + AdditionalParamsForNs document.Interface + + noSmithyDocumentSerde +} + // Lifecycle management operation details on the network instance. // // Lifecycle management operations are deploy, update, or delete operations. @@ -478,6 +507,10 @@ type ListSolNetworkOperationsInfo struct { // Metadata related to this network operation. Metadata *ListSolNetworkOperationsMetadata + // Type of the update. Only present if the network operation lcmOperationType is + // UPDATE . + UpdateType UpdateSolNetworkType + noSmithyDocumentSerde } @@ -497,6 +530,16 @@ type ListSolNetworkOperationsMetadata struct { // This member is required. LastModified *time.Time + // The network service descriptor id used for the operation. + // + // Only present if the updateType is UPDATE_NS . + NsdInfoId *string + + // The network function id used for the operation. + // + // Only present if the updateType is MODIFY_VNF_INFO . + VnfInstanceId *string + noSmithyDocumentSerde } @@ -579,6 +622,23 @@ type ListSolNetworkPackageMetadata struct { noSmithyDocumentSerde } +// Metadata related to the configuration properties used during update of a +// specific network function in a network instance. +type ModifyVnfInfoMetadata struct { + + // The configurable properties used during update of the network function instance. + // + // This member is required. + VnfConfigurableProperties document.Interface + + // The network function instance that was updated in the network instance. + // + // This member is required. + VnfInstanceId *string + + noSmithyDocumentSerde +} + // Metadata for network package artifacts. // // Artifacts are the contents of the package descriptor file and the state of the @@ -650,6 +710,21 @@ type ToscaOverride struct { noSmithyDocumentSerde } +// Metadata related to the configuration properties used during update of a +// network instance. +type UpdateNsMetadata struct { + + // The network service descriptor used for updating the network instance. + // + // This member is required. + NsdInfoId *string + + // The configurable properties used during update. + AdditionalParamsForNs document.Interface + + noSmithyDocumentSerde +} + // Information parameters and/or the configurable properties for a network // function. // @@ -672,6 +747,22 @@ type UpdateSolNetworkModify struct { noSmithyDocumentSerde } +// Information parameters and/or the configurable properties for a network +// descriptor used for update. +type UpdateSolNetworkServiceData struct { + + // ID of the network service descriptor. + // + // This member is required. + NsdInfoId *string + + // Values for the configurable properties declared in the network service + // descriptor. + AdditionalParamsForNs document.Interface + + noSmithyDocumentSerde +} + // Validates function package content metadata. // // A function package is a .zip file in CSAR (Cloud Service Archive) format that diff --git a/service/tnb/validators.go b/service/tnb/validators.go index 84f82944e5d..162cfdd7ca3 100644 --- a/service/tnb/validators.go +++ b/service/tnb/validators.go @@ -652,6 +652,21 @@ func validateUpdateSolNetworkModify(v *types.UpdateSolNetworkModify) error { } } +func validateUpdateSolNetworkServiceData(v *types.UpdateSolNetworkServiceData) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSolNetworkServiceData"} + if v.NsdInfoId == nil { + invalidParams.Add(smithy.NewErrParamRequired("NsdInfoId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCancelSolNetworkOperationInput(v *CancelSolNetworkOperationInput) error { if v == nil { return nil @@ -1025,6 +1040,11 @@ func validateOpUpdateSolNetworkInstanceInput(v *UpdateSolNetworkInstanceInput) e invalidParams.AddNested("ModifyVnfInfoData", err.(smithy.InvalidParamsError)) } } + if v.UpdateNs != nil { + if err := validateUpdateSolNetworkServiceData(v.UpdateNs); err != nil { + invalidParams.AddNested("UpdateNs", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/workspaces/api_op_CreateWorkspaces.go b/service/workspaces/api_op_CreateWorkspaces.go index e240deace56..a6c99635c05 100644 --- a/service/workspaces/api_op_CreateWorkspaces.go +++ b/service/workspaces/api_op_CreateWorkspaces.go @@ -24,6 +24,10 @@ import ( // // - User-decoupled WorkSpaces are only supported by Amazon WorkSpaces Core. // +// - Review your running mode to ensure you are using one that is optimal for +// your needs and budget. For more information on switching running modes, see [Can I switch between hourly and monthly billing?] +// +// [Can I switch between hourly and monthly billing?]: http://aws.amazon.com/workspaces-family/workspaces/faqs/#:~:text=Can%20I%20switch%20between%20hourly%20and%20monthly%20billing%20on%20WorkSpaces%20Personal%3F // [Amazon WorkSpaces Core]: http://aws.amazon.com/workspaces/core/ func (c *Client) CreateWorkspaces(ctx context.Context, params *CreateWorkspacesInput, optFns ...func(*Options)) (*CreateWorkspacesOutput, error) { if params == nil { diff --git a/service/workspaces/types/types.go b/service/workspaces/types/types.go index feb9d52f59c..e15751a0a22 100644 --- a/service/workspaces/types/types.go +++ b/service/workspaces/types/types.go @@ -177,8 +177,7 @@ type BundleResourceAssociation struct { // Describes the user capacity for a pool of WorkSpaces. type Capacity struct { - // The desired number of user sessions for a multi-session pool. This is not - // allowed for single-session pools. + // The desired number of user sessions for the WorkSpaces in the pool. // // This member is required. DesiredUserSessions *int32 @@ -189,19 +188,22 @@ type Capacity struct { // Describes the capacity status for a pool of WorkSpaces. type CapacityStatus struct { - // The number of user sessions currently being used for pool sessions. This only - // applies to multi-session pools. + // The number of user sessions currently being used for your pool. // // This member is required. ActiveUserSessions *int32 - // The total number of session slots that are available for a pool of WorkSpaces. + // The total number of user sessions that are available for streaming or are + // currently streaming in your pool. + // + // ActualUserSessions = AvailableUserSessions + ActiveUserSessions // // This member is required. ActualUserSessions *int32 - // The number of user sessions currently being used for pool sessions. This only - // applies to multi-session pools. + // The number of user sessions currently available for streaming from your pool. + // + // AvailableUserSessions = ActualUserSessions - ActiveUserSessions // // This member is required. AvailableUserSessions *int32 @@ -1641,7 +1643,11 @@ type WorkspaceProperties struct { // The MANUAL value is only supported by Amazon WorkSpaces Core. Contact your // account team to be allow-listed to use this value. For more information, see [Amazon WorkSpaces Core]. // + // Review your running mode to ensure you are using one that is optimal for your + // needs and budget. For more information on switching running modes, see [Can I switch between hourly and monthly billing?] + // // [Manage the WorkSpace Running Mode]: https://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html + // [Can I switch between hourly and monthly billing?]: http://aws.amazon.com/workspaces-family/workspaces/faqs/#:~:text=Can%20I%20switch%20between%20hourly%20and%20monthly%20billing%20on%20WorkSpaces%20Personal%3F // [Amazon WorkSpaces Core]: http://aws.amazon.com/workspaces/core/ RunningMode RunningMode