diff --git a/.changelog/564050c91eb74f20beb61de1c6c3c9e8.json b/.changelog/564050c91eb74f20beb61de1c6c3c9e8.json new file mode 100644 index 00000000000..9237077f746 --- /dev/null +++ b/.changelog/564050c91eb74f20beb61de1c6c3c9e8.json @@ -0,0 +1,8 @@ +{ + "id": "564050c9-1eb7-4f20-beb6-1de1c6c3c9e8", + "type": "feature", + "description": "Add \"disabled\" enum value to SpotInstanceState.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/8d1bd8416bc643a29f822e5a1a15a4fc.json b/.changelog/8d1bd8416bc643a29f822e5a1a15a4fc.json new file mode 100644 index 00000000000..92f8c5e5474 --- /dev/null +++ b/.changelog/8d1bd8416bc643a29f822e5a1a15a4fc.json @@ -0,0 +1,8 @@ +{ + "id": "8d1bd841-6bc6-43a2-9f82-2e5a1a15a4fc", + "type": "documentation", + "description": "Documentation updates for Amazon API Gateway.", + "modules": [ + "service/apigatewayv2" + ] +} \ No newline at end of file diff --git a/.changelog/acd6a7164c9144a49ca679b952664057.json b/.changelog/acd6a7164c9144a49ca679b952664057.json new file mode 100644 index 00000000000..0301e0ad4fa --- /dev/null +++ b/.changelog/acd6a7164c9144a49ca679b952664057.json @@ -0,0 +1,8 @@ +{ + "id": "acd6a716-4c91-44a4-9ca6-79b952664057", + "type": "feature", + "description": "This release introduces the new API 'GetSavingsPlanPurchaseRecommendationDetails', which retrieves the details for a Savings Plan recommendation. It also updates the existing API 'GetSavingsPlansPurchaseRecommendation' to include the recommendation detail ID.", + "modules": [ + "service/costexplorer" + ] +} \ No newline at end of file diff --git a/.changelog/c48a0ba610af4e0caca52f7ef64f3284.json b/.changelog/c48a0ba610af4e0caca52f7ef64f3284.json new file mode 100644 index 00000000000..4251fc47ce0 --- /dev/null +++ b/.changelog/c48a0ba610af4e0caca52f7ef64f3284.json @@ -0,0 +1,8 @@ +{ + "id": "c48a0ba6-10af-4e0c-aca5-2f7ef64f3284", + "type": "feature", + "description": "This release supports filtering by DRIFT_STATUS for existing API ListStackInstances and adds support for a new API ListStackInstanceResourceDrifts. Customers can now view resource drift information from their StackSet management accounts.", + "modules": [ + "service/cloudformation" + ] +} \ No newline at end of file diff --git a/.changelog/ec0efb17340343748e5522d2b68c2af0.json b/.changelog/ec0efb17340343748e5522d2b68c2af0.json new file mode 100644 index 00000000000..bcb446ebea0 --- /dev/null +++ b/.changelog/ec0efb17340343748e5522d2b68c2af0.json @@ -0,0 +1,8 @@ +{ + "id": "ec0efb17-3403-4374-8e55-22d2b68c2af0", + "type": "feature", + "description": "AWS Media Pipeline compositing enhancement and Media Insights Pipeline auto language identification.", + "modules": [ + "service/chimesdkmediapipelines" + ] +} \ No newline at end of file diff --git a/.changelog/ef10920fd2a6433e8edceeca9deb1887.json b/.changelog/ef10920fd2a6433e8edceeca9deb1887.json new file mode 100644 index 00000000000..4f83b0339a9 --- /dev/null +++ b/.changelog/ef10920fd2a6433e8edceeca9deb1887.json @@ -0,0 +1,8 @@ +{ + "id": "ef10920f-d2a6-433e-8edc-eeca9deb1887", + "type": "feature", + "description": "This release launches new Snapshot APIs for CSV and PDF exports, adds support for info icon for filters and parameters in Exploration APIs, adds modeled exception to the DeleteAccountCustomization API, and introduces AttributeAggregationFunction's ability to add UNIQUE_VALUE aggregation in tooltips.", + "modules": [ + "service/quicksight" + ] +} \ No newline at end of file diff --git a/.changelog/fb3a0c205c084f36bd91c99fc92ddbf0.json b/.changelog/fb3a0c205c084f36bd91c99fc92ddbf0.json new file mode 100644 index 00000000000..a38eb0d33e5 --- /dev/null +++ b/.changelog/fb3a0c205c084f36bd91c99fc92ddbf0.json @@ -0,0 +1,8 @@ +{ + "id": "fb3a0c20-5c08-4f36-bd91-c99fc92ddbf0", + "type": "feature", + "description": "Added support for Data Preparation Recipe node in Glue Studio jobs", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/service/apigatewayv2/api_op_CreateIntegration.go b/service/apigatewayv2/api_op_CreateIntegration.go index 54508ccbcbc..99bf6fa10f1 100644 --- a/service/apigatewayv2/api_op_CreateIntegration.go +++ b/service/apigatewayv2/api_op_CreateIntegration.go @@ -283,7 +283,7 @@ type CreateIntegrationOutput struct { // AWS_PROXY integrations. You can provide static values, or map request data, // stage variables, or context variables that are evaluated at runtime. To learn // more, see Working with AWS service integrations for HTTP APIs (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html) - // . For HTTP API itegrations, without a specified integrationSubtype request + // . For HTTP API integrations, without a specified integrationSubtype request // parameters are a key-value map specifying how to transform HTTP requests before // sending them to backend integrations. The key should follow the pattern // :.. The action can be append, diff --git a/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go b/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go index af0726380b8..d465417a912 100644 --- a/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go +++ b/service/apigatewayv2/api_op_DeleteRouteRequestParameter.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a route request parameter. +// Deletes a route request parameter. Supported only for WebSocket APIs. func (c *Client) DeleteRouteRequestParameter(ctx context.Context, params *DeleteRouteRequestParameterInput, optFns ...func(*Options)) (*DeleteRouteRequestParameterOutput, error) { if params == nil { params = &DeleteRouteRequestParameterInput{} diff --git a/service/apigatewayv2/api_op_GetIntegration.go b/service/apigatewayv2/api_op_GetIntegration.go index 7d7212bf8b4..28dbe38e46f 100644 --- a/service/apigatewayv2/api_op_GetIntegration.go +++ b/service/apigatewayv2/api_op_GetIntegration.go @@ -150,7 +150,7 @@ type GetIntegrationOutput struct { // AWS_PROXY integrations. You can provide static values, or map request data, // stage variables, or context variables that are evaluated at runtime. To learn // more, see Working with AWS service integrations for HTTP APIs (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html) - // . For HTTP API itegrations, without a specified integrationSubtype request + // . For HTTP API integrations, without a specified integrationSubtype request // parameters are a key-value map specifying how to transform HTTP requests before // sending them to backend integrations. The key should follow the pattern // :.. The action can be append, diff --git a/service/apigatewayv2/api_op_UpdateIntegration.go b/service/apigatewayv2/api_op_UpdateIntegration.go index 0a389b0d6b0..2e4d5a5ccc2 100644 --- a/service/apigatewayv2/api_op_UpdateIntegration.go +++ b/service/apigatewayv2/api_op_UpdateIntegration.go @@ -140,7 +140,7 @@ type UpdateIntegrationInput struct { // :. where action can be append, // overwrite or remove. For values, you can provide static values, or map request // data, stage variables, or context variables that are evaluated at runtime. To - // learn more, see Transforming API requests and responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.) + // learn more, see Transforming API requests and responses (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-parameter-mapping.html) // . RequestParameters map[string]string @@ -286,7 +286,7 @@ type UpdateIntegrationOutput struct { // AWS_PROXY integrations. You can provide static values, or map request data, // stage variables, or context variables that are evaluated at runtime. To learn // more, see Working with AWS service integrations for HTTP APIs (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html) - // . For HTTP API itegrations, without a specified integrationSubtype request + // . For HTTP API integrations, without a specified integrationSubtype request // parameters are a key-value map specifying how to transform HTTP requests before // sending them to backend integrations. The key should follow the pattern // :.. The action can be append, diff --git a/service/apigatewayv2/types/types.go b/service/apigatewayv2/types/types.go index d384bb1f8e5..fdbb2b2d6c6 100644 --- a/service/apigatewayv2/types/types.go +++ b/service/apigatewayv2/types/types.go @@ -434,7 +434,7 @@ type Integration struct { // AWS_PROXY integrations. You can provide static values, or map request data, // stage variables, or context variables that are evaluated at runtime. To learn // more, see Working with AWS service integrations for HTTP APIs (https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-aws-services.html) - // . For HTTP API itegrations, without a specified integrationSubtype request + // . For HTTP API integrations, without a specified integrationSubtype request // parameters are a key-value map specifying how to transform HTTP requests before // sending them to backend integrations. The key should follow the pattern // :.. The action can be append, diff --git a/service/applicationinsights/internal/endpoints/endpoints.go b/service/applicationinsights/internal/endpoints/endpoints.go index fdefb3647dd..0bddce3bc0f 100644 --- a/service/applicationinsights/internal/endpoints/endpoints.go +++ b/service/applicationinsights/internal/endpoints/endpoints.go @@ -157,6 +157,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, @@ -172,12 +175,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, @@ -187,6 +196,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go b/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go index db9ff47612a..010ebd0553b 100644 --- a/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go +++ b/service/chimesdkmediapipelines/api_op_CreateMediaInsightsPipeline.go @@ -49,7 +49,8 @@ type CreateMediaInsightsPipelineInput struct { // map of strings. MediaInsightsRuntimeMetadata map[string]string - // The runtime configuration for the S3 recording sink. + // The runtime configuration for the S3 recording sink. If specified, the settings + // in this structure override any settings in S3RecordingSinkConfiguration . S3RecordingSinkRuntimeConfiguration *types.S3RecordingSinkRuntimeConfiguration // The tags assigned to the media insights pipeline. diff --git a/service/chimesdkmediapipelines/deserializers.go b/service/chimesdkmediapipelines/deserializers.go index e00438e9085..96d164f6fa3 100644 --- a/service/chimesdkmediapipelines/deserializers.go +++ b/service/chimesdkmediapipelines/deserializers.go @@ -3161,6 +3161,46 @@ func awsRestjson1_deserializeErrorUnauthorizedClientException(response *smithyht return output } +func awsRestjson1_deserializeDocumentActiveSpeakerOnlyConfiguration(v **types.ActiveSpeakerOnlyConfiguration, 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.ActiveSpeakerOnlyConfiguration + if *v == nil { + sv = &types.ActiveSpeakerOnlyConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ActiveSpeakerPosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActiveSpeakerPosition to be of type string, got %T instead", value) + } + sv.ActiveSpeakerPosition = types.ActiveSpeakerPosition(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentAmazonTranscribeCallAnalyticsProcessorConfiguration(v **types.AmazonTranscribeCallAnalyticsProcessorConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3359,6 +3399,15 @@ func awsRestjson1_deserializeDocumentAmazonTranscribeProcessorConfiguration(v ** sv.FilterPartialResults = jtv } + case "IdentifyLanguage": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IdentifyLanguage = jtv + } + case "LanguageCode": if value != nil { jtv, ok := value.(string) @@ -3377,6 +3426,15 @@ func awsRestjson1_deserializeDocumentAmazonTranscribeProcessorConfiguration(v ** sv.LanguageModelName = ptr.String(jtv) } + case "LanguageOptions": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LanguageOptions to be of type string, got %T instead", value) + } + sv.LanguageOptions = ptr.String(jtv) + } + case "PartialResultsStability": if value != nil { jtv, ok := value.(string) @@ -3395,6 +3453,15 @@ func awsRestjson1_deserializeDocumentAmazonTranscribeProcessorConfiguration(v ** sv.PiiEntityTypes = ptr.String(jtv) } + case "PreferredLanguage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CallAnalyticsLanguageCode to be of type string, got %T instead", value) + } + sv.PreferredLanguage = types.CallAnalyticsLanguageCode(jtv) + } + case "ShowSpeakerLabel": if value != nil { jtv, ok := value.(bool) @@ -3422,6 +3489,15 @@ func awsRestjson1_deserializeDocumentAmazonTranscribeProcessorConfiguration(v ** sv.VocabularyFilterName = ptr.String(jtv) } + case "VocabularyFilterNames": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VocabularyFilterNames to be of type string, got %T instead", value) + } + sv.VocabularyFilterNames = ptr.String(jtv) + } + case "VocabularyName": if value != nil { jtv, ok := value.(string) @@ -3431,6 +3507,15 @@ func awsRestjson1_deserializeDocumentAmazonTranscribeProcessorConfiguration(v ** sv.VocabularyName = ptr.String(jtv) } + case "VocabularyNames": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VocabularyNames to be of type string, got %T instead", value) + } + sv.VocabularyNames = ptr.String(jtv) + } + default: _, _ = key, value @@ -4590,6 +4675,20 @@ func awsRestjson1_deserializeDocumentGridViewConfiguration(v **types.GridViewCon for key, value := range shape { switch key { + case "ActiveSpeakerOnlyConfiguration": + if err := awsRestjson1_deserializeDocumentActiveSpeakerOnlyConfiguration(&sv.ActiveSpeakerOnlyConfiguration, value); err != nil { + return err + } + + case "CanvasOrientation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CanvasOrientation to be of type string, got %T instead", value) + } + sv.CanvasOrientation = types.CanvasOrientation(jtv) + } + case "ContentShareLayout": if value != nil { jtv, ok := value.(string) @@ -4599,11 +4698,97 @@ func awsRestjson1_deserializeDocumentGridViewConfiguration(v **types.GridViewCon sv.ContentShareLayout = types.ContentShareLayoutOption(jtv) } + case "HorizontalLayoutConfiguration": + if err := awsRestjson1_deserializeDocumentHorizontalLayoutConfiguration(&sv.HorizontalLayoutConfiguration, value); err != nil { + return err + } + case "PresenterOnlyConfiguration": if err := awsRestjson1_deserializeDocumentPresenterOnlyConfiguration(&sv.PresenterOnlyConfiguration, value); err != nil { return err } + case "VerticalLayoutConfiguration": + if err := awsRestjson1_deserializeDocumentVerticalLayoutConfiguration(&sv.VerticalLayoutConfiguration, value); err != nil { + return err + } + + case "VideoAttribute": + if err := awsRestjson1_deserializeDocumentVideoAttribute(&sv.VideoAttribute, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentHorizontalLayoutConfiguration(v **types.HorizontalLayoutConfiguration, 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.HorizontalLayoutConfiguration + if *v == nil { + sv = &types.HorizontalLayoutConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TileAspectRatio": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TileAspectRatio to be of type string, got %T instead", value) + } + sv.TileAspectRatio = ptr.String(jtv) + } + + case "TileCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TileCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TileCount = ptr.Int32(int32(i64)) + } + + case "TileOrder": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TileOrder to be of type string, got %T instead", value) + } + sv.TileOrder = types.TileOrder(jtv) + } + + case "TilePosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HorizontalTilePosition to be of type string, got %T instead", value) + } + sv.TilePosition = types.HorizontalTilePosition(jtv) + } + default: _, _ = key, value @@ -7541,6 +7726,77 @@ func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.Unaut return nil } +func awsRestjson1_deserializeDocumentVerticalLayoutConfiguration(v **types.VerticalLayoutConfiguration, 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.VerticalLayoutConfiguration + if *v == nil { + sv = &types.VerticalLayoutConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TileAspectRatio": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TileAspectRatio to be of type string, got %T instead", value) + } + sv.TileAspectRatio = ptr.String(jtv) + } + + case "TileCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TileCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TileCount = ptr.Int32(int32(i64)) + } + + case "TileOrder": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TileOrder to be of type string, got %T instead", value) + } + sv.TileOrder = types.TileOrder(jtv) + } + + case "TilePosition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VerticalTilePosition to be of type string, got %T instead", value) + } + sv.TilePosition = types.VerticalTilePosition(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentVideoArtifactsConfiguration(v **types.VideoArtifactsConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7590,6 +7846,81 @@ func awsRestjson1_deserializeDocumentVideoArtifactsConfiguration(v **types.Video return nil } +func awsRestjson1_deserializeDocumentVideoAttribute(v **types.VideoAttribute, 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.VideoAttribute + if *v == nil { + sv = &types.VideoAttribute{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BorderColor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BorderColor to be of type string, got %T instead", value) + } + sv.BorderColor = types.BorderColor(jtv) + } + + case "BorderThickness": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected BorderThickness to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BorderThickness = ptr.Int32(int32(i64)) + } + + case "CornerRadius": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CornerRadius to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CornerRadius = ptr.Int32(int32(i64)) + } + + case "HighlightColor": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HighlightColor to be of type string, got %T instead", value) + } + sv.HighlightColor = types.HighlightColor(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentVideoConcatenationConfiguration(v **types.VideoConcatenationConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/chimesdkmediapipelines/serializers.go b/service/chimesdkmediapipelines/serializers.go index 193dc7e3299..f4c59a0e74a 100644 --- a/service/chimesdkmediapipelines/serializers.go +++ b/service/chimesdkmediapipelines/serializers.go @@ -1400,6 +1400,18 @@ func awsRestjson1_serializeOpDocumentUpdateMediaInsightsPipelineStatusInput(v *U return nil } +func awsRestjson1_serializeDocumentActiveSpeakerOnlyConfiguration(v *types.ActiveSpeakerOnlyConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ActiveSpeakerPosition) > 0 { + ok := object.Key("ActiveSpeakerPosition") + ok.String(string(v.ActiveSpeakerPosition)) + } + + return nil +} + func awsRestjson1_serializeDocumentAmazonTranscribeCallAnalyticsProcessorConfiguration(v *types.AmazonTranscribeCallAnalyticsProcessorConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1500,6 +1512,11 @@ func awsRestjson1_serializeDocumentAmazonTranscribeProcessorConfiguration(v *typ ok.Boolean(v.FilterPartialResults) } + if v.IdentifyLanguage { + ok := object.Key("IdentifyLanguage") + ok.Boolean(v.IdentifyLanguage) + } + if len(v.LanguageCode) > 0 { ok := object.Key("LanguageCode") ok.String(string(v.LanguageCode)) @@ -1510,6 +1527,11 @@ func awsRestjson1_serializeDocumentAmazonTranscribeProcessorConfiguration(v *typ ok.String(*v.LanguageModelName) } + if v.LanguageOptions != nil { + ok := object.Key("LanguageOptions") + ok.String(*v.LanguageOptions) + } + if len(v.PartialResultsStability) > 0 { ok := object.Key("PartialResultsStability") ok.String(string(v.PartialResultsStability)) @@ -1520,6 +1542,11 @@ func awsRestjson1_serializeDocumentAmazonTranscribeProcessorConfiguration(v *typ ok.String(*v.PiiEntityTypes) } + if len(v.PreferredLanguage) > 0 { + ok := object.Key("PreferredLanguage") + ok.String(string(v.PreferredLanguage)) + } + if v.ShowSpeakerLabel { ok := object.Key("ShowSpeakerLabel") ok.Boolean(v.ShowSpeakerLabel) @@ -1535,11 +1562,21 @@ func awsRestjson1_serializeDocumentAmazonTranscribeProcessorConfiguration(v *typ ok.String(*v.VocabularyFilterName) } + if v.VocabularyFilterNames != nil { + ok := object.Key("VocabularyFilterNames") + ok.String(*v.VocabularyFilterNames) + } + if v.VocabularyName != nil { ok := object.Key("VocabularyName") ok.String(*v.VocabularyName) } + if v.VocabularyNames != nil { + ok := object.Key("VocabularyNames") + ok.String(*v.VocabularyNames) + } + return nil } @@ -1951,11 +1988,30 @@ func awsRestjson1_serializeDocumentGridViewConfiguration(v *types.GridViewConfig object := value.Object() defer object.Close() + if v.ActiveSpeakerOnlyConfiguration != nil { + ok := object.Key("ActiveSpeakerOnlyConfiguration") + if err := awsRestjson1_serializeDocumentActiveSpeakerOnlyConfiguration(v.ActiveSpeakerOnlyConfiguration, ok); err != nil { + return err + } + } + + if len(v.CanvasOrientation) > 0 { + ok := object.Key("CanvasOrientation") + ok.String(string(v.CanvasOrientation)) + } + if len(v.ContentShareLayout) > 0 { ok := object.Key("ContentShareLayout") ok.String(string(v.ContentShareLayout)) } + if v.HorizontalLayoutConfiguration != nil { + ok := object.Key("HorizontalLayoutConfiguration") + if err := awsRestjson1_serializeDocumentHorizontalLayoutConfiguration(v.HorizontalLayoutConfiguration, ok); err != nil { + return err + } + } + if v.PresenterOnlyConfiguration != nil { ok := object.Key("PresenterOnlyConfiguration") if err := awsRestjson1_serializeDocumentPresenterOnlyConfiguration(v.PresenterOnlyConfiguration, ok); err != nil { @@ -1963,6 +2019,47 @@ func awsRestjson1_serializeDocumentGridViewConfiguration(v *types.GridViewConfig } } + if v.VerticalLayoutConfiguration != nil { + ok := object.Key("VerticalLayoutConfiguration") + if err := awsRestjson1_serializeDocumentVerticalLayoutConfiguration(v.VerticalLayoutConfiguration, ok); err != nil { + return err + } + } + + if v.VideoAttribute != nil { + ok := object.Key("VideoAttribute") + if err := awsRestjson1_serializeDocumentVideoAttribute(v.VideoAttribute, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentHorizontalLayoutConfiguration(v *types.HorizontalLayoutConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TileAspectRatio != nil { + ok := object.Key("TileAspectRatio") + ok.String(*v.TileAspectRatio) + } + + if v.TileCount != nil { + ok := object.Key("TileCount") + ok.Integer(*v.TileCount) + } + + if len(v.TileOrder) > 0 { + ok := object.Key("TileOrder") + ok.String(string(v.TileOrder)) + } + + if len(v.TilePosition) > 0 { + ok := object.Key("TilePosition") + ok.String(string(v.TilePosition)) + } + return nil } @@ -2673,6 +2770,33 @@ func awsRestjson1_serializeDocumentTranscriptionMessagesConcatenationConfigurati return nil } +func awsRestjson1_serializeDocumentVerticalLayoutConfiguration(v *types.VerticalLayoutConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TileAspectRatio != nil { + ok := object.Key("TileAspectRatio") + ok.String(*v.TileAspectRatio) + } + + if v.TileCount != nil { + ok := object.Key("TileCount") + ok.Integer(*v.TileCount) + } + + if len(v.TileOrder) > 0 { + ok := object.Key("TileOrder") + ok.String(string(v.TileOrder)) + } + + if len(v.TilePosition) > 0 { + ok := object.Key("TilePosition") + ok.String(string(v.TilePosition)) + } + + return nil +} + func awsRestjson1_serializeDocumentVideoArtifactsConfiguration(v *types.VideoArtifactsConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2690,6 +2814,33 @@ func awsRestjson1_serializeDocumentVideoArtifactsConfiguration(v *types.VideoArt return nil } +func awsRestjson1_serializeDocumentVideoAttribute(v *types.VideoAttribute, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.BorderColor) > 0 { + ok := object.Key("BorderColor") + ok.String(string(v.BorderColor)) + } + + if v.BorderThickness != nil { + ok := object.Key("BorderThickness") + ok.Integer(*v.BorderThickness) + } + + if v.CornerRadius != nil { + ok := object.Key("CornerRadius") + ok.Integer(*v.CornerRadius) + } + + if len(v.HighlightColor) > 0 { + ok := object.Key("HighlightColor") + ok.String(string(v.HighlightColor)) + } + + return nil +} + func awsRestjson1_serializeDocumentVideoConcatenationConfiguration(v *types.VideoConcatenationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/chimesdkmediapipelines/types/enums.go b/service/chimesdkmediapipelines/types/enums.go index 540556e75e1..deb129aab84 100644 --- a/service/chimesdkmediapipelines/types/enums.go +++ b/service/chimesdkmediapipelines/types/enums.go @@ -2,6 +2,28 @@ package types +type ActiveSpeakerPosition string + +// Enum values for ActiveSpeakerPosition +const ( + ActiveSpeakerPositionTopLeft ActiveSpeakerPosition = "TopLeft" + ActiveSpeakerPositionTopRight ActiveSpeakerPosition = "TopRight" + ActiveSpeakerPositionBottomLeft ActiveSpeakerPosition = "BottomLeft" + ActiveSpeakerPositionBottomRight ActiveSpeakerPosition = "BottomRight" +) + +// Values returns all known values for ActiveSpeakerPosition. 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 (ActiveSpeakerPosition) Values() []ActiveSpeakerPosition { + return []ActiveSpeakerPosition{ + "TopLeft", + "TopRight", + "BottomLeft", + "BottomRight", + } +} + type ArtifactsConcatenationState string // Enum values for ArtifactsConcatenationState @@ -93,6 +115,32 @@ func (AudioMuxType) Values() []AudioMuxType { } } +type BorderColor string + +// Enum values for BorderColor +const ( + BorderColorBlack BorderColor = "Black" + BorderColorBlue BorderColor = "Blue" + BorderColorRed BorderColor = "Red" + BorderColorGreen BorderColor = "Green" + BorderColorWhite BorderColor = "White" + BorderColorYellow BorderColor = "Yellow" +) + +// Values returns all known values for BorderColor. 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 (BorderColor) Values() []BorderColor { + return []BorderColor{ + "Black", + "Blue", + "Red", + "Green", + "White", + "Yellow", + } +} + type CallAnalyticsLanguageCode string // Enum values for CallAnalyticsLanguageCode @@ -125,6 +173,24 @@ func (CallAnalyticsLanguageCode) Values() []CallAnalyticsLanguageCode { } } +type CanvasOrientation string + +// Enum values for CanvasOrientation +const ( + CanvasOrientationLandscape CanvasOrientation = "Landscape" + CanvasOrientationPortrait CanvasOrientation = "Portrait" +) + +// Values returns all known values for CanvasOrientation. 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 (CanvasOrientation) Values() []CanvasOrientation { + return []CanvasOrientation{ + "Landscape", + "Portrait", + } +} + type ConcatenationSinkType string // Enum values for ConcatenationSinkType @@ -195,9 +261,10 @@ type ContentShareLayoutOption string // Enum values for ContentShareLayoutOption const ( - ContentShareLayoutOptionPresenterOnly ContentShareLayoutOption = "PresenterOnly" - ContentShareLayoutOptionHorizontal ContentShareLayoutOption = "Horizontal" - ContentShareLayoutOptionVertical ContentShareLayoutOption = "Vertical" + ContentShareLayoutOptionPresenterOnly ContentShareLayoutOption = "PresenterOnly" + ContentShareLayoutOptionHorizontal ContentShareLayoutOption = "Horizontal" + ContentShareLayoutOptionVertical ContentShareLayoutOption = "Vertical" + ContentShareLayoutOptionActiveSpeakerOnly ContentShareLayoutOption = "ActiveSpeakerOnly" ) // Values returns all known values for ContentShareLayoutOption. Note that this @@ -208,6 +275,7 @@ func (ContentShareLayoutOption) Values() []ContentShareLayoutOption { "PresenterOnly", "Horizontal", "Vertical", + "ActiveSpeakerOnly", } } @@ -273,6 +341,50 @@ func (FragmentSelectorType) Values() []FragmentSelectorType { } } +type HighlightColor string + +// Enum values for HighlightColor +const ( + HighlightColorBlack HighlightColor = "Black" + HighlightColorBlue HighlightColor = "Blue" + HighlightColorRed HighlightColor = "Red" + HighlightColorGreen HighlightColor = "Green" + HighlightColorWhite HighlightColor = "White" + HighlightColorYellow HighlightColor = "Yellow" +) + +// Values returns all known values for HighlightColor. 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 (HighlightColor) Values() []HighlightColor { + return []HighlightColor{ + "Black", + "Blue", + "Red", + "Green", + "White", + "Yellow", + } +} + +type HorizontalTilePosition string + +// Enum values for HorizontalTilePosition +const ( + HorizontalTilePositionTop HorizontalTilePosition = "Top" + HorizontalTilePositionBottom HorizontalTilePosition = "Bottom" +) + +// Values returns all known values for HorizontalTilePosition. 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 (HorizontalTilePosition) Values() []HorizontalTilePosition { + return []HorizontalTilePosition{ + "Top", + "Bottom", + } +} + type LayoutOption string // Enum values for LayoutOption @@ -594,6 +706,42 @@ func (SentimentType) Values() []SentimentType { } } +type TileOrder string + +// Enum values for TileOrder +const ( + TileOrderJoinSequence TileOrder = "JoinSequence" + TileOrderSpeakerSequence TileOrder = "SpeakerSequence" +) + +// Values returns all known values for TileOrder. 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 (TileOrder) Values() []TileOrder { + return []TileOrder{ + "JoinSequence", + "SpeakerSequence", + } +} + +type VerticalTilePosition string + +// Enum values for VerticalTilePosition +const ( + VerticalTilePositionLeft VerticalTilePosition = "Left" + VerticalTilePositionRight VerticalTilePosition = "Right" +) + +// Values returns all known values for VerticalTilePosition. 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 (VerticalTilePosition) Values() []VerticalTilePosition { + return []VerticalTilePosition{ + "Left", + "Right", + } +} + type VideoMuxType string // Enum values for VideoMuxType diff --git a/service/chimesdkmediapipelines/types/types.go b/service/chimesdkmediapipelines/types/types.go index aaf4bd66b74..ced273b20cb 100644 --- a/service/chimesdkmediapipelines/types/types.go +++ b/service/chimesdkmediapipelines/types/types.go @@ -7,6 +7,15 @@ import ( "time" ) +// Defines the configuration for an ActiveSpeakerOnly video tile. +type ActiveSpeakerOnlyConfiguration struct { + + // The position of the ActiveSpeakerOnly video tile. + ActiveSpeakerPosition ActiveSpeakerPosition + + noSmithyDocumentSerde +} + // A structure that contains the configuration settings for an Amazon Transcribe // call analytics processor. type AmazonTranscribeCallAnalyticsProcessorConfiguration struct { @@ -110,15 +119,6 @@ type AmazonTranscribeCallAnalyticsProcessorConfiguration struct { // processor. type AmazonTranscribeProcessorConfiguration struct { - // The language code that represents the language spoken in your audio. If you're - // unsure of the language spoken in your audio, consider using IdentifyLanguage to - // enable automatic language identification. For a list of languages that real-time - // Call Analytics supports, see the Supported languages table (https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) - // in the Amazon Transcribe Developer Guide. - // - // This member is required. - LanguageCode CallAnalyticsLanguageCode - // Labels all personally identifiable information (PII) identified in your // transcript. Content identification is performed at the segment level; PII // specified in PiiEntityTypes is flagged upon complete transcription of an audio @@ -148,6 +148,16 @@ type AmazonTranscribeProcessorConfiguration struct { // target. FilterPartialResults bool + // Turns language identification on or off. + IdentifyLanguage bool + + // The language code that represents the language spoken in your audio. If you're + // unsure of the language spoken in your audio, consider using IdentifyLanguage to + // enable automatic language identification. For a list of languages that real-time + // Call Analytics supports, see the Supported languages table (https://docs.aws.amazon.com/transcribe/latest/dg/supported-languages.html) + // in the Amazon Transcribe Developer Guide. + LanguageCode CallAnalyticsLanguageCode + // The name of the custom language model that you want to use when processing your // transcription. Note that language model names are case sensitive. The language // of the specified language model must match the language code you specify in your @@ -157,6 +167,10 @@ type AmazonTranscribeProcessorConfiguration struct { // in the Amazon Transcribe Developer Guide. LanguageModelName *string + // The language options for the transcription, such as automatic language + // detection. + LanguageOptions *string + // The level of stability to use when you enable partial results stabilization ( // EnablePartialResultsStabilization ). Low stability provides the highest // accuracy. High stability transcribes faster, but with slightly lower accuracy. @@ -174,6 +188,9 @@ type AmazonTranscribeProcessorConfiguration struct { // the default behavior is equivalent to ALL . PiiEntityTypes *string + // The preferred language for the transcription. + PreferredLanguage CallAnalyticsLanguageCode + // Enables speaker partitioning (diarization) in your transcription output. // Speaker partitioning labels the speech from individual speakers in your media // file. For more information, see Partitioning speakers (diarization) (https://docs.aws.amazon.com/transcribe/latest/dg/diarization.html) @@ -188,10 +205,16 @@ type AmazonTranscribeProcessorConfiguration struct { // 200. VocabularyFilterName *string + // The names of the custom vocabulary filter or filters using during transcription. + VocabularyFilterNames *string + // The name of the custom vocabulary that you specified in your Call Analytics // request. Length Constraints: Minimum length of 1. Maximum length of 200. VocabularyName *string + // The names of the custom vocabulary or vocabularies used during transcription. + VocabularyNames *string + noSmithyDocumentSerde } @@ -478,9 +501,42 @@ type GridViewConfiguration struct { // This member is required. ContentShareLayout ContentShareLayoutOption + // The configuration settings for an ActiveSpeakerOnly video tile. + ActiveSpeakerOnlyConfiguration *ActiveSpeakerOnlyConfiguration + + // The orientation setting, horizontal or vertical. + CanvasOrientation CanvasOrientation + + // The configuration settings for a horizontal layout. + HorizontalLayoutConfiguration *HorizontalLayoutConfiguration + // Defines the configuration options for a presenter only video tile. PresenterOnlyConfiguration *PresenterOnlyConfiguration + // The configuration settings for a vertical layout. + VerticalLayoutConfiguration *VerticalLayoutConfiguration + + // The attribute settings for the video tiles. + VideoAttribute *VideoAttribute + + noSmithyDocumentSerde +} + +// Defines the configuration settings for the horizontal layout. +type HorizontalLayoutConfiguration struct { + + // Sets the aspect ratio of the video tiles, such as 16:9. + TileAspectRatio *string + + // The maximum number of video tiles to display. + TileCount *int32 + + // Sets the automatic ordering of the video tiles. + TileOrder TileOrder + + // Sets the position of horizontal tiles. + TilePosition HorizontalTilePosition + noSmithyDocumentSerde } @@ -1186,6 +1242,24 @@ type TranscriptionMessagesConcatenationConfiguration struct { noSmithyDocumentSerde } +// Defines the configuration settings for a vertial layout. +type VerticalLayoutConfiguration struct { + + // Sets the aspect ratio of the video tiles, such as 16:9. + TileAspectRatio *string + + // The maximum number of tiles to display. + TileCount *int32 + + // Sets the automatic ordering of the video tiles. + TileOrder TileOrder + + // Sets the position of vertical tiles. + TilePosition VerticalTilePosition + + noSmithyDocumentSerde +} + // The video artifact configuration object. type VideoArtifactsConfiguration struct { @@ -1200,6 +1274,24 @@ type VideoArtifactsConfiguration struct { noSmithyDocumentSerde } +// Defines the settings for a video tile. +type VideoAttribute struct { + + // Defines the border color of all video tiles. + BorderColor BorderColor + + // Defines the border thickness for all video tiles. + BorderThickness *int32 + + // Sets the corner radius of all video tiles. + CornerRadius *int32 + + // Defines the highlight color for the active video tile. + HighlightColor HighlightColor + + noSmithyDocumentSerde +} + // The configuration object of a video concatenation pipeline. type VideoConcatenationConfiguration struct { diff --git a/service/chimesdkmediapipelines/validators.go b/service/chimesdkmediapipelines/validators.go index 0dfe4d22b6d..a27c4904c89 100644 --- a/service/chimesdkmediapipelines/validators.go +++ b/service/chimesdkmediapipelines/validators.go @@ -414,21 +414,6 @@ func validateAmazonTranscribeCallAnalyticsProcessorConfiguration(v *types.Amazon } } -func validateAmazonTranscribeProcessorConfiguration(v *types.AmazonTranscribeProcessorConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AmazonTranscribeProcessorConfiguration"} - if len(v.LanguageCode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - func validateArtifactsConcatenationConfiguration(v *types.ArtifactsConcatenationConfiguration) error { if v == nil { return nil @@ -1048,11 +1033,6 @@ func validateMediaInsightsPipelineConfigurationElement(v *types.MediaInsightsPip invalidParams.AddNested("AmazonTranscribeCallAnalyticsProcessorConfiguration", err.(smithy.InvalidParamsError)) } } - if v.AmazonTranscribeProcessorConfiguration != nil { - if err := validateAmazonTranscribeProcessorConfiguration(v.AmazonTranscribeProcessorConfiguration); err != nil { - invalidParams.AddNested("AmazonTranscribeProcessorConfiguration", err.(smithy.InvalidParamsError)) - } - } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/cloudformation/api_op_CreateChangeSet.go b/service/cloudformation/api_op_CreateChangeSet.go index 58715fce8df..a1af226b5ce 100644 --- a/service/cloudformation/api_op_CreateChangeSet.go +++ b/service/cloudformation/api_op_CreateChangeSet.go @@ -87,7 +87,7 @@ type CreateChangeSetInput struct { // - AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) // - AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // For more information, see Acknowledging IAM resources in CloudFormation - // templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) // . // - CAPABILITY_AUTO_EXPAND Some template contain macros. Macros perform custom // processing on templates; this can include simple actions like find-and-replace @@ -97,15 +97,15 @@ type CreateChangeSetInput struct { // actually creating the stack. If your stack template contains one or more macros, // and you choose to create a stack directly from the processed template, without // first reviewing the resulting changes in a change set, you must acknowledge this - // capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // capability. This includes the AWS::Include (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) // transforms, which are macros hosted by CloudFormation. This capacity doesn't // apply to creating change sets, and specifying it when creating change sets has // no effect. If you want to create a stack from a stack template that contains // macros and nested stacks, you must create or update the stack directly from the // template using the CreateStack or UpdateStack action, and specifying this // capability. For more information about macros, see Using CloudFormation - // macros to perform custom processing on templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) + // macros to perform custom processing on templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) // . Capabilities []types.Capability diff --git a/service/cloudformation/api_op_CreateStack.go b/service/cloudformation/api_op_CreateStack.go index 942cbe5ab61..820a78902ee 100644 --- a/service/cloudformation/api_op_CreateStack.go +++ b/service/cloudformation/api_op_CreateStack.go @@ -63,7 +63,7 @@ type CreateStackInput struct { // - AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) // - AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // For more information, see Acknowledging IAM Resources in CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) // . // - CAPABILITY_AUTO_EXPAND Some template contain macros. Macros perform custom // processing on templates; this can include simple actions like find-and-replace @@ -73,8 +73,8 @@ type CreateStackInput struct { // actually creating the stack. If your stack template contains one or more macros, // and you choose to create a stack directly from the processed template, without // first reviewing the resulting changes in a change set, you must acknowledge this - // capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // capability. This includes the AWS::Include (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) // transforms, which are macros hosted by CloudFormation. If you want to create a // stack from a stack template that contains macros and nested stacks, you must // create the stack directly from the template using this capability. You should @@ -83,7 +83,7 @@ type CreateStackInput struct { // Lambda service function for processing stack templates. Be aware that the Lambda // function owner can update the function operation without CloudFormation being // notified. For more information, see Using CloudFormation macros to perform - // custom processing on templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) + // custom processing on templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) // . Capabilities []types.Capability @@ -109,9 +109,9 @@ type CreateStackInput struct { // Whether to enable termination protection on the specified stack. If a user // attempts to delete a stack with termination protection enabled, the operation // fails and the stack remains unchanged. For more information, see Protecting a - // Stack From Being Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) + // Stack From Being Deleted (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) // in the CloudFormation User Guide. Termination protection is deactivated on - // stacks by default. For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // stacks by default. For nested stacks (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) // , termination protection is set on the root stack and can't be changed directly // on the nested stack. EnableTerminationProtection *bool diff --git a/service/cloudformation/api_op_CreateStackSet.go b/service/cloudformation/api_op_CreateStackSet.go index 0ac5fa170b8..272a5494409 100644 --- a/service/cloudformation/api_op_CreateStackSet.go +++ b/service/cloudformation/api_op_CreateStackSet.go @@ -42,7 +42,7 @@ type CreateStackSetInput struct { // Specify an IAM role only if you are using customized administrator roles to // control which users or groups can manage specific stack sets within the same // administrator account. For more information, see Prerequisites: Granting - // Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // Permissions for Stack Set Operations (https://docs.aws.amazon.com/AWSCloudFormation/stacksets-prereqs.html) // in the CloudFormation User Guide. AdministrationRoleARN *string @@ -90,17 +90,17 @@ type CreateStackSetInput struct { // - AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) // - AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // For more information, see Acknowledging IAM Resources in CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (https://docs.aws.amazon.com/AWSCloudFormation/using-iam-template.html#capabilities) // . // - CAPABILITY_AUTO_EXPAND Some templates reference macros. If your stack set // template references one or more macros, you must create the stack set directly // from the processed template, without first reviewing the resulting changes in a // change set. To create the stack set directly, you must acknowledge this // capability. For more information, see Using CloudFormation Macros to Perform - // Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) + // Custom Processing on Templates (https://docs.aws.amazon.com/AWSCloudFormation/template-macros.html) // . Stack sets with service-managed permissions don't currently support the use of - // macros in templates. (This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // macros in templates. (This includes the AWS::Include (https://docs.aws.amazon.com/AWSCloudFormation/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (https://docs.aws.amazon.com/AWSCloudFormation/transform-aws-serverless.html) // transforms, which are macros hosted by CloudFormation.) Even if you specify this // capability for a stack set with service-managed permissions, if you reference a // macro in your template the stack set operation will fail. diff --git a/service/cloudformation/api_op_ListStackInstanceResourceDrifts.go b/service/cloudformation/api_op_ListStackInstanceResourceDrifts.go new file mode 100644 index 00000000000..37458a0a752 --- /dev/null +++ b/service/cloudformation/api_op_ListStackInstanceResourceDrifts.go @@ -0,0 +1,187 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cloudformation + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/cloudformation/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns drift information for resources in a stack instance. +// ListStackInstanceResourceDrifts returns drift information for the most recent +// drift detection operation. If an operation is in progress, it may only return +// partial results. +func (c *Client) ListStackInstanceResourceDrifts(ctx context.Context, params *ListStackInstanceResourceDriftsInput, optFns ...func(*Options)) (*ListStackInstanceResourceDriftsOutput, error) { + if params == nil { + params = &ListStackInstanceResourceDriftsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListStackInstanceResourceDrifts", params, optFns, c.addOperationListStackInstanceResourceDriftsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListStackInstanceResourceDriftsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListStackInstanceResourceDriftsInput struct { + + // The unique ID of the drift operation. + // + // This member is required. + OperationId *string + + // The name of the Amazon Web Services account that you want to list resource + // drifts for. + // + // This member is required. + StackInstanceAccount *string + + // The name of the Region where you want to list resource drifts. + // + // This member is required. + StackInstanceRegion *string + + // The name or unique ID of the stack set that you want to list drifted resources + // for. + // + // This member is required. + StackSetName *string + + // [Service-managed permissions] Specifies whether you are acting as an account + // administrator in the organization's management account or as a delegated + // administrator in a member account. By default, SELF is specified. Use SELF for + // stack sets with self-managed permissions. + // - If you are signed in to the management account, specify SELF . + // - If you are signed in to a delegated administrator account, specify + // DELEGATED_ADMIN . Your Amazon Web Services account must be registered as a + // delegated administrator in the management account. For more information, see + // Register a delegated administrator (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-orgs-delegated-admin.html) + // in the CloudFormation User Guide. + CallAs types.CallAs + + // The maximum number of results to be returned with a single call. If the number + // of available results exceeds this maximum, the response includes a NextToken + // value that you can assign to the NextToken request parameter to get the next + // set of results. + MaxResults *int32 + + // If the previous paginated request didn't return all of the remaining results, + // the response object's NextToken parameter value is set to a token. To retrieve + // the next set of results, call this action again and assign that token to the + // request object's NextToken parameter. If there are no remaining results, the + // previous response object's NextToken parameter is set to null . + NextToken *string + + // The resource drift status of the stack instance. + // - DELETED : The resource differs from its expected template configuration in + // that the resource has been deleted. + // - MODIFIED : One or more resource properties differ from their expected + // template values. + // - IN_SYNC : The resource's actual configuration matches its expected template + // configuration. + // - NOT_CHECKED : CloudFormation doesn't currently return this value. + StackInstanceResourceDriftStatuses []types.StackResourceDriftStatus + + noSmithyDocumentSerde +} + +type ListStackInstanceResourceDriftsOutput struct { + + // If the previous paginated request didn't return all of the remaining results, + // the response object's NextToken parameter value is set to a token. To retrieve + // the next set of results, call this action again and assign that token to the + // request object's NextToken parameter. If there are no remaining results, the + // previous response object's NextToken parameter is set to null . + NextToken *string + + // A list of StackInstanceResourceDriftSummary structures that contain information + // about the specified stack instances. + Summaries []types.StackInstanceResourceDriftsSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListStackInstanceResourceDriftsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpListStackInstanceResourceDrifts{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpListStackInstanceResourceDrifts{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpListStackInstanceResourceDriftsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStackInstanceResourceDrifts(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opListStackInstanceResourceDrifts(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cloudformation", + OperationName: "ListStackInstanceResourceDrifts", + } +} diff --git a/service/cloudformation/api_op_UpdateStack.go b/service/cloudformation/api_op_UpdateStack.go index 2c82aa89223..d552653a276 100644 --- a/service/cloudformation/api_op_UpdateStack.go +++ b/service/cloudformation/api_op_UpdateStack.go @@ -64,7 +64,7 @@ type UpdateStackInput struct { // - AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) // - AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // For more information, see Acknowledging IAM Resources in CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) // . // - CAPABILITY_AUTO_EXPAND Some template contain macros. Macros perform custom // processing on templates; this can include simple actions like find-and-replace @@ -74,8 +74,8 @@ type UpdateStackInput struct { // actually updating the stack. If your stack template contains one or more macros, // and you choose to update a stack directly from the processed template, without // first reviewing the resulting changes in a change set, you must acknowledge this - // capability. This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // capability. This includes the AWS::Include (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) // transforms, which are macros hosted by CloudFormation. If you want to update a // stack from a stack template that contains macros and nested stacks, you must // update the stack directly from the template using this capability. You should @@ -84,7 +84,7 @@ type UpdateStackInput struct { // Lambda service function for processing stack templates. Be aware that the Lambda // function owner can update the function operation without CloudFormation being // notified. For more information, see Using CloudFormation Macros to Perform - // Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) + // Custom Processing on Templates (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) // . Capabilities []types.Capability diff --git a/service/cloudformation/api_op_UpdateStackSet.go b/service/cloudformation/api_op_UpdateStackSet.go index f01c070299a..3b2d63d8e61 100644 --- a/service/cloudformation/api_op_UpdateStackSet.go +++ b/service/cloudformation/api_op_UpdateStackSet.go @@ -58,7 +58,7 @@ type UpdateStackSetInput struct { // Specify an IAM role only if you are using customized administrator roles to // control which users or groups can manage specific stack sets within the same // administrator account. For more information, see Granting Permissions for Stack - // Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // Set Operations (https://docs.aws.amazon.com/AWSCloudFormation/stacksets-prereqs.html) // in the CloudFormation User Guide. If you specified a customized administrator // role when you created the stack set, you must specify a customized administrator // role, even if it is the same customized administrator role used with this stack @@ -107,17 +107,17 @@ type UpdateStackSetInput struct { // - AWS::IAM::User (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html) // - AWS::IAM::UserToGroupAddition (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html) // For more information, see Acknowledging IAM Resources in CloudFormation - // Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-template.html#capabilities) + // Templates (https://docs.aws.amazon.com/AWSCloudFormation/using-iam-template.html#capabilities) // . // - CAPABILITY_AUTO_EXPAND Some templates reference macros. If your stack set // template references one or more macros, you must update the stack set directly // from the processed template, without first reviewing the resulting changes in a // change set. To update the stack set directly, you must acknowledge this // capability. For more information, see Using CloudFormation Macros to Perform - // Custom Processing on Templates (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-macros.html) + // Custom Processing on Templates (https://docs.aws.amazon.com/AWSCloudFormation/template-macros.html) // . Stack sets with service-managed permissions do not currently support the use - // of macros in templates. (This includes the AWS::Include (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) - // and AWS::Serverless (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/transform-aws-serverless.html) + // of macros in templates. (This includes the AWS::Include (https://docs.aws.amazon.com/AWSCloudFormation/create-reusable-transform-function-snippets-and-add-to-your-template-with-aws-include-transform.html) + // and AWS::Serverless (https://docs.aws.amazon.com/AWSCloudFormation/transform-aws-serverless.html) // transforms, which are macros hosted by CloudFormation.) Even if you specify this // capability for a stack set with service-managed permissions, if you reference a // macro in your template the stack set operation will fail. diff --git a/service/cloudformation/deserializers.go b/service/cloudformation/deserializers.go index 1b082b17b37..65c7b41d470 100644 --- a/service/cloudformation/deserializers.go +++ b/service/cloudformation/deserializers.go @@ -4777,6 +4777,120 @@ func awsAwsquery_deserializeOpErrorListImports(response *smithyhttp.Response, me } } +type awsAwsquery_deserializeOpListStackInstanceResourceDrifts struct { +} + +func (*awsAwsquery_deserializeOpListStackInstanceResourceDrifts) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpListStackInstanceResourceDrifts) 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, awsAwsquery_deserializeOpErrorListStackInstanceResourceDrifts(response, &metadata) + } + output := &ListStackInstanceResourceDriftsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("ListStackInstanceResourceDriftsResult") + 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 + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeOpDocumentListStackInstanceResourceDriftsOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorListStackInstanceResourceDrifts(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 + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + case strings.EqualFold("OperationNotFoundException", errorCode): + return awsAwsquery_deserializeErrorOperationNotFoundException(response, errorBody) + + case strings.EqualFold("StackInstanceNotFoundException", errorCode): + return awsAwsquery_deserializeErrorStackInstanceNotFoundException(response, errorBody) + + case strings.EqualFold("StackSetNotFoundException", errorCode): + return awsAwsquery_deserializeErrorStackSetNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsquery_deserializeOpListStackInstances struct { } @@ -14229,6 +14343,204 @@ func awsAwsquery_deserializeDocumentStackInstanceNotFoundException(v **types.Sta return nil } +func awsAwsquery_deserializeDocumentStackInstanceResourceDriftsSummaries(v *[]types.StackInstanceResourceDriftsSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.StackInstanceResourceDriftsSummary + if *v == nil { + sv = make([]types.StackInstanceResourceDriftsSummary, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("member", t.Name.Local): + var col types.StackInstanceResourceDriftsSummary + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsAwsquery_deserializeDocumentStackInstanceResourceDriftsSummary(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsAwsquery_deserializeDocumentStackInstanceResourceDriftsSummariesUnwrapped(v *[]types.StackInstanceResourceDriftsSummary, decoder smithyxml.NodeDecoder) error { + var sv []types.StackInstanceResourceDriftsSummary + if *v == nil { + sv = make([]types.StackInstanceResourceDriftsSummary, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.StackInstanceResourceDriftsSummary + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsAwsquery_deserializeDocumentStackInstanceResourceDriftsSummary(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsAwsquery_deserializeDocumentStackInstanceResourceDriftsSummary(v **types.StackInstanceResourceDriftsSummary, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.StackInstanceResourceDriftsSummary + if *v == nil { + sv = &types.StackInstanceResourceDriftsSummary{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("LogicalResourceId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LogicalResourceId = ptr.String(xtv) + } + + case strings.EqualFold("PhysicalResourceId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.PhysicalResourceId = ptr.String(xtv) + } + + case strings.EqualFold("PhysicalResourceIdContext", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPhysicalResourceIdContext(&sv.PhysicalResourceIdContext, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("PropertyDifferences", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentPropertyDifferences(&sv.PropertyDifferences, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ResourceType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ResourceType = ptr.String(xtv) + } + + case strings.EqualFold("StackId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StackId = ptr.String(xtv) + } + + case strings.EqualFold("StackResourceDriftStatus", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.StackResourceDriftStatus = types.StackResourceDriftStatus(xtv) + } + + case strings.EqualFold("Timestamp", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + t, err := smithytime.ParseDateTime(xtv) + if err != nil { + return err + } + sv.Timestamp = ptr.Time(t) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeDocumentStackInstanceSummaries(v *[]types.StackInstanceSummary, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -21731,6 +22043,61 @@ func awsAwsquery_deserializeOpDocumentListImportsOutput(v **ListImportsOutput, d return nil } +func awsAwsquery_deserializeOpDocumentListStackInstanceResourceDriftsOutput(v **ListStackInstanceResourceDriftsOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *ListStackInstanceResourceDriftsOutput + if *v == nil { + sv = &ListStackInstanceResourceDriftsOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("NextToken", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NextToken = ptr.String(xtv) + } + + case strings.EqualFold("Summaries", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentStackInstanceResourceDriftsSummaries(&sv.Summaries, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsAwsquery_deserializeOpDocumentListStackInstancesOutput(v **ListStackInstancesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cloudformation/generated.json b/service/cloudformation/generated.json index 30efe28a676..c40139dbc27 100644 --- a/service/cloudformation/generated.json +++ b/service/cloudformation/generated.json @@ -53,6 +53,7 @@ "api_op_ListChangeSets.go", "api_op_ListExports.go", "api_op_ListImports.go", + "api_op_ListStackInstanceResourceDrifts.go", "api_op_ListStackInstances.go", "api_op_ListStackResources.go", "api_op_ListStackSetOperationResults.go", diff --git a/service/cloudformation/serializers.go b/service/cloudformation/serializers.go index f9c84847dec..fc411c1dafc 100644 --- a/service/cloudformation/serializers.go +++ b/service/cloudformation/serializers.go @@ -2824,6 +2824,70 @@ func (m *awsAwsquery_serializeOpListImports) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpListStackInstanceResourceDrifts struct { +} + +func (*awsAwsquery_serializeOpListStackInstanceResourceDrifts) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpListStackInstanceResourceDrifts) 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.(*ListStackInstanceResourceDriftsInput) + _ = 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("ListStackInstanceResourceDrifts") + body.Key("Version").String("2010-05-15") + + if err := awsAwsquery_serializeOpDocumentListStackInstanceResourceDriftsInput(input, bodyEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpListStackInstances struct { } @@ -6227,6 +6291,55 @@ func awsAwsquery_serializeOpDocumentListImportsInput(v *ListImportsInput, value return nil } +func awsAwsquery_serializeOpDocumentListStackInstanceResourceDriftsInput(v *ListStackInstanceResourceDriftsInput, value query.Value) error { + object := value.Object() + _ = object + + if len(v.CallAs) > 0 { + objectKey := object.Key("CallAs") + objectKey.String(string(v.CallAs)) + } + + if v.MaxResults != nil { + objectKey := object.Key("MaxResults") + objectKey.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + objectKey := object.Key("NextToken") + objectKey.String(*v.NextToken) + } + + if v.OperationId != nil { + objectKey := object.Key("OperationId") + objectKey.String(*v.OperationId) + } + + if v.StackInstanceAccount != nil { + objectKey := object.Key("StackInstanceAccount") + objectKey.String(*v.StackInstanceAccount) + } + + if v.StackInstanceRegion != nil { + objectKey := object.Key("StackInstanceRegion") + objectKey.String(*v.StackInstanceRegion) + } + + if v.StackInstanceResourceDriftStatuses != nil { + objectKey := object.Key("StackInstanceResourceDriftStatuses") + if err := awsAwsquery_serializeDocumentStackResourceDriftStatusFilters(v.StackInstanceResourceDriftStatuses, objectKey); err != nil { + return err + } + } + + if v.StackSetName != nil { + objectKey := object.Key("StackSetName") + objectKey.String(*v.StackSetName) + } + + return nil +} + func awsAwsquery_serializeOpDocumentListStackInstancesInput(v *ListStackInstancesInput, value query.Value) error { object := value.Object() _ = object diff --git a/service/cloudformation/types/enums.go b/service/cloudformation/types/enums.go index 7cb88941118..f51d2311906 100644 --- a/service/cloudformation/types/enums.go +++ b/service/cloudformation/types/enums.go @@ -894,6 +894,7 @@ type StackInstanceFilterName string const ( StackInstanceFilterNameDetailedStatus StackInstanceFilterName = "DETAILED_STATUS" StackInstanceFilterNameLastOperationId StackInstanceFilterName = "LAST_OPERATION_ID" + StackInstanceFilterNameDriftStatus StackInstanceFilterName = "DRIFT_STATUS" ) // Values returns all known values for StackInstanceFilterName. Note that this can @@ -903,6 +904,7 @@ func (StackInstanceFilterName) Values() []StackInstanceFilterName { return []StackInstanceFilterName{ "DETAILED_STATUS", "LAST_OPERATION_ID", + "DRIFT_STATUS", } } diff --git a/service/cloudformation/types/types.go b/service/cloudformation/types/types.go index 7f7945e1b03..57f96f98710 100644 --- a/service/cloudformation/types/types.go +++ b/service/cloudformation/types/types.go @@ -703,7 +703,7 @@ type ResourceToImport struct { // state of your application during stack creation and updating, and to roll back // that operation if the application breaches the threshold of any of the alarms // you've specified. For more information, see Monitor and Roll Back Stack -// Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-rollback-triggers.html) +// Operations (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-rollback-triggers.html) // . type RollbackConfiguration struct { @@ -803,14 +803,14 @@ type Stack struct { // Information about whether a stack's actual configuration differs, or has // drifted, from its expected configuration, as defined in the stack template and // any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) + // Detecting Unregulated Configuration Changes to Stacks and Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) // . DriftInformation *StackDriftInformation - // Whether termination protection is enabled for the stack. For nested stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // Whether termination protection is enabled for the stack. For nested stacks (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) // , termination protection is set on the root stack and can't be changed directly // on the nested stack. For more information, see Protecting a Stack From Being - // Deleted (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) + // Deleted (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-protect-stacks.html) // in the CloudFormation User Guide. EnableTerminationProtection *bool @@ -831,7 +831,7 @@ type Stack struct { // For nested stacks--stacks created as resources for another stack--the stack ID // of the direct parent of this stack. For the first level of nested stacks, the // root stack is also the parent stack. For more information, see Working with - // Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // Nested Stacks (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) // in the CloudFormation User Guide. ParentId *string @@ -846,7 +846,7 @@ type Stack struct { // For nested stacks--stacks created as resources for another stack--the stack ID // of the top-level stack to which the nested stack ultimately belongs. For more - // information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // information, see Working with Nested Stacks (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) // in the CloudFormation User Guide. RootId *string @@ -1116,6 +1116,63 @@ type StackInstanceFilter struct { noSmithyDocumentSerde } +// The structure containing summary information about resource drifts for a stack +// instance. +type StackInstanceResourceDriftsSummary struct { + + // The logical name of the resource specified in the template. + // + // This member is required. + LogicalResourceId *string + + // Type of resource. For more information, go to Amazon Web Services Resource + // Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html) + // in the CloudFormation User Guide. + // + // This member is required. + ResourceType *string + + // The ID of the stack instance. + // + // This member is required. + StackId *string + + // The drift status of the resource in a stack instance. + // - DELETED : The resource differs from its expected template configuration in + // that the resource has been deleted. + // - MODIFIED : One or more resource properties differ from their expected + // template values. + // - IN_SYNC : The resource's actual configuration matches its expected template + // configuration. + // - NOT_CHECKED : CloudFormation doesn't currently return this value. + // + // This member is required. + StackResourceDriftStatus StackResourceDriftStatus + + // Time at which the stack instance drift detection operation was initiated. + // + // This member is required. + Timestamp *time.Time + + // The name or unique identifier that corresponds to a physical instance ID of a + // resource supported by CloudFormation. + PhysicalResourceId *string + + // Context information that enables CloudFormation to uniquely identify a + // resource. CloudFormation uses context key-value pairs in cases where a + // resource's logical and physical IDs aren't enough to uniquely identify that + // resource. Each context key-value pair specifies a unique resource that contains + // the targeted resource. + PhysicalResourceIdContext []PhysicalResourceIdContextKeyValuePair + + // Status of the actual configuration of the resource compared to its expected + // configuration. These will be present only for resources whose + // StackInstanceResourceDriftStatus is MODIFIED . + PropertyDifferences []PropertyDifference + + noSmithyDocumentSerde +} + // The structure that contains summary information about a stack instance. type StackInstanceSummary struct { @@ -1215,7 +1272,7 @@ type StackResource struct { // Information about whether the resource's actual configuration differs, or has // drifted, from its expected configuration, as defined in the stack template and // any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) + // Detecting Unregulated Configuration Changes to Stacks and Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) // . DriftInformation *StackResourceDriftInformation @@ -1270,7 +1327,7 @@ type StackResourceDetail struct { // Information about whether the resource's actual configuration differs, or has // drifted, from its expected configuration, as defined in the stack template and // any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) + // Detecting Unregulated Configuration Changes to Stacks and Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) // . DriftInformation *StackResourceDriftInformation @@ -1306,7 +1363,7 @@ type StackResourceDetail struct { // Detecting Unregulated Configuration Changes to Stacks and Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) // . Resources that don't currently support drift detection can't be checked. For a // list of resources that support drift detection, see Resources that Support -// Drift Detection (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html) +// Drift Detection (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift-resource-list.html) // . Use DetectStackResourceDrift to detect drift on individual resources, or // DetectStackDrift to detect drift on all resources in a given stack that support // drift detection. @@ -1466,7 +1523,7 @@ type StackResourceSummary struct { // Information about whether the resource's actual configuration differs, or has // drifted, from its expected configuration, as defined in the stack template and // any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) + // Detecting Unregulated Configuration Changes to Stacks and Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) // . DriftInformation *StackResourceDriftInformationSummary @@ -1494,7 +1551,7 @@ type StackSet struct { // The Amazon Resource Name (ARN) of the IAM role used to create or update the // stack set. Use customized administrator roles to control which users or groups // can manage specific stack sets within the same administrator account. For more - // information, see Prerequisites: Granting Permissions for Stack Set Operations (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // information, see Prerequisites: Granting Permissions for Stack Set Operations (https://docs.aws.amazon.com/AWSCloudFormation/stacksets-prereqs.html) // in the CloudFormation User Guide. AdministrationRoleARN *string @@ -1653,7 +1710,7 @@ type StackSetOperation struct { // The Amazon Resource Name (ARN) of the IAM role used to perform this stack set // operation. Use customized administrator roles to control which users or groups // can manage specific stack sets within the same administrator account. For more - // information, see Define Permissions for Multiple Administrators (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacksets-prereqs.html) + // information, see Define Permissions for Multiple Administrators (https://docs.aws.amazon.com/AWSCloudFormation/stacksets-prereqs.html) // in the CloudFormation User Guide. AdministrationRoleARN *string @@ -1972,7 +2029,7 @@ type StackSummary struct { // Summarizes information about whether a stack's actual configuration differs, or // has drifted, from its expected configuration, as defined in the stack template // and any values specified as template parameters. For more information, see - // Detecting Unregulated Configuration Changes to Stacks and Resources (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) + // Detecting Unregulated Configuration Changes to Stacks and Resources (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-stack-drift.html) // . DriftInformation *StackDriftInformationSummary @@ -1983,13 +2040,13 @@ type StackSummary struct { // For nested stacks--stacks created as resources for another stack--the stack ID // of the direct parent of this stack. For the first level of nested stacks, the // root stack is also the parent stack. For more information, see Working with - // Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // Nested Stacks (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) // in the CloudFormation User Guide. ParentId *string // For nested stacks--stacks created as resources for another stack--the stack ID // of the top-level stack to which the nested stack ultimately belongs. For more - // information, see Working with Nested Stacks (http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) + // information, see Working with Nested Stacks (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html) // in the CloudFormation User Guide. RootId *string diff --git a/service/cloudformation/validators.go b/service/cloudformation/validators.go index 74b1605f696..5e1a650f863 100644 --- a/service/cloudformation/validators.go +++ b/service/cloudformation/validators.go @@ -590,6 +590,26 @@ func (m *validateOpListImports) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpListStackInstanceResourceDrifts struct { +} + +func (*validateOpListStackInstanceResourceDrifts) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListStackInstanceResourceDrifts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListStackInstanceResourceDriftsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListStackInstanceResourceDriftsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListStackInstances struct { } @@ -1006,6 +1026,10 @@ func addOpListImportsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListImports{}, middleware.After) } +func addOpListStackInstanceResourceDriftsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListStackInstanceResourceDrifts{}, middleware.After) +} + func addOpListStackInstancesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListStackInstances{}, middleware.After) } @@ -1700,6 +1724,30 @@ func validateOpListImportsInput(v *ListImportsInput) error { } } +func validateOpListStackInstanceResourceDriftsInput(v *ListStackInstanceResourceDriftsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListStackInstanceResourceDriftsInput"} + if v.StackSetName == nil { + invalidParams.Add(smithy.NewErrParamRequired("StackSetName")) + } + if v.StackInstanceAccount == nil { + invalidParams.Add(smithy.NewErrParamRequired("StackInstanceAccount")) + } + if v.StackInstanceRegion == nil { + invalidParams.Add(smithy.NewErrParamRequired("StackInstanceRegion")) + } + if v.OperationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("OperationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListStackInstancesInput(v *ListStackInstancesInput) error { if v == nil { return nil diff --git a/service/costexplorer/api_op_GetCostCategories.go b/service/costexplorer/api_op_GetCostCategories.go index 7e5e311e479..d8732a5f64f 100644 --- a/service/costexplorer/api_op_GetCostCategories.go +++ b/service/costexplorer/api_op_GetCostCategories.go @@ -57,13 +57,13 @@ type GetCostCategoriesInput struct { // GetRightsizingRecommendation , the Region is a full name (for example, // REGION==US East (N. Virginia) . // - The corresponding Expression for this example is as follows: { - // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } + // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } } // - As shown in the previous example, lists of dimension values are combined // with OR when applying the filter. // - You can also set different match options to further control how the filter // behaves. Not all APIs support match options. Refer to the documentation for each // specific API to see what is supported. - // - For example, you can filter for linked account names that start with “a”. + // - For example, you can filter for linked account names that start with "a". // - The corresponding Expression for this example is as follows: { // "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], // "Values": [ "a" ] } } diff --git a/service/costexplorer/api_op_GetDimensionValues.go b/service/costexplorer/api_op_GetDimensionValues.go index f9e18196148..6894803a82f 100644 --- a/service/costexplorer/api_op_GetDimensionValues.go +++ b/service/costexplorer/api_op_GetDimensionValues.go @@ -151,13 +151,13 @@ type GetDimensionValuesInput struct { // GetRightsizingRecommendation , the Region is a full name (for example, // REGION==US East (N. Virginia) . // - The corresponding Expression for this example is as follows: { - // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } + // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } } // - As shown in the previous example, lists of dimension values are combined // with OR when applying the filter. // - You can also set different match options to further control how the filter // behaves. Not all APIs support match options. Refer to the documentation for each // specific API to see what is supported. - // - For example, you can filter for linked account names that start with “a”. + // - For example, you can filter for linked account names that start with "a". // - The corresponding Expression for this example is as follows: { // "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], // "Values": [ "a" ] } } diff --git a/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go b/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go index 584562b6ad3..56dbcb1769c 100644 --- a/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go +++ b/service/costexplorer/api_op_GetReservationPurchaseRecommendation.go @@ -77,13 +77,13 @@ type GetReservationPurchaseRecommendationInput struct { // GetRightsizingRecommendation , the Region is a full name (for example, // REGION==US East (N. Virginia) . // - The corresponding Expression for this example is as follows: { - // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } + // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } } // - As shown in the previous example, lists of dimension values are combined // with OR when applying the filter. // - You can also set different match options to further control how the filter // behaves. Not all APIs support match options. Refer to the documentation for each // specific API to see what is supported. - // - For example, you can filter for linked account names that start with “a”. + // - For example, you can filter for linked account names that start with "a". // - The corresponding Expression for this example is as follows: { // "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], // "Values": [ "a" ] } } diff --git a/service/costexplorer/api_op_GetRightsizingRecommendation.go b/service/costexplorer/api_op_GetRightsizingRecommendation.go index 78d7b81db91..29cd7655807 100644 --- a/service/costexplorer/api_op_GetRightsizingRecommendation.go +++ b/service/costexplorer/api_op_GetRightsizingRecommendation.go @@ -65,13 +65,13 @@ type GetRightsizingRecommendationInput struct { // GetRightsizingRecommendation , the Region is a full name (for example, // REGION==US East (N. Virginia) . // - The corresponding Expression for this example is as follows: { - // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } + // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } } // - As shown in the previous example, lists of dimension values are combined // with OR when applying the filter. // - You can also set different match options to further control how the filter // behaves. Not all APIs support match options. Refer to the documentation for each // specific API to see what is supported. - // - For example, you can filter for linked account names that start with “a”. + // - For example, you can filter for linked account names that start with "a". // - The corresponding Expression for this example is as follows: { // "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], // "Values": [ "a" ] } } diff --git a/service/costexplorer/api_op_GetSavingsPlanPurchaseRecommendationDetails.go b/service/costexplorer/api_op_GetSavingsPlanPurchaseRecommendationDetails.go new file mode 100644 index 00000000000..d8289b47816 --- /dev/null +++ b/service/costexplorer/api_op_GetSavingsPlanPurchaseRecommendationDetails.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package costexplorer + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/costexplorer/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the details for a Savings Plan recommendation. These details include +// the hourly data-points that construct the new cost, coverage, and utilization +// charts. +func (c *Client) GetSavingsPlanPurchaseRecommendationDetails(ctx context.Context, params *GetSavingsPlanPurchaseRecommendationDetailsInput, optFns ...func(*Options)) (*GetSavingsPlanPurchaseRecommendationDetailsOutput, error) { + if params == nil { + params = &GetSavingsPlanPurchaseRecommendationDetailsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSavingsPlanPurchaseRecommendationDetails", params, optFns, c.addOperationGetSavingsPlanPurchaseRecommendationDetailsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSavingsPlanPurchaseRecommendationDetailsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSavingsPlanPurchaseRecommendationDetailsInput struct { + + // The ID that is associated with the Savings Plan recommendation. + // + // This member is required. + RecommendationDetailId *string + + noSmithyDocumentSerde +} + +type GetSavingsPlanPurchaseRecommendationDetailsOutput struct { + + // Contains detailed information about a specific Savings Plan recommendation. + RecommendationDetailData *types.RecommendationDetailData + + // The ID that is associated with the Savings Plan recommendation. + RecommendationDetailId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSavingsPlanPurchaseRecommendationDetailsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSavingsPlanPurchaseRecommendationDetails{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSavingsPlanPurchaseRecommendationDetails{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpGetSavingsPlanPurchaseRecommendationDetailsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSavingsPlanPurchaseRecommendationDetails(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetSavingsPlanPurchaseRecommendationDetails(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "ce", + OperationName: "GetSavingsPlanPurchaseRecommendationDetails", + } +} diff --git a/service/costexplorer/api_op_GetTags.go b/service/costexplorer/api_op_GetTags.go index 1e35edac9ca..2f3491b6efc 100644 --- a/service/costexplorer/api_op_GetTags.go +++ b/service/costexplorer/api_op_GetTags.go @@ -56,13 +56,13 @@ type GetTagsInput struct { // GetRightsizingRecommendation , the Region is a full name (for example, // REGION==US East (N. Virginia) . // - The corresponding Expression for this example is as follows: { - // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } + // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } } // - As shown in the previous example, lists of dimension values are combined // with OR when applying the filter. // - You can also set different match options to further control how the filter // behaves. Not all APIs support match options. Refer to the documentation for each // specific API to see what is supported. - // - For example, you can filter for linked account names that start with “a”. + // - For example, you can filter for linked account names that start with "a". // - The corresponding Expression for this example is as follows: { // "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], // "Values": [ "a" ] } } diff --git a/service/costexplorer/api_op_UpdateAnomalySubscription.go b/service/costexplorer/api_op_UpdateAnomalySubscription.go index 0b0a0f27121..fd8abdc9da1 100644 --- a/service/costexplorer/api_op_UpdateAnomalySubscription.go +++ b/service/costexplorer/api_op_UpdateAnomalySubscription.go @@ -11,7 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates an existing cost anomaly monitor subscription. +// Updates an existing cost anomaly subscription. Specify the fields that you want +// to update. Omitted fields are unchanged. The JSON below describes the generic +// construct for each type. See Request Parameters (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_UpdateAnomalySubscription.html#API_UpdateAnomalySubscription_RequestParameters) +// for possible values as they apply to AnomalySubscription . func (c *Client) UpdateAnomalySubscription(ctx context.Context, params *UpdateAnomalySubscriptionInput, optFns ...func(*Options)) (*UpdateAnomalySubscriptionOutput, error) { if params == nil { params = &UpdateAnomalySubscriptionInput{} @@ -49,7 +52,8 @@ type UpdateAnomalySubscriptionInput struct { // (deprecated) The update to the threshold value for receiving notifications. // This field has been deprecated. To update a threshold, use ThresholdExpression. // Continued use of Threshold will be treated as shorthand syntax for a - // ThresholdExpression. + // ThresholdExpression. You can specify either Threshold or ThresholdExpression, + // but not both. // // Deprecated: Threshold has been deprecated in favor of ThresholdExpression Threshold *float64 @@ -57,10 +61,14 @@ type UpdateAnomalySubscriptionInput struct { // The update to the Expression (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) // object used to specify the anomalies that you want to generate alerts for. This // supports dimensions and nested expressions. The supported dimensions are - // ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE . The - // supported nested expression types are AND and OR . The match option - // GREATER_THAN_OR_EQUAL is required. Values must be numbers between 0 and - // 10,000,000,000. The following are examples of valid ThresholdExpressions: + // ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE , + // corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, + // respectively (see Impact (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Impact.html) + // for more details). The supported nested expression types are AND and OR . The + // match option GREATER_THAN_OR_EQUAL is required. Values must be numbers between + // 0 and 10,000,000,000 in string format. You can specify either Threshold or + // ThresholdExpression, but not both. The following are examples of valid + // ThresholdExpressions: // - Absolute threshold: { "Dimensions": { "Key": // "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], // "Values": [ "100" ] } } diff --git a/service/costexplorer/deserializers.go b/service/costexplorer/deserializers.go index ed1c4163617..191cd4d6423 100644 --- a/service/costexplorer/deserializers.go +++ b/service/costexplorer/deserializers.go @@ -2233,6 +2233,120 @@ func awsAwsjson11_deserializeOpErrorGetRightsizingRecommendation(response *smith } } +type awsAwsjson11_deserializeOpGetSavingsPlanPurchaseRecommendationDetails struct { +} + +func (*awsAwsjson11_deserializeOpGetSavingsPlanPurchaseRecommendationDetails) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetSavingsPlanPurchaseRecommendationDetails) 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_deserializeOpErrorGetSavingsPlanPurchaseRecommendationDetails(response, &metadata) + } + output := &GetSavingsPlanPurchaseRecommendationDetailsOutput{} + 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_deserializeOpDocumentGetSavingsPlanPurchaseRecommendationDetailsOutput(&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_deserializeOpErrorGetSavingsPlanPurchaseRecommendationDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorDataUnavailableException(response, errorBody) + + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpGetSavingsPlansCoverage struct { } @@ -3258,6 +3372,9 @@ func awsAwsjson11_deserializeOpErrorListSavingsPlansPurchaseRecommendationGenera } switch { + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorDataUnavailableException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) @@ -3597,6 +3714,9 @@ func awsAwsjson11_deserializeOpErrorStartSavingsPlansPurchaseRecommendationGener } switch { + case strings.EqualFold("DataUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorDataUnavailableException(response, errorBody) + case strings.EqualFold("GenerationExistsException", errorCode): return awsAwsjson11_deserializeErrorGenerationExistsException(response, errorBody) @@ -8486,6 +8606,40 @@ func awsAwsjson11_deserializeDocumentMetrics(v *map[string]types.MetricValue, va return nil } +func awsAwsjson11_deserializeDocumentMetricsOverLookbackPeriod(v *[]types.RecommendationDetailHourlyMetrics, 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.RecommendationDetailHourlyMetrics + if *v == nil { + cv = []types.RecommendationDetailHourlyMetrics{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RecommendationDetailHourlyMetrics + destAddr := &col + if err := awsAwsjson11_deserializeDocumentRecommendationDetailHourlyMetrics(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentMetricValue(v **types.MetricValue, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -8822,7 +8976,7 @@ func awsAwsjson11_deserializeDocumentRDSInstanceDetails(v **types.RDSInstanceDet return nil } -func awsAwsjson11_deserializeDocumentRedshiftInstanceDetails(v **types.RedshiftInstanceDetails, value interface{}) error { +func awsAwsjson11_deserializeDocumentRecommendationDetailData(v **types.RecommendationDetailData, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8835,156 +8989,520 @@ func awsAwsjson11_deserializeDocumentRedshiftInstanceDetails(v **types.RedshiftI return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RedshiftInstanceDetails + var sv *types.RecommendationDetailData if *v == nil { - sv = &types.RedshiftInstanceDetails{} + sv = &types.RecommendationDetailData{} } else { sv = *v } for key, value := range shape { switch key { - case "CurrentGeneration": + case "AccountId": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.CurrentGeneration = jtv + sv.AccountId = ptr.String(jtv) } - case "Family": + case "AccountScope": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + return fmt.Errorf("expected AccountScope to be of type string, got %T instead", value) } - sv.Family = ptr.String(jtv) + sv.AccountScope = types.AccountScope(jtv) } - case "NodeType": + case "CurrencyCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.NodeType = ptr.String(jtv) + sv.CurrencyCode = ptr.String(jtv) } - case "Region": + case "CurrentAverageCoverage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.Region = ptr.String(jtv) + sv.CurrentAverageCoverage = ptr.String(jtv) } - case "SizeFlexEligible": + case "CurrentAverageHourlyOnDemandSpend": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.SizeFlexEligible = jtv + sv.CurrentAverageHourlyOnDemandSpend = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentRequestChangedException(v **types.RequestChangedException, 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.RequestChangedException - if *v == nil { - sv = &types.RequestChangedException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Message": + case "CurrentMaximumHourlyOnDemandSpend": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.CurrentMaximumHourlyOnDemandSpend = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentReservationAggregates(v **types.ReservationAggregates, 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.ReservationAggregates - if *v == nil { - sv = &types.ReservationAggregates{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AmortizedRecurringFee": + case "CurrentMinimumHourlyOnDemandSpend": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AmortizedRecurringFee to be of type string, got %T instead", value) + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.AmortizedRecurringFee = ptr.String(jtv) + sv.CurrentMinimumHourlyOnDemandSpend = ptr.String(jtv) } - case "AmortizedUpfrontFee": + case "EstimatedAverageCoverage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AmortizedUpfrontFee to be of type string, got %T instead", value) + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.AmortizedUpfrontFee = ptr.String(jtv) + sv.EstimatedAverageCoverage = ptr.String(jtv) } - case "NetRISavings": + case "EstimatedAverageUtilization": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NetRISavings to be of type string, got %T instead", value) + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) } - sv.NetRISavings = ptr.String(jtv) + sv.EstimatedAverageUtilization = ptr.String(jtv) + } + + case "EstimatedMonthlySavingsAmount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedMonthlySavingsAmount = ptr.String(jtv) + } + + case "EstimatedOnDemandCost": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedOnDemandCost = ptr.String(jtv) + } + + case "EstimatedOnDemandCostWithCurrentCommitment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedOnDemandCostWithCurrentCommitment = ptr.String(jtv) + } + + case "EstimatedROI": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedROI = ptr.String(jtv) + } + + case "EstimatedSavingsAmount": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedSavingsAmount = ptr.String(jtv) + } + + case "EstimatedSavingsPercentage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedSavingsPercentage = ptr.String(jtv) + } + + case "EstimatedSPCost": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedSPCost = ptr.String(jtv) + } + + case "ExistingHourlyCommitment": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.ExistingHourlyCommitment = ptr.String(jtv) + } + + case "GenerationTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonedDateTime to be of type string, got %T instead", value) + } + sv.GenerationTimestamp = ptr.String(jtv) + } + + case "HourlyCommitmentToPurchase": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.HourlyCommitmentToPurchase = ptr.String(jtv) + } + + case "InstanceFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.InstanceFamily = ptr.String(jtv) + } + + case "LatestUsageTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonedDateTime to be of type string, got %T instead", value) + } + sv.LatestUsageTimestamp = ptr.String(jtv) + } + + case "LookbackPeriodInDays": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LookbackPeriodInDays to be of type string, got %T instead", value) + } + sv.LookbackPeriodInDays = types.LookbackPeriodInDays(jtv) + } + + case "MetricsOverLookbackPeriod": + if err := awsAwsjson11_deserializeDocumentMetricsOverLookbackPeriod(&sv.MetricsOverLookbackPeriod, value); err != nil { + return err + } + + case "OfferingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.OfferingId = ptr.String(jtv) + } + + case "PaymentOption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaymentOption to be of type string, got %T instead", value) + } + sv.PaymentOption = types.PaymentOption(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "SavingsPlansType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SupportedSavingsPlansType to be of type string, got %T instead", value) + } + sv.SavingsPlansType = types.SupportedSavingsPlansType(jtv) + } + + case "TermInYears": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TermInYears to be of type string, got %T instead", value) + } + sv.TermInYears = types.TermInYears(jtv) + } + + case "UpfrontCost": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.UpfrontCost = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecommendationDetailHourlyMetrics(v **types.RecommendationDetailHourlyMetrics, 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.RecommendationDetailHourlyMetrics + if *v == nil { + sv = &types.RecommendationDetailHourlyMetrics{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CurrentCoverage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.CurrentCoverage = ptr.String(jtv) + } + + case "EstimatedCoverage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedCoverage = ptr.String(jtv) + } + + case "EstimatedNewCommitmentUtilization": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedNewCommitmentUtilization = ptr.String(jtv) + } + + case "EstimatedOnDemandCost": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.EstimatedOnDemandCost = ptr.String(jtv) + } + + case "StartTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ZonedDateTime to be of type string, got %T instead", value) + } + sv.StartTime = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRedshiftInstanceDetails(v **types.RedshiftInstanceDetails, 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.RedshiftInstanceDetails + if *v == nil { + sv = &types.RedshiftInstanceDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CurrentGeneration": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) + } + sv.CurrentGeneration = jtv + } + + case "Family": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.Family = ptr.String(jtv) + } + + case "NodeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.NodeType = ptr.String(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GenericString to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "SizeFlexEligible": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected GenericBoolean to be of type *bool, got %T instead", value) + } + sv.SizeFlexEligible = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRequestChangedException(v **types.RequestChangedException, 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.RequestChangedException + if *v == nil { + sv = &types.RequestChangedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentReservationAggregates(v **types.ReservationAggregates, 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.ReservationAggregates + if *v == nil { + sv = &types.ReservationAggregates{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AmortizedRecurringFee": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmortizedRecurringFee to be of type string, got %T instead", value) + } + sv.AmortizedRecurringFee = ptr.String(jtv) + } + + case "AmortizedUpfrontFee": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AmortizedUpfrontFee to be of type string, got %T instead", value) + } + sv.AmortizedUpfrontFee = ptr.String(jtv) + } + + case "NetRISavings": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetRISavings to be of type string, got %T instead", value) + } + sv.NetRISavings = ptr.String(jtv) } case "OnDemandCostOfRIHoursUsed": @@ -10931,6 +11449,15 @@ func awsAwsjson11_deserializeDocumentSavingsPlansPurchaseRecommendationDetail(v sv.HourlyCommitmentToPurchase = ptr.String(jtv) } + case "RecommendationDetailId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecommendationDetailId to be of type string, got %T instead", value) + } + sv.RecommendationDetailId = ptr.String(jtv) + } + case "SavingsPlansDetails": if err := awsAwsjson11_deserializeDocumentSavingsPlansDetails(&sv.SavingsPlansDetails, value); err != nil { return err @@ -13266,6 +13793,51 @@ func awsAwsjson11_deserializeOpDocumentGetRightsizingRecommendationOutput(v **Ge return nil } +func awsAwsjson11_deserializeOpDocumentGetSavingsPlanPurchaseRecommendationDetailsOutput(v **GetSavingsPlanPurchaseRecommendationDetailsOutput, 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 *GetSavingsPlanPurchaseRecommendationDetailsOutput + if *v == nil { + sv = &GetSavingsPlanPurchaseRecommendationDetailsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RecommendationDetailData": + if err := awsAwsjson11_deserializeDocumentRecommendationDetailData(&sv.RecommendationDetailData, value); err != nil { + return err + } + + case "RecommendationDetailId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecommendationDetailId to be of type string, got %T instead", value) + } + sv.RecommendationDetailId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetSavingsPlansCoverageOutput(v **GetSavingsPlansCoverageOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/costexplorer/generated.json b/service/costexplorer/generated.json index c5d1c4361be..e6a7e64a72a 100644 --- a/service/costexplorer/generated.json +++ b/service/costexplorer/generated.json @@ -27,6 +27,7 @@ "api_op_GetReservationPurchaseRecommendation.go", "api_op_GetReservationUtilization.go", "api_op_GetRightsizingRecommendation.go", + "api_op_GetSavingsPlanPurchaseRecommendationDetails.go", "api_op_GetSavingsPlansCoverage.go", "api_op_GetSavingsPlansPurchaseRecommendation.go", "api_op_GetSavingsPlansUtilization.go", diff --git a/service/costexplorer/serializers.go b/service/costexplorer/serializers.go index b15699741a3..a7bfb08a996 100644 --- a/service/costexplorer/serializers.go +++ b/service/costexplorer/serializers.go @@ -1061,6 +1061,61 @@ func (m *awsAwsjson11_serializeOpGetRightsizingRecommendation) HandleSerialize(c return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetSavingsPlanPurchaseRecommendationDetails struct { +} + +func (*awsAwsjson11_serializeOpGetSavingsPlanPurchaseRecommendationDetails) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetSavingsPlanPurchaseRecommendationDetails) 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.(*GetSavingsPlanPurchaseRecommendationDetailsInput) + _ = 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("AWSInsightsIndexService.GetSavingsPlanPurchaseRecommendationDetails") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetSavingsPlanPurchaseRecommendationDetailsInput(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_serializeOpGetSavingsPlansCoverage struct { } @@ -3505,6 +3560,18 @@ func awsAwsjson11_serializeOpDocumentGetRightsizingRecommendationInput(v *GetRig return nil } +func awsAwsjson11_serializeOpDocumentGetSavingsPlanPurchaseRecommendationDetailsInput(v *GetSavingsPlanPurchaseRecommendationDetailsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RecommendationDetailId != nil { + ok := object.Key("RecommendationDetailId") + ok.String(*v.RecommendationDetailId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetSavingsPlansCoverageInput(v *GetSavingsPlansCoverageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/costexplorer/types/types.go b/service/costexplorer/types/types.go index 81ad1ac5895..11a749ee048 100644 --- a/service/costexplorer/types/types.go +++ b/service/costexplorer/types/types.go @@ -114,13 +114,13 @@ type AnomalyMonitor struct { // GetRightsizingRecommendation , the Region is a full name (for example, // REGION==US East (N. Virginia) . // - The corresponding Expression for this example is as follows: { - // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } + // "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } } // - As shown in the previous example, lists of dimension values are combined // with OR when applying the filter. // - You can also set different match options to further control how the filter // behaves. Not all APIs support match options. Refer to the documentation for each // specific API to see what is supported. - // - For example, you can filter for linked account names that start with “a”. + // - For example, you can filter for linked account names that start with "a". // - The corresponding Expression for this example is as follows: { // "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], // "Values": [ "a" ] } } @@ -168,13 +168,24 @@ type AnomalyScore struct { noSmithyDocumentSerde } -// The association between a monitor, threshold, and list of subscribers used to -// deliver notifications about anomalies detected by a monitor that exceeds a -// threshold. The content consists of the detailed metadata and the current status -// of the AnomalySubscription object. +// An AnomalySubscription resource (also referred to as an alert subscription) +// sends notifications about specific anomalies that meet an alerting criteria +// defined by you. You can specify the frequency of the alerts and the subscribers +// to notify. Anomaly subscriptions can be associated with one or more +// AnomalyMonitor (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AnomalyMonitor.html) +// resources, and they only send notifications about anomalies detected by those +// associated monitors. You can also configure a threshold to further control which +// anomalies are included in the notifications. Anomalies that don’t exceed the +// chosen threshold and therefore don’t trigger notifications from an anomaly +// subscription will still be available on the console and from the GetAnomalies (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetAnomalies.html) +// API. type AnomalySubscription struct { - // The frequency that anomaly reports are sent over email. + // The frequency that anomaly notifications are sent. Notifications are sent + // either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE + // frequency). For more information, see Creating an Amazon SNS topic for anomaly + // notifications (https://docs.aws.amazon.com/cost-management/latest/userguide/ad-SNS.html) + // . // // This member is required. Frequency AnomalySubscriptionFrequency @@ -200,11 +211,13 @@ type AnomalySubscription struct { // The AnomalySubscription Amazon Resource Name (ARN). SubscriptionArn *string - // (deprecated) The dollar value that triggers a notification if the threshold is - // exceeded. This field has been deprecated. To specify a threshold, use - // ThresholdExpression. Continued use of Threshold will be treated as shorthand - // syntax for a ThresholdExpression. One of Threshold or ThresholdExpression is - // required for this resource. + // (deprecated) An absolute dollar value that must be exceeded by the anomaly's + // total impact (see Impact (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Impact.html) + // for more details) for an anomaly notification to be generated. This field has + // been deprecated. To specify a threshold, use ThresholdExpression. Continued use + // of Threshold will be treated as shorthand syntax for a ThresholdExpression. One + // of Threshold or ThresholdExpression is required for this resource. You cannot + // specify both. // // Deprecated: Threshold has been deprecated in favor of ThresholdExpression Threshold *float64 @@ -212,11 +225,14 @@ type AnomalySubscription struct { // An Expression (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) // object used to specify the anomalies that you want to generate alerts for. This // supports dimensions and nested expressions. The supported dimensions are - // ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE . The - // supported nested expression types are AND and OR . The match option - // GREATER_THAN_OR_EQUAL is required. Values must be numbers between 0 and - // 10,000,000,000. One of Threshold or ThresholdExpression is required for this - // resource. The following are examples of valid ThresholdExpressions: + // ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE , + // corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, + // respectively (see Impact (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Impact.html) + // for more details). The supported nested expression types are AND and OR . The + // match option GREATER_THAN_OR_EQUAL is required. Values must be numbers between + // 0 and 10,000,000,000 in string format. One of Threshold or ThresholdExpression + // is required for this resource. You cannot specify both. The following are + // examples of valid ThresholdExpressions: // - Absolute threshold: { "Dimensions": { "Key": // "ANOMALY_TOTAL_IMPACT_ABSOLUTE", "MatchOptions": [ "GREATER_THAN_OR_EQUAL" ], // "Values": [ "100" ] } } @@ -407,12 +423,11 @@ type CostCategoryRule struct { // An Expression (https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html) // object used to categorize costs. This supports dimensions, tags, and nested // expressions. Currently the only dimensions supported are LINKED_ACCOUNT , - // SERVICE_CODE , RECORD_TYPE , and LINKED_ACCOUNT_NAME . Root level OR isn't - // supported. We recommend that you create a separate rule instead. RECORD_TYPE is - // a dimension used for Cost Explorer APIs, and is also supported for Cost Category - // expressions. This dimension uses different terms, depending on whether you're - // using the console or API/JSON editor. For a detailed comparison, see Term - // Comparisons (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-cost-categories.html#cost-categories-terms) + // SERVICE_CODE , RECORD_TYPE , LINKED_ACCOUNT_NAME , REGION , and USAGE_TYPE . + // RECORD_TYPE is a dimension used for Cost Explorer APIs, and is also supported + // for Cost Category expressions. This dimension uses different terms, depending on + // whether you're using the console or API/JSON editor. For a detailed comparison, + // see Term Comparisons (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-cost-categories.html#cost-categories-terms) // in the Billing and Cost Management User Guide. Rule *Expression @@ -898,13 +913,13 @@ type ESInstanceDetails struct { // GetRightsizingRecommendation , the Region is a full name (for example, // REGION==US East (N. Virginia) . // - The corresponding Expression for this example is as follows: { -// "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } } +// "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] } } // - As shown in the previous example, lists of dimension values are combined // with OR when applying the filter. // - You can also set different match options to further control how the filter // behaves. Not all APIs support match options. Refer to the documentation for each // specific API to see what is supported. -// - For example, you can filter for linked account names that start with “a”. +// - For example, you can filter for linked account names that start with "a". // - The corresponding Expression for this example is as follows: { // "Dimensions": { "Key": "LINKED_ACCOUNT_NAME", "MatchOptions": [ "STARTS_WITH" ], // "Values": [ "a" ] } } @@ -1150,6 +1165,140 @@ type RDSInstanceDetails struct { noSmithyDocumentSerde } +// The details and metrics for the given recommendation. +type RecommendationDetailData struct { + + // The AccountID that the recommendation is generated for. + AccountId *string + + // The account scope that you want your recommendations for. Amazon Web Services + // calculates recommendations including the management account and member accounts + // if the value is set to PAYER. If the value is LINKED, recommendations are + // calculated for individual member accounts only. + AccountScope AccountScope + + // The currency code that Amazon Web Services used to generate the recommendation + // and present potential savings. + CurrencyCode *string + + // The average value of hourly coverage over the lookback period. + CurrentAverageCoverage *string + + // The average value of hourly On-Demand spend over the lookback period of the + // applicable usage type. + CurrentAverageHourlyOnDemandSpend *string + + // The highest value of hourly On-Demand spend over the lookback period of the + // applicable usage type. + CurrentMaximumHourlyOnDemandSpend *string + + // The lowest value of hourly On-Demand spend over the lookback period of the + // applicable usage type. + CurrentMinimumHourlyOnDemandSpend *string + + // The estimated coverage of the recommended Savings Plan. + EstimatedAverageCoverage *string + + // The estimated utilization of the recommended Savings Plan. + EstimatedAverageUtilization *string + + // The estimated monthly savings amount based on the recommended Savings Plan. + EstimatedMonthlySavingsAmount *string + + // The remaining On-Demand cost estimated to not be covered by the recommended + // Savings Plan, over the length of the lookback period. + EstimatedOnDemandCost *string + + // The estimated On-Demand costs you expect with no additional commitment, based + // on your usage of the selected time period and the Savings Plan you own. + EstimatedOnDemandCostWithCurrentCommitment *string + + // The estimated return on investment that's based on the recommended Savings Plan + // that you purchased. This is calculated as + // estimatedSavingsAmount/estimatedSPCost*100. + EstimatedROI *string + + // The cost of the recommended Savings Plan over the length of the lookback period. + EstimatedSPCost *string + + // The estimated savings amount that's based on the recommended Savings Plan over + // the length of the lookback period. + EstimatedSavingsAmount *string + + // The estimated savings percentage relative to the total cost of applicable + // On-Demand usage over the lookback period. + EstimatedSavingsPercentage *string + + // The existing hourly commitment for the Savings Plan type. + ExistingHourlyCommitment *string + + // The period of time that you want the usage and costs for. + GenerationTimestamp *string + + // The recommended hourly commitment level for the Savings Plan type and the + // configuration that's based on the usage during the lookback period. + HourlyCommitmentToPurchase *string + + // The instance family of the recommended Savings Plan. + InstanceFamily *string + + // The period of time that you want the usage and costs for. + LatestUsageTimestamp *string + + // How many days of previous usage that Amazon Web Services considers when making + // this recommendation. + LookbackPeriodInDays LookbackPeriodInDays + + // The related hourly cost, coverage, and utilization metrics over the lookback + // period. + MetricsOverLookbackPeriod []RecommendationDetailHourlyMetrics + + // The unique ID that's used to distinguish Savings Plans from one another. + OfferingId *string + + // The payment option for the commitment (for example, All Upfront or No Upfront). + PaymentOption PaymentOption + + // The region the recommendation is generated for. + Region *string + + // The requested Savings Plan recommendation type. + SavingsPlansType SupportedSavingsPlansType + + // The term of the commitment in years. + TermInYears TermInYears + + // The upfront cost of the recommended Savings Plan, based on the selected payment + // option. + UpfrontCost *string + + noSmithyDocumentSerde +} + +// Contains the hourly metrics for the given recommendation over the lookback +// period. +type RecommendationDetailHourlyMetrics struct { + + // The current amount of Savings Plans eligible usage that the Savings Plan + // covered. + CurrentCoverage *string + + // The estimated coverage amount based on the recommended Savings Plan. + EstimatedCoverage *string + + // The estimated utilization for the recommended Savings Plan. + EstimatedNewCommitmentUtilization *string + + // The remaining On-Demand cost estimated to not be covered by the recommended + // Savings Plan, over the length of the lookback period. + EstimatedOnDemandCost *string + + // The period of time that you want the usage and costs for. + StartTime *string + + noSmithyDocumentSerde +} + // Details about the Amazon Redshift instances that Amazon Web Services recommends // that you purchase. type RedshiftInstanceDetails struct { @@ -1746,6 +1895,9 @@ type SavingsPlansPurchaseRecommendationDetail struct { // configuration that's based on the usage during the lookback period. HourlyCommitmentToPurchase *string + // Contains detailed information about a specific Savings Plan recommendation. + RecommendationDetailId *string + // Details for your recommended Savings Plans. SavingsPlansDetails *SavingsPlansDetails diff --git a/service/costexplorer/validators.go b/service/costexplorer/validators.go index d81657198c3..dbfe511c8f2 100644 --- a/service/costexplorer/validators.go +++ b/service/costexplorer/validators.go @@ -350,6 +350,26 @@ func (m *validateOpGetRightsizingRecommendation) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpGetSavingsPlanPurchaseRecommendationDetails struct { +} + +func (*validateOpGetSavingsPlanPurchaseRecommendationDetails) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSavingsPlanPurchaseRecommendationDetails) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSavingsPlanPurchaseRecommendationDetailsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSavingsPlanPurchaseRecommendationDetailsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSavingsPlansCoverage struct { } @@ -698,6 +718,10 @@ func addOpGetRightsizingRecommendationValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpGetRightsizingRecommendation{}, middleware.After) } +func addOpGetSavingsPlanPurchaseRecommendationDetailsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSavingsPlanPurchaseRecommendationDetails{}, middleware.After) +} + func addOpGetSavingsPlansCoverageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSavingsPlansCoverage{}, middleware.After) } @@ -1411,6 +1435,21 @@ func validateOpGetRightsizingRecommendationInput(v *GetRightsizingRecommendation } } +func validateOpGetSavingsPlanPurchaseRecommendationDetailsInput(v *GetSavingsPlanPurchaseRecommendationDetailsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSavingsPlanPurchaseRecommendationDetailsInput"} + if v.RecommendationDetailId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecommendationDetailId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSavingsPlansCoverageInput(v *GetSavingsPlansCoverageInput) error { if v == nil { return nil diff --git a/service/ec2/types/enums.go b/service/ec2/types/enums.go index 98da98b9db3..c4853fb4189 100644 --- a/service/ec2/types/enums.go +++ b/service/ec2/types/enums.go @@ -6470,6 +6470,7 @@ const ( SpotInstanceStateClosed SpotInstanceState = "closed" SpotInstanceStateCancelled SpotInstanceState = "cancelled" SpotInstanceStateFailed SpotInstanceState = "failed" + SpotInstanceStateDisabled SpotInstanceState = "disabled" ) // Values returns all known values for SpotInstanceState. Note that this can be @@ -6482,6 +6483,7 @@ func (SpotInstanceState) Values() []SpotInstanceState { "closed", "cancelled", "failed", + "disabled", } } diff --git a/service/glue/deserializers.go b/service/glue/deserializers.go index 8b1f3e60d30..9487dfe8668 100644 --- a/service/glue/deserializers.go +++ b/service/glue/deserializers.go @@ -28742,6 +28742,11 @@ func awsAwsjson11_deserializeDocumentCodeGenConfigurationNode(v **types.CodeGenC return err } + case "Recipe": + if err := awsAwsjson11_deserializeDocumentRecipe(&sv.Recipe, value); err != nil { + return err + } + case "RedshiftSource": if err := awsAwsjson11_deserializeDocumentRedshiftSource(&sv.RedshiftSource, value); err != nil { return err @@ -43956,6 +43961,105 @@ func awsAwsjson11_deserializeDocumentPublicKeysList(v *[]string, value interface return nil } +func awsAwsjson11_deserializeDocumentRecipe(v **types.Recipe, 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.Recipe + if *v == nil { + sv = &types.Recipe{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Inputs": + if err := awsAwsjson11_deserializeDocumentOneInput(&sv.Inputs, value); err != nil { + return err + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NodeName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RecipeReference": + if err := awsAwsjson11_deserializeDocumentRecipeReference(&sv.RecipeReference, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentRecipeReference(v **types.RecipeReference, 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.RecipeReference + if *v == nil { + sv = &types.RecipeReference{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RecipeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EnclosedInStringProperty to be of type string, got %T instead", value) + } + sv.RecipeArn = ptr.String(jtv) + } + + case "RecipeVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RecipeVersion to be of type string, got %T instead", value) + } + sv.RecipeVersion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentRecrawlPolicy(v **types.RecrawlPolicy, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/glue/serializers.go b/service/glue/serializers.go index 941c753beba..14cf35a2d66 100644 --- a/service/glue/serializers.go +++ b/service/glue/serializers.go @@ -12399,6 +12399,13 @@ func awsAwsjson11_serializeDocumentCodeGenConfigurationNode(v *types.CodeGenConf } } + if v.Recipe != nil { + ok := object.Key("Recipe") + if err := awsAwsjson11_serializeDocumentRecipe(v.Recipe, ok); err != nil { + return err + } + } + if v.RedshiftSource != nil { ok := object.Key("RedshiftSource") if err := awsAwsjson11_serializeDocumentRedshiftSource(v.RedshiftSource, ok); err != nil { @@ -16800,6 +16807,49 @@ func awsAwsjson11_serializeDocumentPublicKeysList(v []string, value smithyjson.V return nil } +func awsAwsjson11_serializeDocumentRecipe(v *types.Recipe, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Inputs != nil { + ok := object.Key("Inputs") + if err := awsAwsjson11_serializeDocumentOneInput(v.Inputs, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.RecipeReference != nil { + ok := object.Key("RecipeReference") + if err := awsAwsjson11_serializeDocumentRecipeReference(v.RecipeReference, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentRecipeReference(v *types.RecipeReference, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RecipeArn != nil { + ok := object.Key("RecipeArn") + ok.String(*v.RecipeArn) + } + + if v.RecipeVersion != nil { + ok := object.Key("RecipeVersion") + ok.String(*v.RecipeVersion) + } + + return nil +} + func awsAwsjson11_serializeDocumentRecrawlPolicy(v *types.RecrawlPolicy, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/glue/types/types.go b/service/glue/types/types.go index bc2cf6a83e6..872ca04f09f 100644 --- a/service/glue/types/types.go +++ b/service/glue/types/types.go @@ -939,6 +939,9 @@ type CodeGenConfigurationNode struct { // Specifies a target that uses Postgres SQL. PostgreSQLCatalogTarget *PostgreSQLCatalogTarget + // Specifies a Glue DataBrew recipe node. + Recipe *Recipe + // Specifies an Amazon Redshift data store. RedshiftSource *RedshiftSource @@ -5505,6 +5508,43 @@ type PropertyPredicate struct { noSmithyDocumentSerde } +// A Glue Studio node that uses a Glue DataBrew recipe in Glue jobs. +type Recipe struct { + + // The nodes that are inputs to the recipe node, identified by id. + // + // This member is required. + Inputs []string + + // The name of the Glue Studio node. + // + // This member is required. + Name *string + + // A reference to the DataBrew recipe used by the node. + // + // This member is required. + RecipeReference *RecipeReference + + noSmithyDocumentSerde +} + +// A reference to a Glue DataBrew recipe. +type RecipeReference struct { + + // The ARN of the DataBrew recipe. + // + // This member is required. + RecipeArn *string + + // The RecipeVersion of the DataBrew recipe. + // + // This member is required. + RecipeVersion *string + + noSmithyDocumentSerde +} + // When crawling an Amazon S3 data source after the first crawl is complete, // specifies whether to crawl the entire dataset again or to crawl only folders // that were added since the last crawler run. For more information, see diff --git a/service/glue/validators.go b/service/glue/validators.go index 1081a714630..7841f9daf39 100644 --- a/service/glue/validators.go +++ b/service/glue/validators.go @@ -4861,6 +4861,11 @@ func validateCodeGenConfigurationNode(v *types.CodeGenConfigurationNode) error { invalidParams.AddNested("EvaluateDataQualityMultiFrame", err.(smithy.InvalidParamsError)) } } + if v.Recipe != nil { + if err := validateRecipe(v.Recipe); err != nil { + invalidParams.AddNested("Recipe", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -6630,6 +6635,49 @@ func validatePostgreSQLCatalogTarget(v *types.PostgreSQLCatalogTarget) error { } } +func validateRecipe(v *types.Recipe) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Recipe"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Inputs == nil { + invalidParams.Add(smithy.NewErrParamRequired("Inputs")) + } + if v.RecipeReference == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecipeReference")) + } else if v.RecipeReference != nil { + if err := validateRecipeReference(v.RecipeReference); err != nil { + invalidParams.AddNested("RecipeReference", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRecipeReference(v *types.RecipeReference) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RecipeReference"} + if v.RecipeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecipeArn")) + } + if v.RecipeVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("RecipeVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateRedshiftSource(v *types.RedshiftSource) error { if v == nil { return nil diff --git a/service/quicksight/api_op_DescribeDashboardSnapshotJob.go b/service/quicksight/api_op_DescribeDashboardSnapshotJob.go new file mode 100644 index 00000000000..7da4779a7f4 --- /dev/null +++ b/service/quicksight/api_op_DescribeDashboardSnapshotJob.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Describes an existing snapshot job. Poll job descriptions after a job starts to +// know the status of the job. For information on available status codes, see +// JobStatus . +func (c *Client) DescribeDashboardSnapshotJob(ctx context.Context, params *DescribeDashboardSnapshotJobInput, optFns ...func(*Options)) (*DescribeDashboardSnapshotJobOutput, error) { + if params == nil { + params = &DescribeDashboardSnapshotJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDashboardSnapshotJob", params, optFns, c.addOperationDescribeDashboardSnapshotJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDashboardSnapshotJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDashboardSnapshotJobInput struct { + + // The ID of the Amazon Web Services account that the dashboard snapshot job is + // executed in. + // + // This member is required. + AwsAccountId *string + + // The ID of the dashboard that you have started a snapshot job for. + // + // This member is required. + DashboardId *string + + // The ID of the job to be described. The job ID is set when you start a new job + // with a StartDashboardSnapshotJob API call. + // + // This member is required. + SnapshotJobId *string + + noSmithyDocumentSerde +} + +type DescribeDashboardSnapshotJobOutput struct { + + // The Amazon Resource Name (ARN) for the snapshot job. The job ARN is generated + // when you start a new job with a StartDashboardSnapshotJob API call. + Arn *string + + // The ID of the Amazon Web Services account that the dashboard snapshot job is + // executed in. + AwsAccountId *string + + // The time that the snapshot job was created. + CreatedTime *time.Time + + // The ID of the dashboard that you have started a snapshot job for. + DashboardId *string + + // Indicates the status of a job. The status updates as the job executes. This + // shows one of the following values. + // - COMPLETED - The job was completed successfully. + // - FAILED - The job failed to execute. + // - QUEUED - The job is queued and hasn't started yet. + // - RUNNING - The job is still running. + JobStatus types.SnapshotJobStatus + + // The time that the snapshot job status was last updated. + LastUpdatedTime *time.Time + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The snapshot configuration of the job. This information is provided when you + // make a StartDashboardSnapshotJob API call. + SnapshotConfiguration *types.SnapshotConfiguration + + // The ID of the job to be described. The job ID is set when you start a new job + // with a StartDashboardSnapshotJob API call. + SnapshotJobId *string + + // The HTTP status of the request + Status int32 + + // The user configuration for the snapshot job. This information is provided when + // you make a StartDashboardSnapshotJob API call. + UserConfiguration *types.SnapshotUserConfigurationRedacted + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDashboardSnapshotJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDashboardSnapshotJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDashboardSnapshotJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpDescribeDashboardSnapshotJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDashboardSnapshotJob(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeDashboardSnapshotJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "DescribeDashboardSnapshotJob", + } +} diff --git a/service/quicksight/api_op_DescribeDashboardSnapshotJobResult.go b/service/quicksight/api_op_DescribeDashboardSnapshotJobResult.go new file mode 100644 index 00000000000..c61d980cb4a --- /dev/null +++ b/service/quicksight/api_op_DescribeDashboardSnapshotJobResult.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Describes the result of an existing snapshot job that has finished running. A +// finished snapshot job will return a COMPLETED or FAILED status when you poll +// the job with a DescribeDashboardSnapshotJob API call. If the job has not +// finished running, this operation returns a message that says Dashboard Snapshot +// Job with id has not reached a terminal state. . +func (c *Client) DescribeDashboardSnapshotJobResult(ctx context.Context, params *DescribeDashboardSnapshotJobResultInput, optFns ...func(*Options)) (*DescribeDashboardSnapshotJobResultOutput, error) { + if params == nil { + params = &DescribeDashboardSnapshotJobResultInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeDashboardSnapshotJobResult", params, optFns, c.addOperationDescribeDashboardSnapshotJobResultMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeDashboardSnapshotJobResultOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeDashboardSnapshotJobResultInput struct { + + // The ID of the Amazon Web Services account that the dashboard snapshot job is + // executed in. + // + // This member is required. + AwsAccountId *string + + // The ID of the dashboard that you have started a snapshot job for. + // + // This member is required. + DashboardId *string + + // The ID of the job to be described. The job ID is set when you start a new job + // with a StartDashboardSnapshotJob API call. + // + // This member is required. + SnapshotJobId *string + + noSmithyDocumentSerde +} + +type DescribeDashboardSnapshotJobResultOutput struct { + + // The Amazon Resource Name (ARN) for the snapshot job. The job ARN is generated + // when you start a new job with a StartDashboardSnapshotJob API call. + Arn *string + + // The time that a snapshot job was created. + CreatedTime *time.Time + + // Displays information for the error that caused a job to fail. + ErrorInfo *types.SnapshotJobErrorInfo + + // Indicates the status of a job after it has reached a terminal state. A finished + // snapshot job will retuen a COMPLETED or FAILED status. + JobStatus types.SnapshotJobStatus + + // The time that a snapshot job status was last updated. + LastUpdatedTime *time.Time + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The result of the snapshot job. Jobs that have successfully completed will + // return the S3Uri where they are located. Jobs that have failedwill return + // information on the error that caused the job to fail. + Result *types.SnapshotJobResult + + // The HTTP status of the request + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeDashboardSnapshotJobResultMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpDescribeDashboardSnapshotJobResultValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeDashboardSnapshotJobResult(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeDashboardSnapshotJobResult(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "DescribeDashboardSnapshotJobResult", + } +} diff --git a/service/quicksight/api_op_ListGroupMemberships.go b/service/quicksight/api_op_ListGroupMemberships.go index 622ebbe3267..53d1e33705b 100644 --- a/service/quicksight/api_op_ListGroupMemberships.go +++ b/service/quicksight/api_op_ListGroupMemberships.go @@ -4,6 +4,7 @@ package quicksight import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/quicksight/types" @@ -141,6 +142,97 @@ func (c *Client) addOperationListGroupMembershipsMiddlewares(stack *middleware.S return nil } +// ListGroupMembershipsAPIClient is a client that implements the +// ListGroupMemberships operation. +type ListGroupMembershipsAPIClient interface { + ListGroupMemberships(context.Context, *ListGroupMembershipsInput, ...func(*Options)) (*ListGroupMembershipsOutput, error) +} + +var _ ListGroupMembershipsAPIClient = (*Client)(nil) + +// ListGroupMembershipsPaginatorOptions is the paginator options for +// ListGroupMemberships +type ListGroupMembershipsPaginatorOptions struct { + // The maximum number of results to return from this request. + 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 +} + +// ListGroupMembershipsPaginator is a paginator for ListGroupMemberships +type ListGroupMembershipsPaginator struct { + options ListGroupMembershipsPaginatorOptions + client ListGroupMembershipsAPIClient + params *ListGroupMembershipsInput + nextToken *string + firstPage bool +} + +// NewListGroupMembershipsPaginator returns a new ListGroupMembershipsPaginator +func NewListGroupMembershipsPaginator(client ListGroupMembershipsAPIClient, params *ListGroupMembershipsInput, optFns ...func(*ListGroupMembershipsPaginatorOptions)) *ListGroupMembershipsPaginator { + if params == nil { + params = &ListGroupMembershipsInput{} + } + + options := ListGroupMembershipsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListGroupMembershipsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListGroupMembershipsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListGroupMemberships page. +func (p *ListGroupMembershipsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupMembershipsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListGroupMemberships(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 +} + func newServiceMetadataMiddleware_opListGroupMemberships(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListGroups.go b/service/quicksight/api_op_ListGroups.go index a8f469310f2..75a9bf8b9f1 100644 --- a/service/quicksight/api_op_ListGroups.go +++ b/service/quicksight/api_op_ListGroups.go @@ -4,6 +4,7 @@ package quicksight import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/quicksight/types" @@ -136,6 +137,95 @@ func (c *Client) addOperationListGroupsMiddlewares(stack *middleware.Stack, opti return nil } +// ListGroupsAPIClient is a client that implements the ListGroups operation. +type ListGroupsAPIClient interface { + ListGroups(context.Context, *ListGroupsInput, ...func(*Options)) (*ListGroupsOutput, error) +} + +var _ ListGroupsAPIClient = (*Client)(nil) + +// ListGroupsPaginatorOptions is the paginator options for ListGroups +type ListGroupsPaginatorOptions struct { + // The maximum number of results to return. + 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 +} + +// ListGroupsPaginator is a paginator for ListGroups +type ListGroupsPaginator struct { + options ListGroupsPaginatorOptions + client ListGroupsAPIClient + params *ListGroupsInput + nextToken *string + firstPage bool +} + +// NewListGroupsPaginator returns a new ListGroupsPaginator +func NewListGroupsPaginator(client ListGroupsAPIClient, params *ListGroupsInput, optFns ...func(*ListGroupsPaginatorOptions)) *ListGroupsPaginator { + if params == nil { + params = &ListGroupsInput{} + } + + options := ListGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListGroups page. +func (p *ListGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListGroups(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 +} + func newServiceMetadataMiddleware_opListGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListIAMPolicyAssignments.go b/service/quicksight/api_op_ListIAMPolicyAssignments.go index f5d1f4fe2ee..b19512db6ce 100644 --- a/service/quicksight/api_op_ListIAMPolicyAssignments.go +++ b/service/quicksight/api_op_ListIAMPolicyAssignments.go @@ -4,6 +4,7 @@ package quicksight import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/quicksight/types" @@ -138,6 +139,98 @@ func (c *Client) addOperationListIAMPolicyAssignmentsMiddlewares(stack *middlewa return nil } +// ListIAMPolicyAssignmentsAPIClient is a client that implements the +// ListIAMPolicyAssignments operation. +type ListIAMPolicyAssignmentsAPIClient interface { + ListIAMPolicyAssignments(context.Context, *ListIAMPolicyAssignmentsInput, ...func(*Options)) (*ListIAMPolicyAssignmentsOutput, error) +} + +var _ ListIAMPolicyAssignmentsAPIClient = (*Client)(nil) + +// ListIAMPolicyAssignmentsPaginatorOptions is the paginator options for +// ListIAMPolicyAssignments +type ListIAMPolicyAssignmentsPaginatorOptions struct { + // The maximum number of results to be returned per request. + 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 +} + +// ListIAMPolicyAssignmentsPaginator is a paginator for ListIAMPolicyAssignments +type ListIAMPolicyAssignmentsPaginator struct { + options ListIAMPolicyAssignmentsPaginatorOptions + client ListIAMPolicyAssignmentsAPIClient + params *ListIAMPolicyAssignmentsInput + nextToken *string + firstPage bool +} + +// NewListIAMPolicyAssignmentsPaginator returns a new +// ListIAMPolicyAssignmentsPaginator +func NewListIAMPolicyAssignmentsPaginator(client ListIAMPolicyAssignmentsAPIClient, params *ListIAMPolicyAssignmentsInput, optFns ...func(*ListIAMPolicyAssignmentsPaginatorOptions)) *ListIAMPolicyAssignmentsPaginator { + if params == nil { + params = &ListIAMPolicyAssignmentsInput{} + } + + options := ListIAMPolicyAssignmentsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIAMPolicyAssignmentsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIAMPolicyAssignmentsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIAMPolicyAssignments page. +func (p *ListIAMPolicyAssignmentsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIAMPolicyAssignmentsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListIAMPolicyAssignments(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 +} + func newServiceMetadataMiddleware_opListIAMPolicyAssignments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go b/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go index 79ace2024fd..a7512a5f279 100644 --- a/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go +++ b/service/quicksight/api_op_ListIAMPolicyAssignmentsForUser.go @@ -4,6 +4,7 @@ package quicksight import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/quicksight/types" @@ -141,6 +142,99 @@ func (c *Client) addOperationListIAMPolicyAssignmentsForUserMiddlewares(stack *m return nil } +// ListIAMPolicyAssignmentsForUserAPIClient is a client that implements the +// ListIAMPolicyAssignmentsForUser operation. +type ListIAMPolicyAssignmentsForUserAPIClient interface { + ListIAMPolicyAssignmentsForUser(context.Context, *ListIAMPolicyAssignmentsForUserInput, ...func(*Options)) (*ListIAMPolicyAssignmentsForUserOutput, error) +} + +var _ ListIAMPolicyAssignmentsForUserAPIClient = (*Client)(nil) + +// ListIAMPolicyAssignmentsForUserPaginatorOptions is the paginator options for +// ListIAMPolicyAssignmentsForUser +type ListIAMPolicyAssignmentsForUserPaginatorOptions struct { + // The maximum number of results to be returned per request. + 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 +} + +// ListIAMPolicyAssignmentsForUserPaginator is a paginator for +// ListIAMPolicyAssignmentsForUser +type ListIAMPolicyAssignmentsForUserPaginator struct { + options ListIAMPolicyAssignmentsForUserPaginatorOptions + client ListIAMPolicyAssignmentsForUserAPIClient + params *ListIAMPolicyAssignmentsForUserInput + nextToken *string + firstPage bool +} + +// NewListIAMPolicyAssignmentsForUserPaginator returns a new +// ListIAMPolicyAssignmentsForUserPaginator +func NewListIAMPolicyAssignmentsForUserPaginator(client ListIAMPolicyAssignmentsForUserAPIClient, params *ListIAMPolicyAssignmentsForUserInput, optFns ...func(*ListIAMPolicyAssignmentsForUserPaginatorOptions)) *ListIAMPolicyAssignmentsForUserPaginator { + if params == nil { + params = &ListIAMPolicyAssignmentsForUserInput{} + } + + options := ListIAMPolicyAssignmentsForUserPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListIAMPolicyAssignmentsForUserPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListIAMPolicyAssignmentsForUserPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListIAMPolicyAssignmentsForUser page. +func (p *ListIAMPolicyAssignmentsForUserPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListIAMPolicyAssignmentsForUserOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListIAMPolicyAssignmentsForUser(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 +} + func newServiceMetadataMiddleware_opListIAMPolicyAssignmentsForUser(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListUserGroups.go b/service/quicksight/api_op_ListUserGroups.go index e8bc592bb29..edcd7b81807 100644 --- a/service/quicksight/api_op_ListUserGroups.go +++ b/service/quicksight/api_op_ListUserGroups.go @@ -4,6 +4,7 @@ package quicksight import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/quicksight/types" @@ -142,6 +143,96 @@ func (c *Client) addOperationListUserGroupsMiddlewares(stack *middleware.Stack, return nil } +// ListUserGroupsAPIClient is a client that implements the ListUserGroups +// operation. +type ListUserGroupsAPIClient interface { + ListUserGroups(context.Context, *ListUserGroupsInput, ...func(*Options)) (*ListUserGroupsOutput, error) +} + +var _ ListUserGroupsAPIClient = (*Client)(nil) + +// ListUserGroupsPaginatorOptions is the paginator options for ListUserGroups +type ListUserGroupsPaginatorOptions struct { + // The maximum number of results to return from this request. + 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 +} + +// ListUserGroupsPaginator is a paginator for ListUserGroups +type ListUserGroupsPaginator struct { + options ListUserGroupsPaginatorOptions + client ListUserGroupsAPIClient + params *ListUserGroupsInput + nextToken *string + firstPage bool +} + +// NewListUserGroupsPaginator returns a new ListUserGroupsPaginator +func NewListUserGroupsPaginator(client ListUserGroupsAPIClient, params *ListUserGroupsInput, optFns ...func(*ListUserGroupsPaginatorOptions)) *ListUserGroupsPaginator { + if params == nil { + params = &ListUserGroupsInput{} + } + + options := ListUserGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUserGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUserGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListUserGroups page. +func (p *ListUserGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUserGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListUserGroups(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 +} + func newServiceMetadataMiddleware_opListUserGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_ListUsers.go b/service/quicksight/api_op_ListUsers.go index b9e3466eb06..39d010865b8 100644 --- a/service/quicksight/api_op_ListUsers.go +++ b/service/quicksight/api_op_ListUsers.go @@ -4,6 +4,7 @@ package quicksight import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/quicksight/types" @@ -136,6 +137,95 @@ func (c *Client) addOperationListUsersMiddlewares(stack *middleware.Stack, optio return nil } +// ListUsersAPIClient is a client that implements the ListUsers operation. +type ListUsersAPIClient interface { + ListUsers(context.Context, *ListUsersInput, ...func(*Options)) (*ListUsersOutput, error) +} + +var _ ListUsersAPIClient = (*Client)(nil) + +// ListUsersPaginatorOptions is the paginator options for ListUsers +type ListUsersPaginatorOptions struct { + // The maximum number of results to return from this request. + 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 +} + +// ListUsersPaginator is a paginator for ListUsers +type ListUsersPaginator struct { + options ListUsersPaginatorOptions + client ListUsersAPIClient + params *ListUsersInput + nextToken *string + firstPage bool +} + +// NewListUsersPaginator returns a new ListUsersPaginator +func NewListUsersPaginator(client ListUsersAPIClient, params *ListUsersInput, optFns ...func(*ListUsersPaginatorOptions)) *ListUsersPaginator { + if params == nil { + params = &ListUsersInput{} + } + + options := ListUsersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListUsersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListUsersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListUsers page. +func (p *ListUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListUsersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListUsers(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 +} + func newServiceMetadataMiddleware_opListUsers(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_SearchGroups.go b/service/quicksight/api_op_SearchGroups.go index 57d0a796a25..49f9af2e2c2 100644 --- a/service/quicksight/api_op_SearchGroups.go +++ b/service/quicksight/api_op_SearchGroups.go @@ -4,6 +4,7 @@ package quicksight import ( "context" + "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/quicksight/types" @@ -143,6 +144,95 @@ func (c *Client) addOperationSearchGroupsMiddlewares(stack *middleware.Stack, op return nil } +// SearchGroupsAPIClient is a client that implements the SearchGroups operation. +type SearchGroupsAPIClient interface { + SearchGroups(context.Context, *SearchGroupsInput, ...func(*Options)) (*SearchGroupsOutput, error) +} + +var _ SearchGroupsAPIClient = (*Client)(nil) + +// SearchGroupsPaginatorOptions is the paginator options for SearchGroups +type SearchGroupsPaginatorOptions struct { + // The maximum number of results to return from this request. + 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 +} + +// SearchGroupsPaginator is a paginator for SearchGroups +type SearchGroupsPaginator struct { + options SearchGroupsPaginatorOptions + client SearchGroupsAPIClient + params *SearchGroupsInput + nextToken *string + firstPage bool +} + +// NewSearchGroupsPaginator returns a new SearchGroupsPaginator +func NewSearchGroupsPaginator(client SearchGroupsAPIClient, params *SearchGroupsInput, optFns ...func(*SearchGroupsPaginatorOptions)) *SearchGroupsPaginator { + if params == nil { + params = &SearchGroupsInput{} + } + + options := SearchGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &SearchGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *SearchGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next SearchGroups page. +func (p *SearchGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*SearchGroupsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.SearchGroups(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 +} + func newServiceMetadataMiddleware_opSearchGroups(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/quicksight/api_op_StartDashboardSnapshotJob.go b/service/quicksight/api_op_StartDashboardSnapshotJob.go new file mode 100644 index 00000000000..9e7f589e747 --- /dev/null +++ b/service/quicksight/api_op_StartDashboardSnapshotJob.go @@ -0,0 +1,164 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package quicksight + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/quicksight/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts an asynchronous job that generates a dashboard snapshot. You can request +// up to one paginated PDF and up to five CSVs per API call. Poll job descriptions +// with a DescribeDashboardSnapshotJob API call. Once the job succeeds, use the +// DescribeDashboardSnapshotJobResult API to obtain the download URIs that the job +// generates. +func (c *Client) StartDashboardSnapshotJob(ctx context.Context, params *StartDashboardSnapshotJobInput, optFns ...func(*Options)) (*StartDashboardSnapshotJobOutput, error) { + if params == nil { + params = &StartDashboardSnapshotJobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartDashboardSnapshotJob", params, optFns, c.addOperationStartDashboardSnapshotJobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartDashboardSnapshotJobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartDashboardSnapshotJobInput struct { + + // The ID of the Amazon Web Services account that the dashboard snapshot job is + // executed in. + // + // This member is required. + AwsAccountId *string + + // The ID of the dashboard that you want to start a snapshot job for. + // + // This member is required. + DashboardId *string + + // A structure that describes the configuration of the dashboard snapshot. + // + // This member is required. + SnapshotConfiguration *types.SnapshotConfiguration + + // An ID for the dashboard snapshot job. This ID is unique to the dashboard while + // the job is running. This ID can be used to poll the status of a job with a + // DescribeDashboardSnapshotJob while the job runs. You can reuse this ID for + // another job 24 hours after the current job is completed. + // + // This member is required. + SnapshotJobId *string + + // A structure that contains information about the anonymous users that the + // generated snapshot is for. This API will not return information about registered + // Amazon QuickSight. + // + // This member is required. + UserConfiguration *types.SnapshotUserConfiguration + + noSmithyDocumentSerde +} + +type StartDashboardSnapshotJobOutput struct { + + // The Amazon Resource Name (ARN) for the dashboard snapshot job. + Arn *string + + // The Amazon Web Services request ID for this operation. + RequestId *string + + // The ID of the job. The job ID is set when you start a new job with a + // StartDashboardSnapshotJob API call. + SnapshotJobId *string + + // The HTTP status of the request + Status int32 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartDashboardSnapshotJobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDashboardSnapshotJob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartDashboardSnapshotJob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpStartDashboardSnapshotJobValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDashboardSnapshotJob(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartDashboardSnapshotJob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "quicksight", + OperationName: "StartDashboardSnapshotJob", + } +} diff --git a/service/quicksight/deserializers.go b/service/quicksight/deserializers.go index f7ca1efed08..ef7e64f8ae3 100644 --- a/service/quicksight/deserializers.go +++ b/service/quicksight/deserializers.go @@ -4747,6 +4747,12 @@ func awsRestjson1_deserializeOpErrorDeleteAccountCustomization(response *smithyh case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11457,14 +11463,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDashboardPermissionsOutput(v **De return nil } -type awsRestjson1_deserializeOpDescribeDataSet struct { +type awsRestjson1_deserializeOpDescribeDashboardSnapshotJob struct { } -func (*awsRestjson1_deserializeOpDescribeDataSet) ID() string { +func (*awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJob) 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) @@ -11478,12 +11484,275 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSet(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response, &metadata) } - output := &DescribeDataSetOutput{} + output := &DescribeDashboardSnapshotJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(output, response) + 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 = awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobOutput(v **DescribeDashboardSnapshotJobOutput, 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 *DescribeDashboardSnapshotJobOutput + if *v == nil { + sv = &DescribeDashboardSnapshotJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "AwsAccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AwsAccountId = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "DashboardId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.DashboardId = ptr.String(jtv) + } + + case "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotJobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.SnapshotJobStatus(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + case "SnapshotConfiguration": + if err := awsRestjson1_deserializeDocumentSnapshotConfiguration(&sv.SnapshotConfiguration, value); err != nil { + return err + } + + case "SnapshotJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.SnapshotJobId = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StatusCode to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Status = int32(i64) + } + + case "UserConfiguration": + if err := awsRestjson1_deserializeDocumentSnapshotUserConfigurationRedacted(&sv.UserConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult struct { +} + +func (*awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeDashboardSnapshotJobResult) 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, awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(response, &metadata) + } + output := &DescribeDashboardSnapshotJobResultOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeDashboardSnapshotJobResultOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11506,7 +11775,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11519,7 +11788,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSet) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDashboardSnapshotJobResult(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)} @@ -11569,12 +11838,18 @@ func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Respons case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -11585,7 +11860,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSet(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeDataSetOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDashboardSnapshotJobResultOutput(v *DescribeDashboardSnapshotJobResultOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11594,7 +11869,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeData return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSetOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDashboardSnapshotJobResultOutput(v **DescribeDashboardSnapshotJobResultOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11607,29 +11882,84 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetOutput + var sv *DescribeDashboardSnapshotJobResultOutput if *v == nil { - sv = &DescribeDataSetOutput{} + sv = &DescribeDashboardSnapshotJobResultOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSet": - if err := awsRestjson1_deserializeDocumentDataSet(&sv.DataSet, value); err != nil { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "ErrorInfo": + if err := awsRestjson1_deserializeDocumentSnapshotJobErrorInfo(&sv.ErrorInfo, value); err != nil { return err } + case "JobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotJobStatus to be of type string, got %T instead", value) + } + sv.JobStatus = types.SnapshotJobStatus(jtv) + } + + case "LastUpdatedTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + case "RequestId": 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 NonEmptyString to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } + case "Result": + if err := awsRestjson1_deserializeDocumentSnapshotJobResult(&sv.Result, value); err != nil { + return err + } + default: _, _ = key, value @@ -11639,14 +11969,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSet return nil } -type awsRestjson1_deserializeOpDescribeDataSetPermissions struct { +type awsRestjson1_deserializeOpDescribeDataSet struct { } -func (*awsRestjson1_deserializeOpDescribeDataSetPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSet) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSet) 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) @@ -11660,12 +11990,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSet(response, &metadata) } - output := &DescribeDataSetPermissionsOutput{} + output := &DescribeDataSetOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11688,7 +12018,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11701,7 +12031,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSet(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)} @@ -11767,7 +12097,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response *smithyh } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *DescribeDataSetPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetOutput(v *DescribeDataSetOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11776,7 +12106,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *D return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **DescribeDataSetPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSetOutput(v **DescribeDataSetOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11789,35 +12119,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetPermissionsOutput + var sv *DescribeDataSetOutput if *v == nil { - sv = &DescribeDataSetPermissionsOutput{} + sv = &DescribeDataSetOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DataSetArn = ptr.String(jtv) - } - - case "DataSetId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSetId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "DataSet": + if err := awsRestjson1_deserializeDocumentDataSet(&sv.DataSet, value); err != nil { return err } @@ -11839,14 +12151,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeDataSetRefreshProperties struct { +type awsRestjson1_deserializeOpDescribeDataSetPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSetPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSetPermissions) 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) @@ -11860,12 +12172,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(response, &metadata) } - output := &DescribeDataSetRefreshPropertiesOutput{} + output := &DescribeDataSetPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -11888,7 +12200,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -11901,7 +12213,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSetPermissions(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)} @@ -11951,12 +12263,6 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *s case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -11973,7 +12279,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response *s } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(v *DescribeDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetPermissionsOutput(v *DescribeDataSetPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -11982,7 +12288,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutpu return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v **DescribeDataSetRefreshPropertiesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSetPermissionsOutput(v **DescribeDataSetPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11995,17 +12301,35 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSetRefreshPropertiesOutput + var sv *DescribeDataSetPermissionsOutput if *v == nil { - sv = &DescribeDataSetRefreshPropertiesOutput{} + sv = &DescribeDataSetPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSetRefreshProperties": - if err := awsRestjson1_deserializeDocumentDataSetRefreshProperties(&sv.DataSetRefreshProperties, value); err != nil { + case "DataSetArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSetArn = ptr.String(jtv) + } + + case "DataSetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSetId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -12027,14 +12351,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v return nil } -type awsRestjson1_deserializeOpDescribeDataSource struct { +type awsRestjson1_deserializeOpDescribeDataSetRefreshProperties struct { } -func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSetRefreshProperties) 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) @@ -12048,12 +12372,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(response, &metadata) } - output := &DescribeDataSourceOutput{} + output := &DescribeDataSetRefreshPropertiesOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12076,7 +12400,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12089,7 +12413,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSource) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSetRefreshProperties(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)} @@ -12139,6 +12463,12 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -12155,7 +12485,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSource(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSetRefreshPropertiesOutput(v *DescribeDataSetRefreshPropertiesOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12164,7 +12494,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeD return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSetRefreshPropertiesOutput(v **DescribeDataSetRefreshPropertiesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12177,17 +12507,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourceOutput + var sv *DescribeDataSetRefreshPropertiesOutput if *v == nil { - sv = &DescribeDataSourceOutput{} + sv = &DescribeDataSetRefreshPropertiesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSource": - if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { + case "DataSetRefreshProperties": + if err := awsRestjson1_deserializeDocumentDataSetRefreshProperties(&sv.DataSetRefreshProperties, value); err != nil { return err } @@ -12209,14 +12539,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeData return nil } -type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { +type awsRestjson1_deserializeOpDescribeDataSource struct { } -func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSource) 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) @@ -12230,12 +12560,12 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSource(response, &metadata) } - output := &DescribeDataSourcePermissionsOutput{} + output := &DescribeDataSourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12258,7 +12588,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12271,7 +12601,7 @@ func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSource(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)} @@ -12337,7 +12667,7 @@ func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response *smit } } -func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourceOutput(v *DescribeDataSourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12346,7 +12676,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v return nil } -func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSourceOutput(v **DescribeDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12359,35 +12689,17 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeDataSourcePermissionsOutput + var sv *DescribeDataSourceOutput if *v == nil { - sv = &DescribeDataSourcePermissionsOutput{} + sv = &DescribeDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "DataSourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.DataSourceArn = ptr.String(jtv) - } - - case "DataSourceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) - } - sv.DataSourceId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "DataSource": + if err := awsRestjson1_deserializeDocumentDataSource(&sv.DataSource, value); err != nil { return err } @@ -12409,14 +12721,14 @@ func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **D return nil } -type awsRestjson1_deserializeOpDescribeFolder struct { +type awsRestjson1_deserializeOpDescribeDataSourcePermissions struct { } -func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { +func (*awsRestjson1_deserializeOpDescribeDataSourcePermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeDataSourcePermissions) 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) @@ -12430,12 +12742,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(response, &metadata) } - output := &DescribeFolderOutput{} + output := &DescribeDataSourcePermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12458,7 +12770,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12471,7 +12783,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolder) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeDataSourcePermissions(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)} @@ -12527,9 +12839,6 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - case strings.EqualFold("UnsupportedUserEditionException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12540,7 +12849,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolder(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeDataSourcePermissionsOutput(v *DescribeDataSourcePermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12549,7 +12858,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolde return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeDataSourcePermissionsOutput(v **DescribeDataSourcePermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12562,17 +12871,35 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderOutput + var sv *DescribeDataSourcePermissionsOutput if *v == nil { - sv = &DescribeFolderOutput{} + sv = &DescribeDataSourcePermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Folder": - if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { + case "DataSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.DataSourceArn = ptr.String(jtv) + } + + case "DataSourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.DataSourceId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -12594,14 +12921,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOu return nil } -type awsRestjson1_deserializeOpDescribeFolderPermissions struct { +type awsRestjson1_deserializeOpDescribeFolder struct { } -func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolder) 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) @@ -12615,12 +12942,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolder(response, &metadata) } - output := &DescribeFolderPermissionsOutput{} + output := &DescribeFolderOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12643,7 +12970,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12656,7 +12983,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolder(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)} @@ -12725,7 +13052,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *DescribeFolderPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderOutput(v *DescribeFolderOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12734,7 +13061,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *De return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **DescribeFolderPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderOutput(v **DescribeFolderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12747,35 +13074,17 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **Descr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderPermissionsOutput + var sv *DescribeFolderOutput if *v == nil { - sv = &DescribeFolderPermissionsOutput{} + sv = &DescribeFolderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "FolderId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) - } - sv.FolderId = ptr.String(jtv) - } - - case "Permissions": - if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { + case "Folder": + if err := awsRestjson1_deserializeDocumentFolder(&sv.Folder, value); err != nil { return err } @@ -12797,14 +13106,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **Descr return nil } -type awsRestjson1_deserializeOpDescribeFolderResolvedPermissions struct { +type awsRestjson1_deserializeOpDescribeFolderPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolderPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolderPermissions) 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) @@ -12818,12 +13127,12 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderPermissions(response, &metadata) } - output := &DescribeFolderResolvedPermissionsOutput{} + output := &DescribeFolderPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -12846,7 +13155,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12859,7 +13168,7 @@ func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolderPermissions(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)} @@ -12928,7 +13237,7 @@ func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response * } } -func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(v *DescribeFolderResolvedPermissionsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderPermissionsOutput(v *DescribeFolderPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -12937,7 +13246,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutp return nil } -func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v **DescribeFolderResolvedPermissionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderPermissionsOutput(v **DescribeFolderPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12950,9 +13259,9 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFolderResolvedPermissionsOutput + var sv *DescribeFolderPermissionsOutput if *v == nil { - sv = &DescribeFolderResolvedPermissionsOutput{} + sv = &DescribeFolderPermissionsOutput{} } else { sv = *v } @@ -13000,14 +13309,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v return nil } -type awsRestjson1_deserializeOpDescribeGroup struct { +type awsRestjson1_deserializeOpDescribeFolderResolvedPermissions struct { } -func (*awsRestjson1_deserializeOpDescribeGroup) ID() string { +func (*awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFolderResolvedPermissions) 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) @@ -13021,12 +13330,12 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(response, &metadata) } - output := &DescribeGroupOutput{} + output := &DescribeFolderResolvedPermissionsOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13049,7 +13358,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13062,7 +13371,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroup) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFolderResolvedPermissions(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)} @@ -13112,18 +13421,15 @@ func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ResourceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -13134,7 +13440,7 @@ func awsRestjson1_deserializeOpErrorDescribeGroup(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeFolderResolvedPermissionsOutput(v *DescribeFolderResolvedPermissionsOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13143,7 +13449,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupO return nil } -func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFolderResolvedPermissionsOutput(v **DescribeFolderResolvedPermissionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13156,17 +13462,35 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeGroupOutput + var sv *DescribeFolderResolvedPermissionsOutput if *v == nil { - sv = &DescribeGroupOutput{} + sv = &DescribeFolderResolvedPermissionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Group": - if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "FolderId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RestrictiveResourceId to be of type string, got %T instead", value) + } + sv.FolderId = ptr.String(jtv) + } + + case "Permissions": + if err := awsRestjson1_deserializeDocumentResourcePermissionList(&sv.Permissions, value); err != nil { return err } @@ -13188,14 +13512,14 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutp return nil } -type awsRestjson1_deserializeOpDescribeGroupMembership struct { +type awsRestjson1_deserializeOpDescribeGroup struct { } -func (*awsRestjson1_deserializeOpDescribeGroupMembership) ID() string { +func (*awsRestjson1_deserializeOpDescribeGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGroup) 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) @@ -13209,12 +13533,12 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroupMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroup(response, &metadata) } - output := &DescribeGroupMembershipOutput{} + output := &DescribeGroupOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13237,7 +13561,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13250,7 +13574,7 @@ func (m *awsRestjson1_deserializeOpDescribeGroupMembership) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGroup(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)} @@ -13322,7 +13646,7 @@ func awsRestjson1_deserializeOpErrorDescribeGroupMembership(response *smithyhttp } } -func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *DescribeGroupMembershipOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeGroupOutput(v *DescribeGroupOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13331,7 +13655,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *Desc return nil } -func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **DescribeGroupMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGroupOutput(v **DescribeGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13344,17 +13668,17 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeGroupMembershipOutput + var sv *DescribeGroupOutput if *v == nil { - sv = &DescribeGroupMembershipOutput{} + sv = &DescribeGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupMember": - if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { + case "Group": + if err := awsRestjson1_deserializeDocumentGroup(&sv.Group, value); err != nil { return err } @@ -13376,14 +13700,14 @@ func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **Describ return nil } -type awsRestjson1_deserializeOpDescribeIAMPolicyAssignment struct { +type awsRestjson1_deserializeOpDescribeGroupMembership struct { } -func (*awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) ID() string { +func (*awsRestjson1_deserializeOpDescribeGroupMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGroupMembership) 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) @@ -13397,12 +13721,12 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGroupMembership(response, &metadata) } - output := &DescribeIAMPolicyAssignmentOutput{} + output := &DescribeGroupMembershipOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13425,7 +13749,7 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13438,7 +13762,7 @@ func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) HandleDeserializ return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGroupMembership(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)} @@ -13485,15 +13809,18 @@ func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithy case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) - case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("PreconditionNotMetException", errorCode): + return awsRestjson1_deserializeErrorPreconditionNotMetException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorResourceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -13507,7 +13834,7 @@ func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response *smithy } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v *DescribeIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeGroupMembershipOutput(v *DescribeGroupMembershipOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13516,7 +13843,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v * return nil } -func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **DescribeIAMPolicyAssignmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGroupMembershipOutput(v **DescribeGroupMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13529,17 +13856,17 @@ func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **Des return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIAMPolicyAssignmentOutput + var sv *DescribeGroupMembershipOutput if *v == nil { - sv = &DescribeIAMPolicyAssignmentOutput{} + sv = &DescribeGroupMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "IAMPolicyAssignment": - if err := awsRestjson1_deserializeDocumentIAMPolicyAssignment(&sv.IAMPolicyAssignment, value); err != nil { + case "GroupMember": + if err := awsRestjson1_deserializeDocumentGroupMember(&sv.GroupMember, value); err != nil { return err } @@ -13561,14 +13888,14 @@ func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeIngestion struct { +type awsRestjson1_deserializeOpDescribeIAMPolicyAssignment struct { } -func (*awsRestjson1_deserializeOpDescribeIngestion) ID() string { +func (*awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeIAMPolicyAssignment) 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) @@ -13582,12 +13909,12 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeIngestion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(response, &metadata) } - output := &DescribeIngestionOutput{} + output := &DescribeIAMPolicyAssignmentOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -13610,7 +13937,7 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -13623,7 +13950,7 @@ func (m *awsRestjson1_deserializeOpDescribeIngestion) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeIAMPolicyAssignment(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)} @@ -13670,12 +13997,12 @@ func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Respo case strings.EqualFold("InternalFailureException", errorCode): return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + case strings.EqualFold("InvalidNextTokenException", errorCode): + return awsRestjson1_deserializeErrorInvalidNextTokenException(response, errorBody) + case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) - case strings.EqualFold("ResourceExistsException", errorCode): - return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -13692,7 +14019,7 @@ func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIngestionOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsDescribeIAMPolicyAssignmentOutput(v *DescribeIAMPolicyAssignmentOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -13701,7 +14028,7 @@ func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIn return nil } -func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeIngestionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeIAMPolicyAssignmentOutput(v **DescribeIAMPolicyAssignmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -13714,17 +14041,202 @@ func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeInges return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeIngestionOutput + var sv *DescribeIAMPolicyAssignmentOutput if *v == nil { - sv = &DescribeIngestionOutput{} + sv = &DescribeIAMPolicyAssignmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Ingestion": - if err := awsRestjson1_deserializeDocumentIngestion(&sv.Ingestion, value); err != nil { + case "IAMPolicyAssignment": + if err := awsRestjson1_deserializeDocumentIAMPolicyAssignment(&sv.IAMPolicyAssignment, value); err != nil { + return err + } + + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeIngestion struct { +} + +func (*awsRestjson1_deserializeOpDescribeIngestion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeIngestion) 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, awsRestjson1_deserializeOpErrorDescribeIngestion(response, &metadata) + } + output := &DescribeIngestionOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %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 = awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeIngestion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeIngestionOutput(v *DescribeIngestionOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeIngestionOutput(v **DescribeIngestionOutput, 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 *DescribeIngestionOutput + if *v == nil { + sv = &DescribeIngestionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Ingestion": + if err := awsRestjson1_deserializeDocumentIngestion(&sv.Ingestion, value); err != nil { return err } @@ -25294,14 +25806,14 @@ func awsRestjson1_deserializeOpDocumentStartAssetBundleImportJobOutput(v **Start return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpStartDashboardSnapshotJob struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpStartDashboardSnapshotJob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartDashboardSnapshotJob) 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) @@ -25315,12 +25827,12 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(response, &metadata) } - output := &TagResourceOutput{} + output := &StartDashboardSnapshotJobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -25343,7 +25855,7 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25356,7 +25868,7 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartDashboardSnapshotJob(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)} @@ -25409,12 +25921,21 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("LimitExceededException", errorCode): return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceExistsException", errorCode): + return awsRestjson1_deserializeErrorResourceExistsException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UnsupportedPricingPlanException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedPricingPlanException(response, errorBody) + + case strings.EqualFold("UnsupportedUserEditionException", errorCode): + return awsRestjson1_deserializeErrorUnsupportedUserEditionException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -25425,7 +25946,7 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsStartDashboardSnapshotJobOutput(v *StartDashboardSnapshotJobOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -25434,7 +25955,7 @@ func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutpu return nil } -func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartDashboardSnapshotJobOutput(v **StartDashboardSnapshotJobOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -25447,24 +25968,42 @@ func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *TagResourceOutput + var sv *StartDashboardSnapshotJobOutput if *v == nil { - sv = &TagResourceOutput{} + sv = &StartDashboardSnapshotJobOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "RequestId": 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 NonEmptyString to be of type string, got %T instead", value) } sv.RequestId = ptr.String(jtv) } + case "SnapshotJobId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.SnapshotJobId = ptr.String(jtv) + } + default: _, _ = key, value @@ -25474,14 +26013,14 @@ func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, return nil } -type awsRestjson1_deserializeOpUntagResource struct { +type awsRestjson1_deserializeOpTagResource struct { } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_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) @@ -25495,12 +26034,12 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &UntagResourceOutput{} + output := &TagResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -25523,7 +26062,7 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -25536,7 +26075,7 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_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)} @@ -25586,6 +26125,9 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("InvalidParameterValueException", errorCode): return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsRestjson1_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -25602,7 +26144,7 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsTagResourceOutput(v *TagResourceOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } @@ -25611,7 +26153,7 @@ func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceO return nil } -func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -25624,9 +26166,9 @@ func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UntagResourceOutput + var sv *TagResourceOutput if *v == nil { - sv = &UntagResourceOutput{} + sv = &TagResourceOutput{} } else { sv = *v } @@ -25651,14 +26193,14 @@ func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutp return nil } -type awsRestjson1_deserializeOpUpdateAccountCustomization struct { +type awsRestjson1_deserializeOpUntagResource struct { } -func (*awsRestjson1_deserializeOpUpdateAccountCustomization) ID() string { +func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_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) @@ -25672,12 +26214,189 @@ func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateAccountCustomizationOutput{} + output := &UntagResourceOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %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 = awsRestjson1_deserializeOpDocumentUntagResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalFailureException", errorCode): + return awsRestjson1_deserializeErrorInternalFailureException(response, errorBody) + + case strings.EqualFold("InvalidParameterValueException", errorCode): + return awsRestjson1_deserializeErrorInvalidParameterValueException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsUntagResourceOutput(v *UntagResourceOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + v.Status = int32(response.StatusCode) + + return nil +} +func awsRestjson1_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UntagResourceOutput + if *v == nil { + sv = &UntagResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RequestId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateAccountCustomization struct { +} + +func (*awsRestjson1_deserializeOpUpdateAccountCustomization) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAccountCustomization) 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, awsRestjson1_deserializeOpErrorUpdateAccountCustomization(response, &metadata) + } + output := &UpdateAccountCustomizationOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsUpdateAccountCustomizationOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } @@ -32700,6 +33419,11 @@ func awsRestjson1_deserializeDocumentAggregationFunction(v **types.AggregationFu for key, value := range shape { switch key { + case "AttributeAggregationFunction": + if err := awsRestjson1_deserializeDocumentAttributeAggregationFunction(&sv.AttributeAggregationFunction, value); err != nil { + return err + } + case "CategoricalAggregationFunction": if value != nil { jtv, ok := value.(string) @@ -33427,6 +34151,76 @@ func awsRestjson1_deserializeDocumentAnchorDateConfiguration(v **types.AnchorDat return nil } +func awsRestjson1_deserializeDocumentAnonymousUserSnapshotJobResult(v **types.AnonymousUserSnapshotJobResult, 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.AnonymousUserSnapshotJobResult + if *v == nil { + sv = &types.AnonymousUserSnapshotJobResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FileGroups": + if err := awsRestjson1_deserializeDocumentSnapshotJobResultFileGroupList(&sv.FileGroups, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAnonymousUserSnapshotJobResultList(v *[]types.AnonymousUserSnapshotJobResult, 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.AnonymousUserSnapshotJobResult + if *v == nil { + cv = []types.AnonymousUserSnapshotJobResult{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AnonymousUserSnapshotJobResult + destAddr := &col + if err := awsRestjson1_deserializeDocumentAnonymousUserSnapshotJobResult(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentArcAxisConfiguration(v **types.ArcAxisConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -36012,7 +36806,7 @@ func awsRestjson1_deserializeDocumentAthenaParameters(v **types.AthenaParameters return nil } -func awsRestjson1_deserializeDocumentAuroraParameters(v **types.AuroraParameters, value interface{}) error { +func awsRestjson1_deserializeDocumentAttributeAggregationFunction(v **types.AttributeAggregationFunction, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36025,44 +36819,31 @@ func awsRestjson1_deserializeDocumentAuroraParameters(v **types.AuroraParameters return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AuroraParameters + var sv *types.AttributeAggregationFunction if *v == nil { - sv = &types.AuroraParameters{} + sv = &types.AttributeAggregationFunction{} } else { sv = *v } for key, value := range shape { switch key { - case "Database": + case "SimpleAttributeAggregation": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Database to be of type string, got %T instead", value) + return fmt.Errorf("expected SimpleAttributeAggregationFunction to be of type string, got %T instead", value) } - sv.Database = ptr.String(jtv) + sv.SimpleAttributeAggregation = types.SimpleAttributeAggregationFunction(jtv) } - case "Host": + case "ValueForMultipleValues": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Host to be of type string, got %T instead", value) - } - sv.Host = ptr.String(jtv) - } - - case "Port": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Port to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Port = int32(i64) + sv.ValueForMultipleValues = ptr.String(jtv) } default: @@ -36074,7 +36855,7 @@ func awsRestjson1_deserializeDocumentAuroraParameters(v **types.AuroraParameters return nil } -func awsRestjson1_deserializeDocumentAuroraPostgreSqlParameters(v **types.AuroraPostgreSqlParameters, value interface{}) error { +func awsRestjson1_deserializeDocumentAuroraParameters(v **types.AuroraParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36087,9 +36868,71 @@ func awsRestjson1_deserializeDocumentAuroraPostgreSqlParameters(v **types.Aurora return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AuroraPostgreSqlParameters + var sv *types.AuroraParameters if *v == nil { - sv = &types.AuroraPostgreSqlParameters{} + sv = &types.AuroraParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Database": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Database to be of type string, got %T instead", value) + } + sv.Database = ptr.String(jtv) + } + + case "Host": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Host to be of type string, got %T instead", value) + } + sv.Host = ptr.String(jtv) + } + + case "Port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAuroraPostgreSqlParameters(v **types.AuroraPostgreSqlParameters, 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.AuroraPostgreSqlParameters + if *v == nil { + sv = &types.AuroraPostgreSqlParameters{} } else { sv = *v } @@ -45740,6 +46583,51 @@ func awsRestjson1_deserializeDocumentDateTimeHierarchy(v **types.DateTimeHierarc return nil } +func awsRestjson1_deserializeDocumentDateTimeParameter(v **types.DateTimeParameter, 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.DateTimeParameter + if *v == nil { + sv = &types.DateTimeParameter{} + } 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 NonEmptyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Values": + if err := awsRestjson1_deserializeDocumentSensitiveTimestampList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDateTimeParameterDeclaration(v **types.DateTimeParameterDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -45804,6 +46692,40 @@ func awsRestjson1_deserializeDocumentDateTimeParameterDeclaration(v **types.Date return nil } +func awsRestjson1_deserializeDocumentDateTimeParameterList(v *[]types.DateTimeParameter, 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.DateTimeParameter + if *v == nil { + cv = []types.DateTimeParameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DateTimeParameter + destAddr := &col + if err := awsRestjson1_deserializeDocumentDateTimeParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentDateTimePickerControlDisplayOptions(v **types.DateTimePickerControlDisplayOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -45835,6 +46757,11 @@ func awsRestjson1_deserializeDocumentDateTimePickerControlDisplayOptions(v **typ sv.DateTimeFormat = ptr.String(jtv) } + case "InfoIconLabelOptions": + if err := awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(&sv.InfoIconLabelOptions, value); err != nil { + return err + } + case "TitleOptions": if err := awsRestjson1_deserializeDocumentLabelOptions(&sv.TitleOptions, value); err != nil { return err @@ -46167,6 +47094,51 @@ func awsRestjson1_deserializeDocumentDecimalDefaultValues(v **types.DecimalDefau return nil } +func awsRestjson1_deserializeDocumentDecimalParameter(v **types.DecimalParameter, 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.DecimalParameter + if *v == nil { + sv = &types.DecimalParameter{} + } 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 NonEmptyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Values": + if err := awsRestjson1_deserializeDocumentSensitiveDoubleList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentDecimalParameterDeclaration(v **types.DecimalParameterDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -46231,6 +47203,40 @@ func awsRestjson1_deserializeDocumentDecimalParameterDeclaration(v **types.Decim return nil } +func awsRestjson1_deserializeDocumentDecimalParameterList(v *[]types.DecimalParameter, 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.DecimalParameter + if *v == nil { + cv = []types.DecimalParameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DecimalParameter + destAddr := &col + if err := awsRestjson1_deserializeDocumentDecimalParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentDecimalPlacesConfiguration(v **types.DecimalPlacesConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -47184,6 +48190,11 @@ func awsRestjson1_deserializeDocumentDropDownControlDisplayOptions(v **types.Dro for key, value := range shape { switch key { + case "InfoIconLabelOptions": + if err := awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(&sv.InfoIconLabelOptions, value); err != nil { + return err + } + case "SelectAllOptions": if err := awsRestjson1_deserializeDocumentListControlSelectAllOptions(&sv.SelectAllOptions, value); err != nil { return err @@ -55142,6 +56153,51 @@ func awsRestjson1_deserializeDocumentIntegerDefaultValues(v **types.IntegerDefau return nil } +func awsRestjson1_deserializeDocumentIntegerParameter(v **types.IntegerParameter, 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.IntegerParameter + if *v == nil { + sv = &types.IntegerParameter{} + } 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 NonEmptyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Values": + if err := awsRestjson1_deserializeDocumentSensitiveLongList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentIntegerParameterDeclaration(v **types.IntegerParameterDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -55206,6 +56262,40 @@ func awsRestjson1_deserializeDocumentIntegerParameterDeclaration(v **types.Integ return nil } +func awsRestjson1_deserializeDocumentIntegerParameterList(v *[]types.IntegerParameter, 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.IntegerParameter + if *v == nil { + cv = []types.IntegerParameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.IntegerParameter + destAddr := &col + if err := awsRestjson1_deserializeDocumentIntegerParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentIntegerValueWhenUnsetConfiguration(v **types.IntegerValueWhenUnsetConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -57119,6 +58209,11 @@ func awsRestjson1_deserializeDocumentListControlDisplayOptions(v **types.ListCon for key, value := range shape { switch key { + case "InfoIconLabelOptions": + if err := awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(&sv.InfoIconLabelOptions, value); err != nil { + return err + } + case "SearchOptions": if err := awsRestjson1_deserializeDocumentListControlSearchOptions(&sv.SearchOptions, value); err != nil { return err @@ -60473,6 +61568,57 @@ func awsRestjson1_deserializeDocumentParameterListControl(v **types.ParameterLis return nil } +func awsRestjson1_deserializeDocumentParameters(v **types.Parameters, 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.Parameters + if *v == nil { + sv = &types.Parameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DateTimeParameters": + if err := awsRestjson1_deserializeDocumentDateTimeParameterList(&sv.DateTimeParameters, value); err != nil { + return err + } + + case "DecimalParameters": + if err := awsRestjson1_deserializeDocumentDecimalParameterList(&sv.DecimalParameters, value); err != nil { + return err + } + + case "IntegerParameters": + if err := awsRestjson1_deserializeDocumentIntegerParameterList(&sv.IntegerParameters, value); err != nil { + return err + } + + case "StringParameters": + if err := awsRestjson1_deserializeDocumentStringParameterList(&sv.StringParameters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentParameterSelectableValueList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -65122,6 +66268,11 @@ func awsRestjson1_deserializeDocumentRelativeDateTimeControlDisplayOptions(v **t sv.DateTimeFormat = ptr.String(jtv) } + case "InfoIconLabelOptions": + if err := awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(&sv.InfoIconLabelOptions, value); err != nil { + return err + } + case "TitleOptions": if err := awsRestjson1_deserializeDocumentLabelOptions(&sv.TitleOptions, value); err != nil { return err @@ -65967,6 +67118,64 @@ func awsRestjson1_deserializeDocumentRowSortList(v *[]types.FieldSortOptions, va return nil } +func awsRestjson1_deserializeDocumentS3BucketConfiguration(v **types.S3BucketConfiguration, 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.S3BucketConfiguration + if *v == nil { + sv = &types.S3BucketConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "BucketPrefix": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.BucketPrefix = ptr.String(jtv) + } + + case "BucketRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.BucketRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentS3Parameters(v **types.S3Parameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -67311,6 +68520,107 @@ func awsRestjson1_deserializeDocumentSemanticType(v **types.SemanticType, value return nil } +func awsRestjson1_deserializeDocumentSensitiveDoubleList(v *[]float64, 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 []float64 + if *v == nil { + cv = []float64{} + } else { + cv = *v + } + + for _, value := range shape { + var col float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + col = f64 + + default: + return fmt.Errorf("expected SensitiveDouble to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSensitiveLongList(v *[]int64, 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 []int64 + if *v == nil { + cv = []int64{} + } else { + cv = *v + } + + for _, value := range shape { + var col int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SensitiveLong to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + col = i64 + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSensitiveStringList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -67347,6 +68657,49 @@ func awsRestjson1_deserializeDocumentSensitiveStringList(v *[]string, value inte return nil } +func awsRestjson1_deserializeDocumentSensitiveTimestampList(v *[]time.Time, 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 []time.Time + if *v == nil { + cv = []time.Time{} + } else { + cv = *v + } + + for _, value := range shape { + var col time.Time + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + col = smithytime.ParseEpochSeconds(f64) + + default: + return fmt.Errorf("expected SensitiveTimestamp to be a JSON Number, got %T instead", value) + + } + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSeriesItem(v **types.SeriesItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -67511,6 +68864,42 @@ func awsRestjson1_deserializeDocumentSessionLifetimeInMinutesInvalidException(v return nil } +func awsRestjson1_deserializeDocumentSessionTagKeyList(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 SessionTagKey to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSetParameterValueConfiguration(v **types.SetParameterValueConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -67675,6 +69064,55 @@ func awsRestjson1_deserializeDocumentSheet(v **types.Sheet, value interface{}) e return nil } +func awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(v **types.SheetControlInfoIconLabelOptions, 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.SheetControlInfoIconLabelOptions + if *v == nil { + sv = &types.SheetControlInfoIconLabelOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InfoIconText": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SheetControlInfoIconText to be of type string, got %T instead", value) + } + sv.InfoIconText = ptr.String(jtv) + } + + case "Visibility": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Visibility to be of type string, got %T instead", value) + } + sv.Visibility = types.Visibility(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSheetControlLayout(v **types.SheetControlLayout, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -68544,6 +69982,11 @@ func awsRestjson1_deserializeDocumentSliderControlDisplayOptions(v **types.Slide for key, value := range shape { switch key { + case "InfoIconLabelOptions": + if err := awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(&sv.InfoIconLabelOptions, value); err != nil { + return err + } + case "TitleOptions": if err := awsRestjson1_deserializeDocumentLabelOptions(&sv.TitleOptions, value); err != nil { return err @@ -68713,7 +70156,7 @@ func awsRestjson1_deserializeDocumentSmallMultiplesOptions(v **types.SmallMultip return nil } -func awsRestjson1_deserializeDocumentSnowflakeParameters(v **types.SnowflakeParameters, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotAnonymousUserRedacted(v **types.SnapshotAnonymousUserRedacted, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -68726,40 +70169,18 @@ func awsRestjson1_deserializeDocumentSnowflakeParameters(v **types.SnowflakePara return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SnowflakeParameters + var sv *types.SnapshotAnonymousUserRedacted if *v == nil { - sv = &types.SnowflakeParameters{} + sv = &types.SnapshotAnonymousUserRedacted{} } else { sv = *v } for key, value := range shape { switch key { - case "Database": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Database to be of type string, got %T instead", value) - } - sv.Database = ptr.String(jtv) - } - - case "Host": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Host to be of type string, got %T instead", value) - } - sv.Host = ptr.String(jtv) - } - - case "Warehouse": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Warehouse to be of type string, got %T instead", value) - } - sv.Warehouse = ptr.String(jtv) + case "RowLevelPermissionTagKeys": + if err := awsRestjson1_deserializeDocumentSessionTagKeyList(&sv.RowLevelPermissionTagKeys, value); err != nil { + return err } default: @@ -68771,7 +70192,41 @@ func awsRestjson1_deserializeDocumentSnowflakeParameters(v **types.SnowflakePara return nil } -func awsRestjson1_deserializeDocumentSpacing(v **types.Spacing, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotAnonymousUserRedactedList(v *[]types.SnapshotAnonymousUserRedacted, 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.SnapshotAnonymousUserRedacted + if *v == nil { + cv = []types.SnapshotAnonymousUserRedacted{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SnapshotAnonymousUserRedacted + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotAnonymousUserRedacted(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotConfiguration(v **types.SnapshotConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -68784,49 +70239,28 @@ func awsRestjson1_deserializeDocumentSpacing(v **types.Spacing, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Spacing + var sv *types.SnapshotConfiguration if *v == nil { - sv = &types.Spacing{} + sv = &types.SnapshotConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "Bottom": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Length to be of type string, got %T instead", value) - } - sv.Bottom = ptr.String(jtv) - } - - case "Left": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Length to be of type string, got %T instead", value) - } - sv.Left = ptr.String(jtv) + case "DestinationConfiguration": + if err := awsRestjson1_deserializeDocumentSnapshotDestinationConfiguration(&sv.DestinationConfiguration, value); err != nil { + return err } - case "Right": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Length to be of type string, got %T instead", value) - } - sv.Right = ptr.String(jtv) + case "FileGroups": + if err := awsRestjson1_deserializeDocumentSnapshotFileGroupList(&sv.FileGroups, value); err != nil { + return err } - case "Top": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Length to be of type string, got %T instead", value) - } - sv.Top = ptr.String(jtv) + case "Parameters": + if err := awsRestjson1_deserializeDocumentParameters(&sv.Parameters, value); err != nil { + return err } default: @@ -68838,7 +70272,7 @@ func awsRestjson1_deserializeDocumentSpacing(v **types.Spacing, value interface{ return nil } -func awsRestjson1_deserializeDocumentSparkParameters(v **types.SparkParameters, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotDestinationConfiguration(v **types.SnapshotDestinationConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -68851,35 +70285,18 @@ func awsRestjson1_deserializeDocumentSparkParameters(v **types.SparkParameters, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SparkParameters + var sv *types.SnapshotDestinationConfiguration if *v == nil { - sv = &types.SparkParameters{} + sv = &types.SnapshotDestinationConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "Host": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Host to be of type string, got %T instead", value) - } - sv.Host = ptr.String(jtv) - } - - case "Port": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Port to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Port = int32(i64) + case "S3Destinations": + if err := awsRestjson1_deserializeDocumentSnapshotS3DestinationConfigurationList(&sv.S3Destinations, value); err != nil { + return err } default: @@ -68891,7 +70308,7 @@ func awsRestjson1_deserializeDocumentSparkParameters(v **types.SparkParameters, return nil } -func awsRestjson1_deserializeDocumentSqlServerParameters(v **types.SqlServerParameters, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotFile(v **types.SnapshotFile, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -68904,44 +70321,27 @@ func awsRestjson1_deserializeDocumentSqlServerParameters(v **types.SqlServerPara return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SqlServerParameters + var sv *types.SnapshotFile if *v == nil { - sv = &types.SqlServerParameters{} + sv = &types.SnapshotFile{} } else { sv = *v } for key, value := range shape { switch key { - case "Database": + case "FormatType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Database to be of type string, got %T instead", value) + return fmt.Errorf("expected SnapshotFileFormatType to be of type string, got %T instead", value) } - sv.Database = ptr.String(jtv) + sv.FormatType = types.SnapshotFileFormatType(jtv) } - case "Host": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Host to be of type string, got %T instead", value) - } - sv.Host = ptr.String(jtv) - } - - case "Port": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Port to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Port = int32(i64) + case "SheetSelections": + if err := awsRestjson1_deserializeDocumentSnapshotFileSheetSelectionList(&sv.SheetSelections, value); err != nil { + return err } default: @@ -68953,7 +70353,7 @@ func awsRestjson1_deserializeDocumentSqlServerParameters(v **types.SqlServerPara return nil } -func awsRestjson1_deserializeDocumentSslProperties(v **types.SslProperties, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotFileGroup(v **types.SnapshotFileGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -68966,22 +70366,18 @@ func awsRestjson1_deserializeDocumentSslProperties(v **types.SslProperties, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SslProperties + var sv *types.SnapshotFileGroup if *v == nil { - sv = &types.SslProperties{} + sv = &types.SnapshotFileGroup{} } else { sv = *v } for key, value := range shape { switch key { - case "DisableSsl": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.DisableSsl = jtv + case "Files": + if err := awsRestjson1_deserializeDocumentSnapshotFileList(&sv.Files, value); err != nil { + return err } default: @@ -68993,7 +70389,7 @@ func awsRestjson1_deserializeDocumentSslProperties(v **types.SslProperties, valu return nil } -func awsRestjson1_deserializeDocumentStringDatasetParameter(v **types.StringDatasetParameter, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotFileGroupList(v *[]types.SnapshotFileGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -69001,62 +70397,67 @@ func awsRestjson1_deserializeDocumentStringDatasetParameter(v **types.StringData 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.StringDatasetParameter + var cv []types.SnapshotFileGroup if *v == nil { - sv = &types.StringDatasetParameter{} + cv = []types.SnapshotFileGroup{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "DefaultValues": - if err := awsRestjson1_deserializeDocumentStringDatasetParameterDefaultValues(&sv.DefaultValues, value); err != nil { - return err - } + for _, value := range shape { + var col types.SnapshotFileGroup + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotFileGroup(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - case "Id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DatasetParameterId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } + } + *v = cv + return nil +} - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DatasetParameterName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } +func awsRestjson1_deserializeDocumentSnapshotFileList(v *[]types.SnapshotFile, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "ValueType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DatasetParameterValueType to be of type string, got %T instead", value) - } - sv.ValueType = types.DatasetParameterValueType(jtv) - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - _, _ = key, value + var cv []types.SnapshotFile + if *v == nil { + cv = []types.SnapshotFile{} + } else { + cv = *v + } + for _, value := range shape { + var col types.SnapshotFile + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotFile(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentStringDatasetParameterDefaultValues(v **types.StringDatasetParameterDefaultValues, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotFileSheetSelection(v **types.SnapshotFileSheetSelection, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -69069,17 +70470,35 @@ func awsRestjson1_deserializeDocumentStringDatasetParameterDefaultValues(v **typ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.StringDatasetParameterDefaultValues + var sv *types.SnapshotFileSheetSelection if *v == nil { - sv = &types.StringDatasetParameterDefaultValues{} + sv = &types.SnapshotFileSheetSelection{} } else { sv = *v } for key, value := range shape { switch key { - case "StaticValues": - if err := awsRestjson1_deserializeDocumentStringDatasetParameterValueList(&sv.StaticValues, value); err != nil { + case "SelectionScope": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SnapshotFileSheetSelectionScope to be of type string, got %T instead", value) + } + sv.SelectionScope = types.SnapshotFileSheetSelectionScope(jtv) + } + + case "SheetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + sv.SheetId = ptr.String(jtv) + } + + case "VisualIds": + if err := awsRestjson1_deserializeDocumentSnapshotFileSheetSelectionVisualIdList(&sv.VisualIds, value); err != nil { return err } @@ -69092,7 +70511,7 @@ func awsRestjson1_deserializeDocumentStringDatasetParameterDefaultValues(v **typ return nil } -func awsRestjson1_deserializeDocumentStringDatasetParameterValueList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotFileSheetSelectionList(v *[]types.SnapshotFileSheetSelection, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -69105,22 +70524,20 @@ func awsRestjson1_deserializeDocumentStringDatasetParameterValueList(v *[]string return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.SnapshotFileSheetSelection if *v == nil { - cv = []string{} + cv = []types.SnapshotFileSheetSelection{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StringDatasetParameterDefaultValue to be of type string, got %T instead", value) - } - col = jtv + var col types.SnapshotFileSheetSelection + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotFileSheetSelection(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -69128,7 +70545,891 @@ func awsRestjson1_deserializeDocumentStringDatasetParameterValueList(v *[]string return nil } -func awsRestjson1_deserializeDocumentStringDefaultValueList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentSnapshotFileSheetSelectionVisualIdList(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 ShortRestrictiveResourceId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobErrorInfo(v **types.SnapshotJobErrorInfo, 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.SnapshotJobErrorInfo + if *v == nil { + sv = &types.SnapshotJobErrorInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "ErrorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobResult(v **types.SnapshotJobResult, 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.SnapshotJobResult + if *v == nil { + sv = &types.SnapshotJobResult{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AnonymousUsers": + if err := awsRestjson1_deserializeDocumentAnonymousUserSnapshotJobResultList(&sv.AnonymousUsers, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobResultErrorInfo(v **types.SnapshotJobResultErrorInfo, 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.SnapshotJobResultErrorInfo + if *v == nil { + sv = &types.SnapshotJobResultErrorInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "ErrorType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobResultErrorInfoList(v *[]types.SnapshotJobResultErrorInfo, 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.SnapshotJobResultErrorInfo + if *v == nil { + cv = []types.SnapshotJobResultErrorInfo{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SnapshotJobResultErrorInfo + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotJobResultErrorInfo(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobResultFileGroup(v **types.SnapshotJobResultFileGroup, 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.SnapshotJobResultFileGroup + if *v == nil { + sv = &types.SnapshotJobResultFileGroup{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Files": + if err := awsRestjson1_deserializeDocumentSnapshotFileList(&sv.Files, value); err != nil { + return err + } + + case "S3Results": + if err := awsRestjson1_deserializeDocumentSnapshotJobS3ResultList(&sv.S3Results, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobResultFileGroupList(v *[]types.SnapshotJobResultFileGroup, 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.SnapshotJobResultFileGroup + if *v == nil { + cv = []types.SnapshotJobResultFileGroup{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SnapshotJobResultFileGroup + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotJobResultFileGroup(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobS3Result(v **types.SnapshotJobS3Result, 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.SnapshotJobS3Result + if *v == nil { + sv = &types.SnapshotJobS3Result{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorInfo": + if err := awsRestjson1_deserializeDocumentSnapshotJobResultErrorInfoList(&sv.ErrorInfo, value); err != nil { + return err + } + + case "S3DestinationConfiguration": + if err := awsRestjson1_deserializeDocumentSnapshotS3DestinationConfiguration(&sv.S3DestinationConfiguration, value); err != nil { + return err + } + + case "S3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveS3Uri to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotJobS3ResultList(v *[]types.SnapshotJobS3Result, 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.SnapshotJobS3Result + if *v == nil { + cv = []types.SnapshotJobS3Result{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SnapshotJobS3Result + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotJobS3Result(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotS3DestinationConfiguration(v **types.SnapshotS3DestinationConfiguration, 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.SnapshotS3DestinationConfiguration + if *v == nil { + sv = &types.SnapshotS3DestinationConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BucketConfiguration": + if err := awsRestjson1_deserializeDocumentS3BucketConfiguration(&sv.BucketConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotS3DestinationConfigurationList(v *[]types.SnapshotS3DestinationConfiguration, 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.SnapshotS3DestinationConfiguration + if *v == nil { + cv = []types.SnapshotS3DestinationConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SnapshotS3DestinationConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentSnapshotS3DestinationConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSnapshotUserConfigurationRedacted(v **types.SnapshotUserConfigurationRedacted, 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.SnapshotUserConfigurationRedacted + if *v == nil { + sv = &types.SnapshotUserConfigurationRedacted{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AnonymousUsers": + if err := awsRestjson1_deserializeDocumentSnapshotAnonymousUserRedactedList(&sv.AnonymousUsers, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSnowflakeParameters(v **types.SnowflakeParameters, 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.SnowflakeParameters + if *v == nil { + sv = &types.SnowflakeParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Database": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Database to be of type string, got %T instead", value) + } + sv.Database = ptr.String(jtv) + } + + case "Host": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Host to be of type string, got %T instead", value) + } + sv.Host = ptr.String(jtv) + } + + case "Warehouse": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Warehouse to be of type string, got %T instead", value) + } + sv.Warehouse = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSpacing(v **types.Spacing, 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.Spacing + if *v == nil { + sv = &types.Spacing{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Bottom": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Length to be of type string, got %T instead", value) + } + sv.Bottom = ptr.String(jtv) + } + + case "Left": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Length to be of type string, got %T instead", value) + } + sv.Left = ptr.String(jtv) + } + + case "Right": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Length to be of type string, got %T instead", value) + } + sv.Right = ptr.String(jtv) + } + + case "Top": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Length to be of type string, got %T instead", value) + } + sv.Top = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSparkParameters(v **types.SparkParameters, 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.SparkParameters + if *v == nil { + sv = &types.SparkParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Host": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Host to be of type string, got %T instead", value) + } + sv.Host = ptr.String(jtv) + } + + case "Port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSqlServerParameters(v **types.SqlServerParameters, 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.SqlServerParameters + if *v == nil { + sv = &types.SqlServerParameters{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Database": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Database to be of type string, got %T instead", value) + } + sv.Database = ptr.String(jtv) + } + + case "Host": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Host to be of type string, got %T instead", value) + } + sv.Host = ptr.String(jtv) + } + + case "Port": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Port to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Port = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSslProperties(v **types.SslProperties, 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.SslProperties + if *v == nil { + sv = &types.SslProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DisableSsl": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DisableSsl = jtv + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStringDatasetParameter(v **types.StringDatasetParameter, 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.StringDatasetParameter + if *v == nil { + sv = &types.StringDatasetParameter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DefaultValues": + if err := awsRestjson1_deserializeDocumentStringDatasetParameterDefaultValues(&sv.DefaultValues, value); err != nil { + return err + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetParameterId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetParameterName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "ValueType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DatasetParameterValueType to be of type string, got %T instead", value) + } + sv.ValueType = types.DatasetParameterValueType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStringDatasetParameterDefaultValues(v **types.StringDatasetParameterDefaultValues, 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.StringDatasetParameterDefaultValues + if *v == nil { + sv = &types.StringDatasetParameterDefaultValues{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StaticValues": + if err := awsRestjson1_deserializeDocumentStringDatasetParameterValueList(&sv.StaticValues, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStringDatasetParameterValueList(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 StringDatasetParameterDefaultValue to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentStringDefaultValueList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -69282,6 +71583,51 @@ func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) return nil } +func awsRestjson1_deserializeDocumentStringParameter(v **types.StringParameter, 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.StringParameter + if *v == nil { + sv = &types.StringParameter{} + } 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 NonEmptyString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "Values": + if err := awsRestjson1_deserializeDocumentSensitiveStringList(&sv.Values, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentStringParameterDeclaration(v **types.StringParameterDeclaration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -69346,6 +71692,40 @@ func awsRestjson1_deserializeDocumentStringParameterDeclaration(v **types.String return nil } +func awsRestjson1_deserializeDocumentStringParameterList(v *[]types.StringParameter, 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.StringParameter + if *v == nil { + cv = []types.StringParameter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StringParameter + destAddr := &col + if err := awsRestjson1_deserializeDocumentStringParameter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentStringValueWhenUnsetConfiguration(v **types.StringValueWhenUnsetConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -71825,6 +74205,11 @@ func awsRestjson1_deserializeDocumentTextAreaControlDisplayOptions(v **types.Tex for key, value := range shape { switch key { + case "InfoIconLabelOptions": + if err := awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(&sv.InfoIconLabelOptions, value); err != nil { + return err + } + case "PlaceholderOptions": if err := awsRestjson1_deserializeDocumentTextControlPlaceholderOptions(&sv.PlaceholderOptions, value); err != nil { return err @@ -71952,6 +74337,11 @@ func awsRestjson1_deserializeDocumentTextFieldControlDisplayOptions(v **types.Te for key, value := range shape { switch key { + case "InfoIconLabelOptions": + if err := awsRestjson1_deserializeDocumentSheetControlInfoIconLabelOptions(&sv.InfoIconLabelOptions, value); err != nil { + return err + } + case "PlaceholderOptions": if err := awsRestjson1_deserializeDocumentTextControlPlaceholderOptions(&sv.PlaceholderOptions, value); err != nil { return err diff --git a/service/quicksight/generated.json b/service/quicksight/generated.json index 1088438e383..95aaf9647c6 100644 --- a/service/quicksight/generated.json +++ b/service/quicksight/generated.json @@ -64,6 +64,8 @@ "api_op_DescribeDashboard.go", "api_op_DescribeDashboardDefinition.go", "api_op_DescribeDashboardPermissions.go", + "api_op_DescribeDashboardSnapshotJob.go", + "api_op_DescribeDashboardSnapshotJobResult.go", "api_op_DescribeDataSet.go", "api_op_DescribeDataSetPermissions.go", "api_op_DescribeDataSetRefreshProperties.go", @@ -135,6 +137,7 @@ "api_op_SearchGroups.go", "api_op_StartAssetBundleExportJob.go", "api_op_StartAssetBundleImportJob.go", + "api_op_StartDashboardSnapshotJob.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateAccountCustomization.go", diff --git a/service/quicksight/serializers.go b/service/quicksight/serializers.go index d546c38313c..8b9cadbae36 100644 --- a/service/quicksight/serializers.go +++ b/service/quicksight/serializers.go @@ -4829,6 +4829,158 @@ func awsRestjson1_serializeOpHttpBindingsDescribeDashboardPermissionsInput(v *De return nil } +type awsRestjson1_serializeOpDescribeDashboardSnapshotJob struct { +} + +func (*awsRestjson1_serializeOpDescribeDashboardSnapshotJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJob) 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.(*DescribeDashboardSnapshotJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs/{SnapshotJobId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobInput(v *DescribeDashboardSnapshotJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + } + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + if v.SnapshotJobId == nil || len(*v.SnapshotJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SnapshotJobId must not be empty")} + } + if v.SnapshotJobId != nil { + if err := encoder.SetURI("SnapshotJobId").String(*v.SnapshotJobId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult struct { +} + +func (*awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeDashboardSnapshotJobResult) 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.(*DescribeDashboardSnapshotJobResultInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs/{SnapshotJobId}/result") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeDashboardSnapshotJobResultInput(v *DescribeDashboardSnapshotJobResultInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + } + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + if v.SnapshotJobId == nil || len(*v.SnapshotJobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SnapshotJobId must not be empty")} + } + if v.SnapshotJobId != nil { + if err := encoder.SetURI("SnapshotJobId").String(*v.SnapshotJobId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeDataSet struct { } @@ -10262,6 +10414,110 @@ func awsRestjson1_serializeOpDocumentStartAssetBundleImportJobInput(v *StartAsse return nil } +type awsRestjson1_serializeOpStartDashboardSnapshotJob struct { +} + +func (*awsRestjson1_serializeOpStartDashboardSnapshotJob) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartDashboardSnapshotJob) 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.(*StartDashboardSnapshotJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accounts/{AwsAccountId}/dashboards/{DashboardId}/snapshot-jobs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartDashboardSnapshotJobInput(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 = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartDashboardSnapshotJobInput(v *StartDashboardSnapshotJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AwsAccountId == nil || len(*v.AwsAccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AwsAccountId must not be empty")} + } + if v.AwsAccountId != nil { + if err := encoder.SetURI("AwsAccountId").String(*v.AwsAccountId); err != nil { + return err + } + } + + if v.DashboardId == nil || len(*v.DashboardId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member DashboardId must not be empty")} + } + if v.DashboardId != nil { + if err := encoder.SetURI("DashboardId").String(*v.DashboardId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartDashboardSnapshotJobInput(v *StartDashboardSnapshotJobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SnapshotConfiguration != nil { + ok := object.Key("SnapshotConfiguration") + if err := awsRestjson1_serializeDocumentSnapshotConfiguration(v.SnapshotConfiguration, ok); err != nil { + return err + } + } + + if v.SnapshotJobId != nil { + ok := object.Key("SnapshotJobId") + ok.String(*v.SnapshotJobId) + } + + if v.UserConfiguration != nil { + ok := object.Key("UserConfiguration") + if err := awsRestjson1_serializeDocumentSnapshotUserConfiguration(v.UserConfiguration, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpTagResource struct { } @@ -13446,6 +13702,13 @@ func awsRestjson1_serializeDocumentAggregationFunction(v *types.AggregationFunct object := value.Object() defer object.Close() + if v.AttributeAggregationFunction != nil { + ok := object.Key("AttributeAggregationFunction") + if err := awsRestjson1_serializeDocumentAttributeAggregationFunction(v.AttributeAggregationFunction, ok); err != nil { + return err + } + } + if len(v.CategoricalAggregationFunction) > 0 { ok := object.Key("CategoricalAggregationFunction") ok.String(string(v.CategoricalAggregationFunction)) @@ -14677,6 +14940,23 @@ func awsRestjson1_serializeDocumentAthenaParameters(v *types.AthenaParameters, v return nil } +func awsRestjson1_serializeDocumentAttributeAggregationFunction(v *types.AttributeAggregationFunction, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SimpleAttributeAggregation) > 0 { + ok := object.Key("SimpleAttributeAggregation") + ok.String(string(v.SimpleAttributeAggregation)) + } + + if v.ValueForMultipleValues != nil { + ok := object.Key("ValueForMultipleValues") + ok.String(*v.ValueForMultipleValues) + } + + return nil +} + func awsRestjson1_serializeDocumentAuroraParameters(v *types.AuroraParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -19041,6 +19321,13 @@ func awsRestjson1_serializeDocumentDateTimePickerControlDisplayOptions(v *types. ok.String(*v.DateTimeFormat) } + if v.InfoIconLabelOptions != nil { + ok := object.Key("InfoIconLabelOptions") + if err := awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v.InfoIconLabelOptions, ok); err != nil { + return err + } + } + if v.TitleOptions != nil { ok := object.Key("TitleOptions") if err := awsRestjson1_serializeDocumentLabelOptions(v.TitleOptions, ok); err != nil { @@ -19649,6 +19936,13 @@ func awsRestjson1_serializeDocumentDropDownControlDisplayOptions(v *types.DropDo object := value.Object() defer object.Close() + if v.InfoIconLabelOptions != nil { + ok := object.Key("InfoIconLabelOptions") + if err := awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v.InfoIconLabelOptions, ok); err != nil { + return err + } + } + if v.SelectAllOptions != nil { ok := object.Key("SelectAllOptions") if err := awsRestjson1_serializeDocumentListControlSelectAllOptions(v.SelectAllOptions, ok); err != nil { @@ -24086,6 +24380,13 @@ func awsRestjson1_serializeDocumentListControlDisplayOptions(v *types.ListContro object := value.Object() defer object.Close() + if v.InfoIconLabelOptions != nil { + ok := object.Key("InfoIconLabelOptions") + if err := awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v.InfoIconLabelOptions, ok); err != nil { + return err + } + } + if v.SearchOptions != nil { ok := object.Key("SearchOptions") if err := awsRestjson1_serializeDocumentListControlSearchOptions(v.SearchOptions, ok); err != nil { @@ -27815,6 +28116,13 @@ func awsRestjson1_serializeDocumentRelativeDateTimeControlDisplayOptions(v *type ok.String(*v.DateTimeFormat) } + if v.InfoIconLabelOptions != nil { + ok := object.Key("InfoIconLabelOptions") + if err := awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v.InfoIconLabelOptions, ok); err != nil { + return err + } + } + if v.TitleOptions != nil { ok := object.Key("TitleOptions") if err := awsRestjson1_serializeDocumentLabelOptions(v.TitleOptions, ok); err != nil { @@ -28059,6 +28367,28 @@ func awsRestjson1_serializeDocumentRowSortList(v []types.FieldSortOptions, value return nil } +func awsRestjson1_serializeDocumentS3BucketConfiguration(v *types.S3BucketConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("BucketName") + ok.String(*v.BucketName) + } + + if v.BucketPrefix != nil { + ok := object.Key("BucketPrefix") + ok.String(*v.BucketPrefix) + } + + if v.BucketRegion != nil { + ok := object.Key("BucketRegion") + ok.String(*v.BucketRegion) + } + + return nil +} + func awsRestjson1_serializeDocumentS3Parameters(v *types.S3Parameters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -28950,6 +29280,23 @@ func awsRestjson1_serializeDocumentShapeConditionalFormat(v *types.ShapeConditio return nil } +func awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v *types.SheetControlInfoIconLabelOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.InfoIconText != nil { + ok := object.Key("InfoIconText") + ok.String(*v.InfoIconText) + } + + if len(v.Visibility) > 0 { + ok := object.Key("Visibility") + ok.String(string(v.Visibility)) + } + + return nil +} + func awsRestjson1_serializeDocumentSheetControlLayout(v *types.SheetControlLayout, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -29267,6 +29614,13 @@ func awsRestjson1_serializeDocumentSliderControlDisplayOptions(v *types.SliderCo object := value.Object() defer object.Close() + if v.InfoIconLabelOptions != nil { + ok := object.Key("InfoIconLabelOptions") + if err := awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v.InfoIconLabelOptions, ok); err != nil { + return err + } + } + if v.TitleOptions != nil { ok := object.Key("TitleOptions") if err := awsRestjson1_serializeDocumentLabelOptions(v.TitleOptions, ok); err != nil { @@ -29345,6 +29699,223 @@ func awsRestjson1_serializeDocumentSmallMultiplesOptions(v *types.SmallMultiples return nil } +func awsRestjson1_serializeDocumentSnapshotAnonymousUser(v *types.SnapshotAnonymousUser, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RowLevelPermissionTags != nil { + ok := object.Key("RowLevelPermissionTags") + if err := awsRestjson1_serializeDocumentSessionTagList(v.RowLevelPermissionTags, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotAnonymousUserList(v []types.SnapshotAnonymousUser, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSnapshotAnonymousUser(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSnapshotConfiguration(v *types.SnapshotConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DestinationConfiguration != nil { + ok := object.Key("DestinationConfiguration") + if err := awsRestjson1_serializeDocumentSnapshotDestinationConfiguration(v.DestinationConfiguration, ok); err != nil { + return err + } + } + + if v.FileGroups != nil { + ok := object.Key("FileGroups") + if err := awsRestjson1_serializeDocumentSnapshotFileGroupList(v.FileGroups, ok); err != nil { + return err + } + } + + if v.Parameters != nil { + ok := object.Key("Parameters") + if err := awsRestjson1_serializeDocumentParameters(v.Parameters, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotDestinationConfiguration(v *types.SnapshotDestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Destinations != nil { + ok := object.Key("S3Destinations") + if err := awsRestjson1_serializeDocumentSnapshotS3DestinationConfigurationList(v.S3Destinations, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotFile(v *types.SnapshotFile, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FormatType) > 0 { + ok := object.Key("FormatType") + ok.String(string(v.FormatType)) + } + + if v.SheetSelections != nil { + ok := object.Key("SheetSelections") + if err := awsRestjson1_serializeDocumentSnapshotFileSheetSelectionList(v.SheetSelections, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotFileGroup(v *types.SnapshotFileGroup, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Files != nil { + ok := object.Key("Files") + if err := awsRestjson1_serializeDocumentSnapshotFileList(v.Files, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotFileGroupList(v []types.SnapshotFileGroup, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSnapshotFileGroup(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSnapshotFileList(v []types.SnapshotFile, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSnapshotFile(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSnapshotFileSheetSelection(v *types.SnapshotFileSheetSelection, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.SelectionScope) > 0 { + ok := object.Key("SelectionScope") + ok.String(string(v.SelectionScope)) + } + + if v.SheetId != nil { + ok := object.Key("SheetId") + ok.String(*v.SheetId) + } + + if v.VisualIds != nil { + ok := object.Key("VisualIds") + if err := awsRestjson1_serializeDocumentSnapshotFileSheetSelectionVisualIdList(v.VisualIds, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotFileSheetSelectionList(v []types.SnapshotFileSheetSelection, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSnapshotFileSheetSelection(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSnapshotFileSheetSelectionVisualIdList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentSnapshotS3DestinationConfiguration(v *types.SnapshotS3DestinationConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketConfiguration != nil { + ok := object.Key("BucketConfiguration") + if err := awsRestjson1_serializeDocumentS3BucketConfiguration(v.BucketConfiguration, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentSnapshotS3DestinationConfigurationList(v []types.SnapshotS3DestinationConfiguration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentSnapshotS3DestinationConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentSnapshotUserConfiguration(v *types.SnapshotUserConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AnonymousUsers != nil { + ok := object.Key("AnonymousUsers") + if err := awsRestjson1_serializeDocumentSnapshotAnonymousUserList(v.AnonymousUsers, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentSnowflakeParameters(v *types.SnowflakeParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -30581,6 +31152,13 @@ func awsRestjson1_serializeDocumentTextAreaControlDisplayOptions(v *types.TextAr object := value.Object() defer object.Close() + if v.InfoIconLabelOptions != nil { + ok := object.Key("InfoIconLabelOptions") + if err := awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v.InfoIconLabelOptions, ok); err != nil { + return err + } + } + if v.PlaceholderOptions != nil { ok := object.Key("PlaceholderOptions") if err := awsRestjson1_serializeDocumentTextControlPlaceholderOptions(v.PlaceholderOptions, ok); err != nil { @@ -30642,6 +31220,13 @@ func awsRestjson1_serializeDocumentTextFieldControlDisplayOptions(v *types.TextF object := value.Object() defer object.Close() + if v.InfoIconLabelOptions != nil { + ok := object.Key("InfoIconLabelOptions") + if err := awsRestjson1_serializeDocumentSheetControlInfoIconLabelOptions(v.InfoIconLabelOptions, ok); err != nil { + return err + } + } + if v.PlaceholderOptions != nil { ok := object.Key("PlaceholderOptions") if err := awsRestjson1_serializeDocumentTextControlPlaceholderOptions(v.PlaceholderOptions, ok); err != nil { diff --git a/service/quicksight/types/enums.go b/service/quicksight/types/enums.go index 71a9fef342a..e431500431c 100644 --- a/service/quicksight/types/enums.go +++ b/service/quicksight/types/enums.go @@ -3304,6 +3304,23 @@ func (SheetControlSliderType) Values() []SheetControlSliderType { } } +type SimpleAttributeAggregationFunction string + +// Enum values for SimpleAttributeAggregationFunction +const ( + SimpleAttributeAggregationFunctionUniqueValue SimpleAttributeAggregationFunction = "UNIQUE_VALUE" +) + +// Values returns all known values for SimpleAttributeAggregationFunction. 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 (SimpleAttributeAggregationFunction) Values() []SimpleAttributeAggregationFunction { + return []SimpleAttributeAggregationFunction{ + "UNIQUE_VALUE", + } +} + type SimpleNumericalAggregationFunction string // Enum values for SimpleNumericalAggregationFunction @@ -3377,6 +3394,65 @@ func (SmallMultiplesAxisScale) Values() []SmallMultiplesAxisScale { } } +type SnapshotFileFormatType string + +// Enum values for SnapshotFileFormatType +const ( + SnapshotFileFormatTypeCsv SnapshotFileFormatType = "CSV" + SnapshotFileFormatTypePdf SnapshotFileFormatType = "PDF" +) + +// Values returns all known values for SnapshotFileFormatType. 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 (SnapshotFileFormatType) Values() []SnapshotFileFormatType { + return []SnapshotFileFormatType{ + "CSV", + "PDF", + } +} + +type SnapshotFileSheetSelectionScope string + +// Enum values for SnapshotFileSheetSelectionScope +const ( + SnapshotFileSheetSelectionScopeAllVisuals SnapshotFileSheetSelectionScope = "ALL_VISUALS" + SnapshotFileSheetSelectionScopeSelectedVisuals SnapshotFileSheetSelectionScope = "SELECTED_VISUALS" +) + +// Values returns all known values for SnapshotFileSheetSelectionScope. 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 (SnapshotFileSheetSelectionScope) Values() []SnapshotFileSheetSelectionScope { + return []SnapshotFileSheetSelectionScope{ + "ALL_VISUALS", + "SELECTED_VISUALS", + } +} + +type SnapshotJobStatus string + +// Enum values for SnapshotJobStatus +const ( + SnapshotJobStatusQueued SnapshotJobStatus = "QUEUED" + SnapshotJobStatusRunning SnapshotJobStatus = "RUNNING" + SnapshotJobStatusCompleted SnapshotJobStatus = "COMPLETED" + SnapshotJobStatusFailed SnapshotJobStatus = "FAILED" +) + +// Values returns all known values for SnapshotJobStatus. 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 (SnapshotJobStatus) Values() []SnapshotJobStatus { + return []SnapshotJobStatus{ + "QUEUED", + "RUNNING", + "COMPLETED", + "FAILED", + } +} + type SortDirection string // Enum values for SortDirection diff --git a/service/quicksight/types/types.go b/service/quicksight/types/types.go index dcc15f922b6..d359fbbe96c 100644 --- a/service/quicksight/types/types.go +++ b/service/quicksight/types/types.go @@ -111,6 +111,9 @@ type AdHocFilteringOption struct { // attributes can be defined. type AggregationFunction struct { + // Aggregation for attributes. + AttributeAggregationFunction *AttributeAggregationFunction + // Aggregation for categorical values. // - COUNT : Aggregate by the total number of values, including duplicates. // - DISTINCT_COUNT : Aggregate by the total number of distinct values. @@ -443,6 +446,20 @@ type AnonymousUserQSearchBarEmbeddingConfiguration struct { noSmithyDocumentSerde } +// A structure that contains the file groups that are requested for the artifact +// generation in a StartDashboardSnapshotJob API call. +type AnonymousUserSnapshotJobResult struct { + + // A list of SnapshotJobResultFileGroup objects that contain information on the + // files that are requested during a StartDashboardSnapshotJob API call. If the + // job succeeds, these objects contain the location where the snapshot artifacts + // are stored. If the job fails, the objects contain information about the error + // that caused the job to fail. + FileGroups []SnapshotJobResultFileGroup + + noSmithyDocumentSerde +} + // The arc axis configuration of a GaugeChartVisual . type ArcAxisConfiguration struct { @@ -1011,6 +1028,22 @@ type AthenaParameters struct { noSmithyDocumentSerde } +// Aggregation for attributes. +type AttributeAggregationFunction struct { + + // The built-in aggregation functions for attributes. + // - UNIQUE_VALUE : Returns the unique value for a field, aggregated by the + // dimension fields. + SimpleAttributeAggregation SimpleAttributeAggregationFunction + + // Used by the UNIQUE_VALUE aggregation function. If there are multiple values for + // the field used by the aggregation, the value for this property will be returned + // instead. Defaults to '*'. + ValueForMultipleValues *string + + noSmithyDocumentSerde +} + // Parameters for Amazon Aurora. type AuroraParameters struct { @@ -4190,6 +4223,9 @@ type DateTimePickerControlDisplayOptions struct { // Customize how dates are formatted in controls. DateTimeFormat *string + // The configuration of info icon label options. + InfoIconLabelOptions *SheetControlInfoIconLabelOptions + // The options to configure the title visibility, name, and font size. TitleOptions *LabelOptions @@ -4551,6 +4587,9 @@ type DrillDownFilter struct { // The display options of a control. type DropDownControlDisplayOptions struct { + // The configuration of info icon label options. + InfoIconLabelOptions *SheetControlInfoIconLabelOptions + // The configuration of the Select all options in a dropdown control. SelectAllOptions *ListControlSelectAllOptions @@ -7368,6 +7407,9 @@ type LinkSharingConfiguration struct { // The display options of a control. type ListControlDisplayOptions struct { + // The configuration of info icon label options. + InfoIconLabelOptions *SheetControlInfoIconLabelOptions + // The configuration of the search options in a list control. SearchOptions *ListControlSearchOptions @@ -9835,6 +9877,9 @@ type RelativeDateTimeControlDisplayOptions struct { // Customize how dates are formatted in controls. DateTimeFormat *string + // The configuration of info icon label options. + InfoIconLabelOptions *SheetControlInfoIconLabelOptions + // The options to configure the title visibility, name, and font size. TitleOptions *LabelOptions @@ -10003,6 +10048,31 @@ type RowLevelPermissionTagRule struct { noSmithyDocumentSerde } +// An optional structure that contains the Amazon S3 bucket configuration that the +// generated snapshots are stored in. If you don't provide this information, +// generated snapshots are stored in the default Amazon QuickSight bucket. +type S3BucketConfiguration struct { + + // The name of an existing Amazon S3 bucket where the generated snapshot artifacts + // are sent. + // + // This member is required. + BucketName *string + + // The prefix of the Amazon S3 bucket that the generated snapshots are stored in. + // + // This member is required. + BucketPrefix *string + + // The region that the Amazon S3 bucket is located in. The bucket must be located + // in the same region that the StartDashboardSnapshotJob API call is made. + // + // This member is required. + BucketRegion *string + + noSmithyDocumentSerde +} + // The parameters for S3. type S3Parameters struct { @@ -10539,6 +10609,18 @@ type Sheet struct { noSmithyDocumentSerde } +// A control to display info icons for filters and parameters. +type SheetControlInfoIconLabelOptions struct { + + // The text content of info icon. + InfoIconText *string + + // The visibility configuration of info icon label options. + Visibility Visibility + + noSmithyDocumentSerde +} + // A grid layout to define the placement of sheet control. type SheetControlLayout struct { @@ -10756,6 +10838,9 @@ type SimpleClusterMarker struct { // The display options of a control. type SliderControlDisplayOptions struct { + // The configuration of info icon label options. + InfoIconLabelOptions *SheetControlInfoIconLabelOptions + // The options to configure the title visibility, name, and font size. TitleOptions *LabelOptions @@ -10803,6 +10888,226 @@ type SmallMultiplesOptions struct { noSmithyDocumentSerde } +// A structure that contains information on the anonymous user configuration. +type SnapshotAnonymousUser struct { + + // The tags to be used for row-level security (RLS). Make sure that the relevant + // datasets have RLS tags configured before you start a snapshot export job. You + // can configure the RLS tags of a dataset with a + // DataSet$RowLevelPermissionTagConfiguration API call. These are not the tags that + // are used for Amazon Web Services resource tagging. For more information on row + // level security in Amazon QuickSight, see Using Row-Level Security (RLS) with + // Tags (https://docs.aws.amazon.com/quicksight/latest/user/quicksight-dev-rls-tags.html) + // in the Amazon QuickSight User Guide. + RowLevelPermissionTags []SessionTag + + noSmithyDocumentSerde +} + +// Use this structure to redact sensitive information that you provide about an +// anonymous user from the snapshot. +type SnapshotAnonymousUserRedacted struct { + + // The tag keys for the RowLevelPermissionTags . + RowLevelPermissionTagKeys []string + + noSmithyDocumentSerde +} + +// Describes the configuration of the dashboard snapshot. +type SnapshotConfiguration struct { + + // A list of SnapshotJobResultFileGroup objects that contain information about the + // snapshot that is generated. This list can hold a maximum of 6 FileGroup + // configurations. + // + // This member is required. + FileGroups []SnapshotFileGroup + + // A structure that contains information on the Amazon S3 bucket that the + // generated snapshot is stored in. + DestinationConfiguration *SnapshotDestinationConfiguration + + // A list of Amazon QuickSight parameters and the list's override values. + Parameters *Parameters + + noSmithyDocumentSerde +} + +// A structure that contains information on the Amazon S3 destinations of the +// generated snapshot. +type SnapshotDestinationConfiguration struct { + + // A list of SnapshotS3DestinationConfiguration objects that contain Amazon S3 + // destination configurations. This structure can hold a maximum of 1 + // S3DestinationConfiguration . + S3Destinations []SnapshotS3DestinationConfiguration + + noSmithyDocumentSerde +} + +// A structure that contains the information for the snapshot that you want to +// generate. This information is provided by you when you start a new snapshot job. +type SnapshotFile struct { + + // The format of the snapshot file to be generated. You can choose between CSV and + // PDF . + // + // This member is required. + FormatType SnapshotFileFormatType + + // A list of SnapshotFileSheetSelection objects that contain information on the + // dashboard sheet that is exported. These objects provide information about the + // snapshot artifacts that are generated during the job. This structure can hold a + // maximum of 5 CSV configurations or 1 configuration for PDF. + // + // This member is required. + SheetSelections []SnapshotFileSheetSelection + + noSmithyDocumentSerde +} + +// A structure that contains the information on the snapshot files. +type SnapshotFileGroup struct { + + // A list of SnapshotFile objects that contain the information on the snapshot + // files that need to be generated. This structure can hold 1 configuration at a + // time. + Files []SnapshotFile + + noSmithyDocumentSerde +} + +// A structure that contains information that identifies the snapshot that needs +// to be generated. +type SnapshotFileSheetSelection struct { + + // The selection scope of the visuals on a sheet of a dashboard that you are + // generating a snapthot of. You can choose one of the following options. + // - ALL_VISUALS - Selects all visuals that are on the sheet. This value is + // required if the snapshot is a PDF. + // - SELECTED_VISUALS - Select the visual that you want to add to the snapshot. + // This value is required if the snapshot is a CSV. + // + // This member is required. + SelectionScope SnapshotFileSheetSelectionScope + + // The sheet ID of the dashboard to generate the snapshot artifact from. This + // value is required for CSV or PDF format types. + // + // This member is required. + SheetId *string + + // A structure that lists the IDs of the visuals in the selected sheet. Supported + // visual types are table, pivot table visuals. This value is required if you are + // generating a CSV. This value supports a maximum of 1 visual ID. + VisualIds []string + + noSmithyDocumentSerde +} + +// An object that contains information on the error that caused the snapshot job +// to fail. +type SnapshotJobErrorInfo struct { + + // The error message. + ErrorMessage *string + + // The error type. + ErrorType *string + + noSmithyDocumentSerde +} + +// An object that provides information on the result of a snapshot job. This +// object provides information about the job, the job status, and the location of +// the generated file. +type SnapshotJobResult struct { + + // A list of AnonymousUserSnapshotJobResult objects that contain information on + // anonymous users and their user configurations. This data provided by you when + // you make a StartDashboardSnapshotJob API call. + AnonymousUsers []AnonymousUserSnapshotJobResult + + noSmithyDocumentSerde +} + +// Information on the error that caused the snapshot job to fail. +type SnapshotJobResultErrorInfo struct { + + // The error message. + ErrorMessage *string + + // The error type. + ErrorType *string + + noSmithyDocumentSerde +} + +// A structure that contains information on the generated snapshot file groups. +type SnapshotJobResultFileGroup struct { + + // A list of SnapshotFile objects. + Files []SnapshotFile + + // A list of SnapshotJobS3Result objects. + S3Results []SnapshotJobS3Result + + noSmithyDocumentSerde +} + +// The Amazon S3 result from the snapshot job. The result includes the +// DestinationConfiguration and the Amazon S3 Uri. If an error occured during the +// job, the result returns information on the error. +type SnapshotJobS3Result struct { + + // An array of error records that describe any failures that occur while the + // dashboard snapshot job runs. + ErrorInfo []SnapshotJobResultErrorInfo + + // A list of Amazon S3 bucket configurations that are provided when you make a + // StartDashboardSnapshotJob API call. + S3DestinationConfiguration *SnapshotS3DestinationConfiguration + + // The Amazon S3 Uri. + S3Uri *string + + noSmithyDocumentSerde +} + +// A structure that describes the Amazon S3 settings to use to save the generated +// dashboard snapshot. +type SnapshotS3DestinationConfiguration struct { + + // A structure that contains details about the Amazon S3 bucket that the generated + // dashboard snapshot is saved in. + BucketConfiguration *S3BucketConfiguration + + noSmithyDocumentSerde +} + +// A structure that contains information about the users that the dashboard +// snapshot is generated for. +type SnapshotUserConfiguration struct { + + // An array of records that describe the anonymous users that the dashboard + // snapshot is generated for. + AnonymousUsers []SnapshotAnonymousUser + + noSmithyDocumentSerde +} + +// A structure that contains information about the users that the dashboard +// snapshot is generated for. Sensitive user information is excluded. +type SnapshotUserConfigurationRedacted struct { + + // An array of records that describe anonymous users that the dashboard snapshot + // is generated for. Sensitive user information is excluded. + AnonymousUsers []SnapshotAnonymousUserRedacted + + noSmithyDocumentSerde +} + // The parameters for Snowflake. type SnowflakeParameters struct { @@ -11715,6 +12020,9 @@ type TeradataParameters struct { // The display options of a control. type TextAreaControlDisplayOptions struct { + // The configuration of info icon label options. + InfoIconLabelOptions *SheetControlInfoIconLabelOptions + // The configuration of the placeholder options in a text area control. PlaceholderOptions *TextControlPlaceholderOptions @@ -11751,6 +12059,9 @@ type TextControlPlaceholderOptions struct { // The display options of a control. type TextFieldControlDisplayOptions struct { + // The configuration of info icon label options. + InfoIconLabelOptions *SheetControlInfoIconLabelOptions + // The configuration of the placeholder options in a text field control. PlaceholderOptions *TextControlPlaceholderOptions diff --git a/service/quicksight/validators.go b/service/quicksight/validators.go index c7a8a6023a8..26d4ff20895 100644 --- a/service/quicksight/validators.go +++ b/service/quicksight/validators.go @@ -1130,6 +1130,46 @@ func (m *validateOpDescribeDashboardPermissions) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpDescribeDashboardSnapshotJob struct { +} + +func (*validateOpDescribeDashboardSnapshotJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDashboardSnapshotJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDashboardSnapshotJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDashboardSnapshotJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeDashboardSnapshotJobResult struct { +} + +func (*validateOpDescribeDashboardSnapshotJobResult) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeDashboardSnapshotJobResult) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeDashboardSnapshotJobResultInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeDashboardSnapshotJobResultInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeDataSet struct { } @@ -2550,6 +2590,26 @@ func (m *validateOpStartAssetBundleImportJob) HandleInitialize(ctx context.Conte return next.HandleInitialize(ctx, in) } +type validateOpStartDashboardSnapshotJob struct { +} + +func (*validateOpStartDashboardSnapshotJob) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartDashboardSnapshotJob) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartDashboardSnapshotJobInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartDashboardSnapshotJobInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpTagResource struct { } @@ -3394,6 +3454,14 @@ func addOpDescribeDashboardPermissionsValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpDescribeDashboardPermissions{}, middleware.After) } +func addOpDescribeDashboardSnapshotJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDashboardSnapshotJob{}, middleware.After) +} + +func addOpDescribeDashboardSnapshotJobResultValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeDashboardSnapshotJobResult{}, middleware.After) +} + func addOpDescribeDataSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeDataSet{}, middleware.After) } @@ -3678,6 +3746,10 @@ func addOpStartAssetBundleImportJobValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpStartAssetBundleImportJob{}, middleware.After) } +func addOpStartDashboardSnapshotJobValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartDashboardSnapshotJob{}, middleware.After) +} + func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } @@ -13081,6 +13153,27 @@ func validateRowSortList(v []types.FieldSortOptions) error { } } +func validateS3BucketConfiguration(v *types.S3BucketConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3BucketConfiguration"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if v.BucketPrefix == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketPrefix")) + } + if v.BucketRegion == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketRegion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateS3Parameters(v *types.S3Parameters) error { if v == nil { return nil @@ -13846,6 +13939,245 @@ func validateSmallMultiplesDimensionFieldList(v []types.DimensionField) error { } } +func validateSnapshotAnonymousUser(v *types.SnapshotAnonymousUser) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotAnonymousUser"} + if v.RowLevelPermissionTags != nil { + if err := validateSessionTagList(v.RowLevelPermissionTags); err != nil { + invalidParams.AddNested("RowLevelPermissionTags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotAnonymousUserList(v []types.SnapshotAnonymousUser) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotAnonymousUserList"} + for i := range v { + if err := validateSnapshotAnonymousUser(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotConfiguration(v *types.SnapshotConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotConfiguration"} + if v.FileGroups == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileGroups")) + } else if v.FileGroups != nil { + if err := validateSnapshotFileGroupList(v.FileGroups); err != nil { + invalidParams.AddNested("FileGroups", err.(smithy.InvalidParamsError)) + } + } + if v.DestinationConfiguration != nil { + if err := validateSnapshotDestinationConfiguration(v.DestinationConfiguration); err != nil { + invalidParams.AddNested("DestinationConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.Parameters != nil { + if err := validateParameters(v.Parameters); err != nil { + invalidParams.AddNested("Parameters", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotDestinationConfiguration(v *types.SnapshotDestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotDestinationConfiguration"} + if v.S3Destinations != nil { + if err := validateSnapshotS3DestinationConfigurationList(v.S3Destinations); err != nil { + invalidParams.AddNested("S3Destinations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotFile(v *types.SnapshotFile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotFile"} + if v.SheetSelections == nil { + invalidParams.Add(smithy.NewErrParamRequired("SheetSelections")) + } else if v.SheetSelections != nil { + if err := validateSnapshotFileSheetSelectionList(v.SheetSelections); err != nil { + invalidParams.AddNested("SheetSelections", err.(smithy.InvalidParamsError)) + } + } + if len(v.FormatType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("FormatType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotFileGroup(v *types.SnapshotFileGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotFileGroup"} + if v.Files != nil { + if err := validateSnapshotFileList(v.Files); err != nil { + invalidParams.AddNested("Files", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotFileGroupList(v []types.SnapshotFileGroup) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotFileGroupList"} + for i := range v { + if err := validateSnapshotFileGroup(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotFileList(v []types.SnapshotFile) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotFileList"} + for i := range v { + if err := validateSnapshotFile(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotFileSheetSelection(v *types.SnapshotFileSheetSelection) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotFileSheetSelection"} + if v.SheetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SheetId")) + } + if len(v.SelectionScope) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("SelectionScope")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotFileSheetSelectionList(v []types.SnapshotFileSheetSelection) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotFileSheetSelectionList"} + for i := range v { + if err := validateSnapshotFileSheetSelection(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotS3DestinationConfiguration(v *types.SnapshotS3DestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotS3DestinationConfiguration"} + if v.BucketConfiguration != nil { + if err := validateS3BucketConfiguration(v.BucketConfiguration); err != nil { + invalidParams.AddNested("BucketConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotS3DestinationConfigurationList(v []types.SnapshotS3DestinationConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotS3DestinationConfigurationList"} + for i := range v { + if err := validateSnapshotS3DestinationConfiguration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSnapshotUserConfiguration(v *types.SnapshotUserConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SnapshotUserConfiguration"} + if v.AnonymousUsers != nil { + if err := validateSnapshotAnonymousUserList(v.AnonymousUsers); err != nil { + invalidParams.AddNested("AnonymousUsers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSnowflakeParameters(v *types.SnowflakeParameters) error { if v == nil { return nil @@ -17360,6 +17692,48 @@ func validateOpDescribeDashboardPermissionsInput(v *DescribeDashboardPermissions } } +func validateOpDescribeDashboardSnapshotJobInput(v *DescribeDashboardSnapshotJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDashboardSnapshotJobInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DashboardId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DashboardId")) + } + if v.SnapshotJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotJobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeDashboardSnapshotJobResultInput(v *DescribeDashboardSnapshotJobResultInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeDashboardSnapshotJobResultInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DashboardId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DashboardId")) + } + if v.SnapshotJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotJobId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeDataSetInput(v *DescribeDataSetInput) error { if v == nil { return nil @@ -18714,6 +19088,41 @@ func validateOpStartAssetBundleImportJobInput(v *StartAssetBundleImportJobInput) } } +func validateOpStartDashboardSnapshotJobInput(v *StartDashboardSnapshotJobInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartDashboardSnapshotJobInput"} + if v.AwsAccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) + } + if v.DashboardId == nil { + invalidParams.Add(smithy.NewErrParamRequired("DashboardId")) + } + if v.SnapshotJobId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotJobId")) + } + if v.UserConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserConfiguration")) + } else if v.UserConfiguration != nil { + if err := validateSnapshotUserConfiguration(v.UserConfiguration); err != nil { + invalidParams.AddNested("UserConfiguration", err.(smithy.InvalidParamsError)) + } + } + if v.SnapshotConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("SnapshotConfiguration")) + } else if v.SnapshotConfiguration != nil { + if err := validateSnapshotConfiguration(v.SnapshotConfiguration); err != nil { + invalidParams.AddNested("SnapshotConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil