diff --git a/.changelog/0c776caedfbe4460b45789d804bacf0a.json b/.changelog/0c776caedfbe4460b45789d804bacf0a.json new file mode 100644 index 00000000000..611803559c2 --- /dev/null +++ b/.changelog/0c776caedfbe4460b45789d804bacf0a.json @@ -0,0 +1,8 @@ +{ + "id": "0c776cae-dfbe-4460-b457-89d804bacf0a", + "type": "documentation", + "description": "Documentation updates for Amazon S3-control.", + "modules": [ + "service/s3control" + ] +} \ No newline at end of file diff --git a/.changelog/29ba9d42eb91426eb131ade780b7381c.json b/.changelog/29ba9d42eb91426eb131ade780b7381c.json new file mode 100644 index 00000000000..7cedead415d --- /dev/null +++ b/.changelog/29ba9d42eb91426eb131ade780b7381c.json @@ -0,0 +1,8 @@ +{ + "id": "29ba9d42-eb91-426e-b131-ade780b7381c", + "type": "documentation", + "description": "Updates Amazon RDS documentation for Standard Edition 2 support in RDS Custom for Oracle.", + "modules": [ + "service/rds" + ] +} \ No newline at end of file diff --git a/.changelog/2fa3c83317c14c08ae791a5d1cfafa21.json b/.changelog/2fa3c83317c14c08ae791a5d1cfafa21.json new file mode 100644 index 00000000000..4f3cdaf468c --- /dev/null +++ b/.changelog/2fa3c83317c14c08ae791a5d1cfafa21.json @@ -0,0 +1,8 @@ +{ + "id": "2fa3c833-17c1-4c08-ae79-1a5d1cfafa21", + "type": "feature", + "description": "AWS Elemental MediaLive introduces workflow monitor, a new feature that enables the visualization and monitoring of your media workflows. Create signal maps of your existing workflows and monitor them by creating notification and monitoring template groups.", + "modules": [ + "service/medialive" + ] +} \ No newline at end of file diff --git a/.changelog/315a45de2b19487faecd9b5371ecba0c.json b/.changelog/315a45de2b19487faecd9b5371ecba0c.json new file mode 100644 index 00000000000..f68850d6a21 --- /dev/null +++ b/.changelog/315a45de2b19487faecd9b5371ecba0c.json @@ -0,0 +1,8 @@ +{ + "id": "315a45de-2b19-487f-aecd-9b5371ecba0c", + "type": "feature", + "description": "This release adds the task properties field to attempt details and the name field on EKS container detail.", + "modules": [ + "service/batch" + ] +} \ No newline at end of file diff --git a/.changelog/41575353444b40ffbf474f4155544f00.json b/.changelog/41575353444b40ffbf474f4155544f00.json new file mode 100644 index 00000000000..1cc0d8d6b2d --- /dev/null +++ b/.changelog/41575353444b40ffbf474f4155544f00.json @@ -0,0 +1,8 @@ +{ + "id": "41575353-444b-40ff-bf47-4f4155544f00", + "type": "release", + "description": "New AWS service client module", + "modules": [ + "internal/protocoltest/smithyrpcv2cbor" + ] +} \ No newline at end of file diff --git a/.changelog/4e9135b82ed54bc6b26a2a00a0705e4f.json b/.changelog/4e9135b82ed54bc6b26a2a00a0705e4f.json new file mode 100644 index 00000000000..a26981e6651 --- /dev/null +++ b/.changelog/4e9135b82ed54bc6b26a2a00a0705e4f.json @@ -0,0 +1,8 @@ +{ + "id": "4e9135b8-2ed5-4bc6-b26a-2a00a0705e4f", + "type": "feature", + "description": "CloudFront origin access control extends support to AWS Lambda function URLs and AWS Elemental MediaPackage v2 origins.", + "modules": [ + "service/cloudfront" + ] +} \ No newline at end of file diff --git a/.changelog/689cb10c56284c65b7bb6498c0982bf2.json b/.changelog/689cb10c56284c65b7bb6498c0982bf2.json new file mode 100644 index 00000000000..9d0c6431f30 --- /dev/null +++ b/.changelog/689cb10c56284c65b7bb6498c0982bf2.json @@ -0,0 +1,8 @@ +{ + "id": "689cb10c-5628-4c65-b7bb-6498c0982bf2", + "type": "feature", + "description": "This release adds support for Metric Characteristics for CloudWatch Anomaly Detection. Anomaly Detector now takes Metric Characteristics object with Periodic Spikes boolean field that tells Anomaly Detection that spikes that repeat at the same time every week are part of the expected pattern.", + "modules": [ + "service/cloudwatch" + ] +} \ No newline at end of file diff --git a/.changelog/73a836b42ba540b58588893efb6cd471.json b/.changelog/73a836b42ba540b58588893efb6cd471.json new file mode 100644 index 00000000000..6bfbcbdb38c --- /dev/null +++ b/.changelog/73a836b42ba540b58588893efb6cd471.json @@ -0,0 +1,8 @@ +{ + "id": "73a836b4-2ba5-40b5-8588-893efb6cd471", + "type": "feature", + "description": "LogConfiguration ARN validation fixes", + "modules": [ + "service/pipes" + ] +} \ No newline at end of file diff --git a/.changelog/7792e9959d68411c898f5875c88de722.json b/.changelog/7792e9959d68411c898f5875c88de722.json new file mode 100644 index 00000000000..6e7afa1b159 --- /dev/null +++ b/.changelog/7792e9959d68411c898f5875c88de722.json @@ -0,0 +1,8 @@ +{ + "id": "7792e995-9d68-411c-898f-5875c88de722", + "type": "feature", + "description": "For CreateOpenIDConnectProvider API, the ThumbprintList parameter is no longer required.", + "modules": [ + "service/iam" + ] +} \ No newline at end of file diff --git a/.changelog/8c0ea5ffeab749fea515cca3db410ee5.json b/.changelog/8c0ea5ffeab749fea515cca3db410ee5.json new file mode 100644 index 00000000000..843dbb7cc2e --- /dev/null +++ b/.changelog/8c0ea5ffeab749fea515cca3db410ee5.json @@ -0,0 +1,8 @@ +{ + "id": "8c0ea5ff-eab7-49fe-a515-cca3db410ee5", + "type": "feature", + "description": "Adds an updated version of smoke tests, including smithy trait, for SDK testing.", + "modules": [ + "service/wafv2" + ] +} \ No newline at end of file diff --git a/.changelog/a746ae9162ab4926b9ff619e43efed2a.json b/.changelog/a746ae9162ab4926b9ff619e43efed2a.json new file mode 100644 index 00000000000..09ae06f8919 --- /dev/null +++ b/.changelog/a746ae9162ab4926b9ff619e43efed2a.json @@ -0,0 +1,8 @@ +{ + "id": "a746ae91-62ab-4926-b9ff-619e43efed2a", + "type": "documentation", + "description": "Support access tokens for Bitbucket sources", + "modules": [ + "service/codebuild" + ] +} \ No newline at end of file diff --git a/.changelog/e45ad74e098f4e6fb187ee480ecb8419.json b/.changelog/e45ad74e098f4e6fb187ee480ecb8419.json new file mode 100644 index 00000000000..efc632de736 --- /dev/null +++ b/.changelog/e45ad74e098f4e6fb187ee480ecb8419.json @@ -0,0 +1,8 @@ +{ + "id": "e45ad74e-098f-4e6f-b187-ee480ecb8419", + "type": "feature", + "description": "This release adds support for retrieval of S3 direct access metadata on sequence stores and read sets, and adds support for SHA256up and SHA512up HealthOmics ETags.", + "modules": [ + "service/omics" + ] +} \ No newline at end of file diff --git a/service/batch/deserializers.go b/service/batch/deserializers.go index 88803dac8fe..0c77795d5f6 100644 --- a/service/batch/deserializers.go +++ b/service/batch/deserializers.go @@ -3579,6 +3579,11 @@ func awsRestjson1_deserializeDocumentAttemptDetail(v **types.AttemptDetail, valu sv.StoppedAt = ptr.Int64(i64) } + case "taskProperties": + if err := awsRestjson1_deserializeDocumentListAttemptEcsTaskDetails(&sv.TaskProperties, value); err != nil { + return err + } + default: _, _ = key, value @@ -3622,6 +3627,136 @@ func awsRestjson1_deserializeDocumentAttemptDetails(v *[]types.AttemptDetail, va return nil } +func awsRestjson1_deserializeDocumentAttemptEcsTaskDetails(v **types.AttemptEcsTaskDetails, 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.AttemptEcsTaskDetails + if *v == nil { + sv = &types.AttemptEcsTaskDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "containerInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ContainerInstanceArn = ptr.String(jtv) + } + + case "containers": + if err := awsRestjson1_deserializeDocumentListAttemptTaskContainerDetails(&sv.Containers, value); err != nil { + return err + } + + case "taskArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.TaskArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAttemptTaskContainerDetails(v **types.AttemptTaskContainerDetails, 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.AttemptTaskContainerDetails + if *v == nil { + sv = &types.AttemptTaskContainerDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "exitCode": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ExitCode = ptr.Int32(int32(i64)) + } + + case "logStreamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.LogStreamName = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "networkInterfaces": + if err := awsRestjson1_deserializeDocumentNetworkInterfaceList(&sv.NetworkInterfaces, value); err != nil { + return err + } + + case "reason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Reason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentClientException(v **types.ClientException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5268,6 +5403,15 @@ func awsRestjson1_deserializeDocumentEksAttemptContainerDetail(v **types.EksAtte sv.ExitCode = ptr.Int32(int32(i64)) } + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + case "reason": if value != nil { jtv, ok := value.(string) @@ -8336,6 +8480,74 @@ func awsRestjson1_deserializeDocumentLinuxParameters(v **types.LinuxParameters, return nil } +func awsRestjson1_deserializeDocumentListAttemptEcsTaskDetails(v *[]types.AttemptEcsTaskDetails, 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.AttemptEcsTaskDetails + if *v == nil { + cv = []types.AttemptEcsTaskDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AttemptEcsTaskDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentAttemptEcsTaskDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentListAttemptTaskContainerDetails(v *[]types.AttemptTaskContainerDetails, 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.AttemptTaskContainerDetails + if *v == nil { + cv = []types.AttemptTaskContainerDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AttemptTaskContainerDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentAttemptTaskContainerDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentListEcsTaskDetails(v *[]types.EcsTaskDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/batch/doc.go b/service/batch/doc.go index 747b3204c2c..b0f2d2247db 100644 --- a/service/batch/doc.go +++ b/service/batch/doc.go @@ -9,7 +9,7 @@ // advantages of the batch computing to remove the undifferentiated heavy lifting // of configuring and managing required infrastructure. At the same time, it also // adopts a familiar batch computing software approach. You can use Batch to -// efficiently provision resources d, and work toward eliminating capacity +// efficiently provision resources, and work toward eliminating capacity // constraints, reducing your overall compute costs, and delivering results more // quickly. As a fully managed service, Batch can run batch computing workloads of // any scale. Batch automatically provisions compute resources and optimizes diff --git a/service/batch/types/types.go b/service/batch/types/types.go index 3864ff7b36a..7a23fd04e00 100644 --- a/service/batch/types/types.go +++ b/service/batch/types/types.go @@ -95,6 +95,51 @@ type AttemptDetail struct { // SUCCEEDED or FAILED ). StoppedAt *int64 + // The properties for a task definition that describes the container and volume + // definitions of an Amazon ECS task. + TaskProperties []AttemptEcsTaskDetails + + noSmithyDocumentSerde +} + +// An object that represents the details of a task. +type AttemptEcsTaskDetails struct { + + // The Amazon Resource Name (ARN) of the container instance that hosts the task. + ContainerInstanceArn *string + + // A list of containers that are included in the taskProperties list. + Containers []AttemptTaskContainerDetails + + // The ARN of the Amazon ECS task. + TaskArn *string + + noSmithyDocumentSerde +} + +// An object that represents the details of a container that's part of a job +// attempt. +type AttemptTaskContainerDetails struct { + + // The exit code for the container’s attempt. A non-zero exit code is considered + // failed. + ExitCode *int32 + + // The name of the Amazon CloudWatch Logs log stream that's associated with the + // container. The log group for Batch jobs is /aws/batch/job . Each container + // attempt receives a log stream name when they reach the RUNNING status. + LogStreamName *string + + // The name of a container. + Name *string + + // The network interfaces that are associated with the job attempt. + NetworkInterfaces []NetworkInterface + + // A short (255 max characters) string that's easy to understand and provides + // additional details for a running or stopped container. + Reason *string + noSmithyDocumentSerde } @@ -1391,6 +1436,9 @@ type EksAttemptContainerDetail struct { // failed. ExitCode *int32 + // The name of a container. + Name *string + // A short (255 max characters) human-readable string to provide additional // details for a running or stopped container. Reason *string @@ -1849,10 +1897,9 @@ type EksPodProperties struct { // in the Kubernetes documentation. HostNetwork *bool - // References a Kubernetes secret resource. This object must start and end with an - // alphanumeric character, is required to be lowercase, can include periods (.) and - // hyphens (-), and can't contain more than 253 characters. ImagePullSecret$name - // is required when this object is used. + // References a Kubernetes secret resource. It holds a list of secrets. These + // secrets help to gain access to pull an images from a private registry. + // ImagePullSecret$name is required when this object is used. ImagePullSecrets []ImagePullSecret // These containers run before application containers, always runs to completion, @@ -1916,7 +1963,8 @@ type EksPodPropertiesDetail struct { // in the Kubernetes documentation. HostNetwork *bool - // Displays the reference pointer to the Kubernetes secret resource. + // Displays the reference pointer to the Kubernetes secret resource. These secrets + // help to gain access to pull an images from a private registry. ImagePullSecrets []ImagePullSecret // The container registered with the Amazon EKS Connector agent and persists the @@ -2163,8 +2211,9 @@ type Host struct { noSmithyDocumentSerde } -// References a Kubernetes configuration resource that holds a list of secrets. -// These secrets help to gain access to pull an image from a private registry. +// References a Kubernetes secret resource. This name of the secret must start and +// end with an alphanumeric character, is required to be lowercase, can include +// periods (.) and hyphens (-), and can't contain more than 253 characters. type ImagePullSecret struct { // Provides a unique identifier for the ImagePullSecret . This object is required @@ -2490,7 +2539,7 @@ type JobQueueDetail struct { type JobStateTimeLimitAction struct { // The action to take when a job is at the head of the job queue in the specified - // state for the specified period of time. The only supported value is " CANCEL ", + // state for the specified period of time. The only supported value is CANCEL , // which will cancel the job. // // This member is required. @@ -2508,8 +2557,8 @@ type JobStateTimeLimitAction struct { // This member is required. Reason *string - // The state of the job needed to trigger the action. The only supported value is " - // RUNNABLE ". + // The state of the job needed to trigger the action. The only supported value is + // RUNNABLE . // // This member is required. State JobStateTimeLimitActionsState diff --git a/service/cloudfront/api_op_CreateInvalidation.go b/service/cloudfront/api_op_CreateInvalidation.go index b77eef9cb78..095bab56b04 100644 --- a/service/cloudfront/api_op_CreateInvalidation.go +++ b/service/cloudfront/api_op_CreateInvalidation.go @@ -11,7 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Create a new invalidation. +// Create a new invalidation. For more information, see Invalidating files (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html) +// in the Amazon CloudFront Developer Guide. func (c *Client) CreateInvalidation(ctx context.Context, params *CreateInvalidationInput, optFns ...func(*Options)) (*CreateInvalidationOutput, error) { if params == nil { params = &CreateInvalidationInput{} diff --git a/service/cloudfront/api_op_CreateKeyValueStore.go b/service/cloudfront/api_op_CreateKeyValueStore.go index 2dc2930ff12..bb1ab72cbb0 100644 --- a/service/cloudfront/api_op_CreateKeyValueStore.go +++ b/service/cloudfront/api_op_CreateKeyValueStore.go @@ -11,8 +11,8 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Specifies the Key Value Store resource to add to your account. In your account, -// the Key Value Store names must be unique. You can also import Key Value Store +// Specifies the key value store resource to add to your account. In your account, +// the key value store names must be unique. You can also import key value store // data in JSON format from an S3 bucket by providing a valid ImportSource that // you own. func (c *Client) CreateKeyValueStore(ctx context.Context, params *CreateKeyValueStoreInput, optFns ...func(*Options)) (*CreateKeyValueStoreOutput, error) { @@ -32,13 +32,13 @@ func (c *Client) CreateKeyValueStore(ctx context.Context, params *CreateKeyValue type CreateKeyValueStoreInput struct { - // The name of the Key Value Store. The maximum length of the name is 32 - // characters. + // The name of the key value store. The minimum length is 1 character and the + // maximum length is 64 characters. // // This member is required. Name *string - // The comment of the Key Value Store. + // The comment of the key value store. Comment *string // The S3 bucket that provides the source for the import. The source must be in a @@ -50,13 +50,13 @@ type CreateKeyValueStoreInput struct { type CreateKeyValueStoreOutput struct { - // The ETag in the resulting Key Value Store. + // The ETag in the resulting key value store. ETag *string - // The resulting Key Value Store. + // The resulting key value store. KeyValueStore *types.KeyValueStore - // The location of the resulting Key Value Store. + // The location of the resulting key value store. Location *string // Metadata pertaining to the operation's result. diff --git a/service/cloudfront/api_op_CreateRealtimeLogConfig.go b/service/cloudfront/api_op_CreateRealtimeLogConfig.go index eb6d553e771..8e21800f082 100644 --- a/service/cloudfront/api_op_CreateRealtimeLogConfig.go +++ b/service/cloudfront/api_op_CreateRealtimeLogConfig.go @@ -51,9 +51,9 @@ type CreateRealtimeLogConfigInput struct { // This member is required. Name *string - // The sampling rate for this real-time log configuration. The sampling rate - // determines the percentage of viewer requests that are represented in the - // real-time log data. You must provide an integer between 1 and 100, inclusive. + // The sampling rate for this real-time log configuration. You can specify a whole + // number between 1 and 100 (inclusive) to determine the percentage of viewer + // requests that are represented in the real-time log data. // // This member is required. SamplingRate *int64 diff --git a/service/cloudfront/api_op_DeleteKeyValueStore.go b/service/cloudfront/api_op_DeleteKeyValueStore.go index 2d4acbe3776..93deb1bf4e8 100644 --- a/service/cloudfront/api_op_DeleteKeyValueStore.go +++ b/service/cloudfront/api_op_DeleteKeyValueStore.go @@ -10,7 +10,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Specifies the Key Value Store to delete. +// Specifies the key value store to delete. func (c *Client) DeleteKeyValueStore(ctx context.Context, params *DeleteKeyValueStoreInput, optFns ...func(*Options)) (*DeleteKeyValueStoreOutput, error) { if params == nil { params = &DeleteKeyValueStoreInput{} @@ -28,12 +28,12 @@ func (c *Client) DeleteKeyValueStore(ctx context.Context, params *DeleteKeyValue type DeleteKeyValueStoreInput struct { - // The Key Value Store to delete, if a match occurs. + // The key value store to delete, if a match occurs. // // This member is required. IfMatch *string - // The name of the Key Value Store. + // The name of the key value store. // // This member is required. Name *string diff --git a/service/cloudfront/api_op_DescribeKeyValueStore.go b/service/cloudfront/api_op_DescribeKeyValueStore.go index a1f877d852d..19164badd0b 100644 --- a/service/cloudfront/api_op_DescribeKeyValueStore.go +++ b/service/cloudfront/api_op_DescribeKeyValueStore.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Specifies the Key Value Store and its configuration. +// Specifies the key value store and its configuration. func (c *Client) DescribeKeyValueStore(ctx context.Context, params *DescribeKeyValueStoreInput, optFns ...func(*Options)) (*DescribeKeyValueStoreOutput, error) { if params == nil { params = &DescribeKeyValueStoreInput{} @@ -29,7 +29,7 @@ func (c *Client) DescribeKeyValueStore(ctx context.Context, params *DescribeKeyV type DescribeKeyValueStoreInput struct { - // The name of the Key Value Store. + // The name of the key value store. // // This member is required. Name *string @@ -39,10 +39,10 @@ type DescribeKeyValueStoreInput struct { type DescribeKeyValueStoreOutput struct { - // The ETag of the resulting Key Value Store. + // The ETag of the resulting key value store. ETag *string - // The resulting Key Value Store. + // The resulting key value store. KeyValueStore *types.KeyValueStore // Metadata pertaining to the operation's result. diff --git a/service/cloudfront/api_op_ListDistributionsByWebACLId.go b/service/cloudfront/api_op_ListDistributionsByWebACLId.go index 68bc6ea6078..fee09601c58 100644 --- a/service/cloudfront/api_op_ListDistributionsByWebACLId.go +++ b/service/cloudfront/api_op_ListDistributionsByWebACLId.go @@ -33,7 +33,11 @@ type ListDistributionsByWebACLIdInput struct { // The ID of the WAF web ACL that you want to list the associated distributions. // If you specify "null" for the ID, the request returns a list of the - // distributions that aren't associated with a web ACL. + // distributions that aren't associated with a web ACL. For WAFV2, this is the ARN + // of the web ACL, such as + // arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 + // . For WAF Classic, this is the ID of the web ACL, such as + // a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 . // // This member is required. WebACLId *string diff --git a/service/cloudfront/api_op_ListKeyValueStores.go b/service/cloudfront/api_op_ListKeyValueStores.go index 4f59b57474f..8cffd9d5d83 100644 --- a/service/cloudfront/api_op_ListKeyValueStores.go +++ b/service/cloudfront/api_op_ListKeyValueStores.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Specifies the Key Value Stores to list. +// Specifies the key value stores to list. func (c *Client) ListKeyValueStores(ctx context.Context, params *ListKeyValueStoresInput, optFns ...func(*Options)) (*ListKeyValueStoresOutput, error) { if params == nil { params = &ListKeyValueStoresInput{} @@ -29,13 +29,13 @@ func (c *Client) ListKeyValueStores(ctx context.Context, params *ListKeyValueSto type ListKeyValueStoresInput struct { - // The marker associated with the Key Value Stores list. + // The marker associated with the key value stores list. Marker *string - // The maximum number of items in the Key Value Stores list. + // The maximum number of items in the key value stores list. MaxItems *int32 - // The status of the request for the Key Value Stores list. + // The status of the request for the key value stores list. Status *string noSmithyDocumentSerde @@ -43,7 +43,7 @@ type ListKeyValueStoresInput struct { type ListKeyValueStoresOutput struct { - // The resulting Key Value Stores list. + // The resulting key value stores list. KeyValueStoreList *types.KeyValueStoreList // Metadata pertaining to the operation's result. @@ -139,7 +139,7 @@ var _ ListKeyValueStoresAPIClient = (*Client)(nil) // ListKeyValueStoresPaginatorOptions is the paginator options for // ListKeyValueStores type ListKeyValueStoresPaginatorOptions struct { - // The maximum number of items in the Key Value Stores list. + // The maximum number of items in the key value stores list. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/cloudfront/api_op_UpdateKeyValueStore.go b/service/cloudfront/api_op_UpdateKeyValueStore.go index 26f1f7c3a8f..6288c3611e2 100644 --- a/service/cloudfront/api_op_UpdateKeyValueStore.go +++ b/service/cloudfront/api_op_UpdateKeyValueStore.go @@ -11,7 +11,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Specifies the Key Value Store to update. +// Specifies the key value store to update. func (c *Client) UpdateKeyValueStore(ctx context.Context, params *UpdateKeyValueStoreInput, optFns ...func(*Options)) (*UpdateKeyValueStoreOutput, error) { if params == nil { params = &UpdateKeyValueStoreInput{} @@ -29,17 +29,17 @@ func (c *Client) UpdateKeyValueStore(ctx context.Context, params *UpdateKeyValue type UpdateKeyValueStoreInput struct { - // The comment of the Key Value Store to update. + // The comment of the key value store to update. // // This member is required. Comment *string - // The Key Value Store to update, if a match occurs. + // The key value store to update, if a match occurs. // // This member is required. IfMatch *string - // The name of the Key Value Store to update. + // The name of the key value store to update. // // This member is required. Name *string @@ -49,10 +49,10 @@ type UpdateKeyValueStoreInput struct { type UpdateKeyValueStoreOutput struct { - // The ETag of the resulting Key Value Store. + // The ETag of the resulting key value store. ETag *string - // The resulting Key Value Store to update. + // The resulting key value store to update. KeyValueStore *types.KeyValueStore // Metadata pertaining to the operation's result. diff --git a/service/cloudfront/deserializers.go b/service/cloudfront/deserializers.go index cdffe3637e8..27eaedcc6b2 100644 --- a/service/cloudfront/deserializers.go +++ b/service/cloudfront/deserializers.go @@ -2659,6 +2659,9 @@ func awsRestxml_deserializeOpErrorCreateKeyValueStore(response *smithyhttp.Respo case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4861,6 +4864,9 @@ func awsRestxml_deserializeOpErrorDeleteKeyValueStore(response *smithyhttp.Respo case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5713,6 +5719,9 @@ func awsRestxml_deserializeOpErrorDescribeKeyValueStore(response *smithyhttp.Res case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -12417,6 +12426,9 @@ func awsRestxml_deserializeOpErrorListKeyValueStores(response *smithyhttp.Respon case strings.EqualFold("InvalidArgument", errorCode): return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -15942,6 +15954,9 @@ func awsRestxml_deserializeOpErrorUpdateKeyValueStore(response *smithyhttp.Respo case strings.EqualFold("PreconditionFailed", errorCode): return awsRestxml_deserializeErrorPreconditionFailed(response, errorBody) + case strings.EqualFold("UnsupportedOperation", errorCode): + return awsRestxml_deserializeErrorUnsupportedOperation(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, diff --git a/service/cloudfront/doc.go b/service/cloudfront/doc.go index 49156d185b0..2ee6909ec70 100644 --- a/service/cloudfront/doc.go +++ b/service/cloudfront/doc.go @@ -6,5 +6,6 @@ // Amazon CloudFront This is the Amazon CloudFront API Reference. This guide is // for developers who need detailed information about CloudFront API actions, data // types, and errors. For detailed information about CloudFront features, see the -// Amazon CloudFront Developer Guide. +// Amazon CloudFront Developer Guide (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) +// . package cloudfront diff --git a/service/cloudfront/types/enums.go b/service/cloudfront/types/enums.go index de3d0295087..ec063218316 100644 --- a/service/cloudfront/types/enums.go +++ b/service/cloudfront/types/enums.go @@ -372,8 +372,10 @@ type OriginAccessControlOriginTypes string // Enum values for OriginAccessControlOriginTypes const ( - OriginAccessControlOriginTypesS3 OriginAccessControlOriginTypes = "s3" - OriginAccessControlOriginTypesMediastore OriginAccessControlOriginTypes = "mediastore" + OriginAccessControlOriginTypesS3 OriginAccessControlOriginTypes = "s3" + OriginAccessControlOriginTypesMediastore OriginAccessControlOriginTypes = "mediastore" + OriginAccessControlOriginTypesMediapackagev2 OriginAccessControlOriginTypes = "mediapackagev2" + OriginAccessControlOriginTypesLambda OriginAccessControlOriginTypes = "lambda" ) // Values returns all known values for OriginAccessControlOriginTypes. Note that @@ -384,6 +386,8 @@ func (OriginAccessControlOriginTypes) Values() []OriginAccessControlOriginTypes return []OriginAccessControlOriginTypes{ "s3", "mediastore", + "mediapackagev2", + "lambda", } } diff --git a/service/cloudfront/types/errors.go b/service/cloudfront/types/errors.go index 3b52e25a8e5..fdfcdb3ce6e 100644 --- a/service/cloudfront/types/errors.go +++ b/service/cloudfront/types/errors.go @@ -141,7 +141,7 @@ func (e *CannotChangeImmutablePublicKeyFields) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The Key Value Store entity cannot be deleted while it is in use. +// The key value store entity cannot be deleted while it is in use. type CannotDeleteEntityWhileInUse struct { Message *string @@ -361,8 +361,8 @@ func (e *DistributionNotDisabled) ErrorCode() string { } func (e *DistributionNotDisabled) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The Key Value Store entity already exists. You must provide a unique Key Value -// Store entity. +// The key value store entity already exists. You must provide a unique key value +// store entity. type EntityAlreadyExists struct { Message *string @@ -388,7 +388,7 @@ func (e *EntityAlreadyExists) ErrorCode() string { } func (e *EntityAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The Key Value Store entity limit has been exceeded. +// The key value store entity limit has been exceeded. type EntityLimitExceeded struct { Message *string @@ -414,7 +414,7 @@ func (e *EntityLimitExceeded) ErrorCode() string { } func (e *EntityLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The Key Value Store entity was not found. +// The key value store entity was not found. type EntityNotFound struct { Message *string @@ -440,7 +440,7 @@ func (e *EntityNotFound) ErrorCode() string { } func (e *EntityNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } -// The Key Value Store entity size limit was exceeded. +// The key value store entity size limit was exceeded. type EntitySizeLimitExceeded struct { Message *string diff --git a/service/cloudfront/types/types.go b/service/cloudfront/types/types.go index cc68fde878b..1f64e6ca82b 100644 --- a/service/cloudfront/types/types.go +++ b/service/cloudfront/types/types.go @@ -154,13 +154,15 @@ type AllowedMethods struct { // (formerly known as limit) on the number of cache behaviors that you can add to a // distribution, see Quotas (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) // in the Amazon CloudFront Developer Guide. If you don't want to specify any cache -// behaviors, include only an empty CacheBehaviors element. Don't include an empty -// CacheBehavior element because this is invalid. To delete all cache behaviors in -// an existing distribution, update the distribution configuration and include only -// an empty CacheBehaviors element. To add, change, or remove one or more cache -// behaviors, update the distribution configuration and specify all of the cache -// behaviors that you want to include in the updated distribution. For more -// information about cache behaviors, see Cache Behavior Settings (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) +// behaviors, include only an empty CacheBehaviors element. For more information, +// see CacheBehaviors (https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CacheBehaviors.html) +// . Don't include an empty CacheBehavior element because this is invalid. To +// delete all cache behaviors in an existing distribution, update the distribution +// configuration and include only an empty CacheBehaviors element. To add, change, +// or remove one or more cache behaviors, update the distribution configuration and +// specify all of the cache behaviors that you want to include in the updated +// distribution. For more information about cache behaviors, see Cache Behavior +// Settings (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html#DownloadDistValuesCacheBehavior) // in the Amazon CloudFront Developer Guide. type CacheBehavior struct { @@ -941,7 +943,8 @@ type ContinuousDeploymentSingleHeaderConfig struct { type ContinuousDeploymentSingleWeightConfig struct { // The percentage of traffic to send to a staging distribution, expressed as a - // decimal number between 0 and .15. + // decimal number between 0 and 0.15. For example, a value of 0.10 means 10% of + // traffic is sent to the staging distribution. // // This member is required. Weight *float32 @@ -1270,8 +1273,8 @@ type DefaultCacheBehavior struct { ForwardedValues *ForwardedValues // A list of CloudFront functions that are associated with this cache behavior. - // CloudFront functions must be published to the LIVE stage to associate them with - // a cache behavior. + // Your functions must be published to the LIVE stage to associate them with a + // cache behavior. FunctionAssociations *FunctionAssociations // A complex type that contains zero or more Lambda@Edge function associations for @@ -1489,7 +1492,7 @@ type DistributionConfig struct { // in the Amazon CloudFront Developer Guide. DefaultRootObject *string - // (Optional) Specify the maximum HTTP version(s) that you want viewers to use to + // (Optional) Specify the HTTP version(s) that you want viewers to use to // communicate with CloudFront. The default value for new web distributions is // http2 . Viewers that don't support HTTP/2 automatically use an earlier HTTP // version. For viewers and CloudFront to use HTTP/2, viewers must support TLSv1.2 @@ -1570,9 +1573,9 @@ type DistributionConfig struct { // A unique identifier that specifies the WAF web ACL, if any, to associate with // this distribution. To specify a web ACL created using the latest version of WAF, // use the ACL ARN, for example - // arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/473e64fd-f30b-4765-81a0-62ad96dd167a + // arn:aws:wafv2:us-east-1:123456789012:global/webacl/ExampleWebACL/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 // . To specify a web ACL created using WAF Classic, use the ACL ID, for example - // 473e64fd-f30b-4765-81a0-62ad96dd167a . WAF is a web application firewall that + // a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 . WAF is a web application firewall that // lets you monitor the HTTP and HTTPS requests that are forwarded to CloudFront, // and lets you control access to your content. Based on conditions that you // specify, such as the IP addresses that requests originate from or the values of @@ -1765,7 +1768,9 @@ type DistributionSummary struct { // This member is required. Restrictions *Restrictions - // Whether the primary distribution has a staging distribution enabled. + // A Boolean that indicates whether this is a staging distribution. When this + // value is true , this is a staging distribution. When this value is false , this + // is not a staging distribution. // // This member is required. Staging *bool @@ -2192,8 +2197,8 @@ type FunctionAssociation struct { } // A list of CloudFront functions that are associated with a cache behavior in a -// CloudFront distribution. CloudFront functions must be published to the LIVE -// stage to associate them with a cache behavior. +// CloudFront distribution. Your functions must be published to the LIVE stage to +// associate them with a cache behavior. type FunctionAssociations struct { // The number of CloudFront functions in the list. @@ -2202,8 +2207,8 @@ type FunctionAssociations struct { Quantity *int32 // The CloudFront functions that are associated with a cache behavior in a - // CloudFront distribution. CloudFront functions must be published to the LIVE - // stage to associate them with a cache behavior. + // CloudFront distribution. Your functions must be published to the LIVE stage to + // associate them with a cache behavior. Items []FunctionAssociation noSmithyDocumentSerde @@ -2222,7 +2227,7 @@ type FunctionConfig struct { // This member is required. Runtime FunctionRuntime - // The configuration for the Key Value Store associations. + // The configuration for the key value store associations. KeyValueStoreAssociations *KeyValueStoreAssociations noSmithyDocumentSerde @@ -2355,15 +2360,15 @@ type Headers struct { noSmithyDocumentSerde } -// The import source for the Key Value Store. +// The import source for the key value store. type ImportSource struct { - // The Amazon Resource Name (ARN) of the import source for the Key Value Store. + // The Amazon Resource Name (ARN) of the import source for the key value store. // // This member is required. SourceARN *string - // The source type of the import source for the Key Value Store. + // The source type of the import source for the key value store. // // This member is required. SourceType ImportSourceType @@ -2585,46 +2590,46 @@ type KeyPairIds struct { noSmithyDocumentSerde } -// The Key Value Store. Use this to separate data from function code, allowing you -// to update data without having to publish a new version of a function. The Key -// Value Store holds keys and their corresponding values. +// The key value store. Use this to separate data from function code, allowing you +// to update data without having to publish a new version of a function. The key +// value store holds keys and their corresponding values. type KeyValueStore struct { - // The Amazon Resource Name (ARN) of the Key Value Store. + // The Amazon Resource Name (ARN) of the key value store. // // This member is required. ARN *string - // A comment for the Key Value Store. + // A comment for the key value store. // // This member is required. Comment *string - // The unique Id for the Key Value Store. + // The unique Id for the key value store. // // This member is required. Id *string - // The last-modified time of the Key Value Store. + // The last-modified time of the key value store. // // This member is required. LastModifiedTime *time.Time - // The name of the Key Value Store. + // The name of the key value store. // // This member is required. Name *string - // The status of the Key Value Store. + // The status of the key value store. Status *string noSmithyDocumentSerde } -// The Key Value Store association. +// The key value store association. type KeyValueStoreAssociation struct { - // The Amazon Resource Name (ARN) of the Key Value Store association. + // The Amazon Resource Name (ARN) of the key value store association. // // This member is required. KeyValueStoreARN *string @@ -2632,37 +2637,37 @@ type KeyValueStoreAssociation struct { noSmithyDocumentSerde } -// The Key Value Store associations. +// The key value store associations. type KeyValueStoreAssociations struct { - // The quantity of Key Value Store associations. + // The quantity of key value store associations. // // This member is required. Quantity *int32 - // The items of the Key Value Store association. + // The items of the key value store association. Items []KeyValueStoreAssociation noSmithyDocumentSerde } -// The Key Value Store list. +// The key value store list. type KeyValueStoreList struct { - // The maximum number of items in the Key Value Store list. + // The maximum number of items in the key value store list. // // This member is required. MaxItems *int32 - // The quantity of the Key Value Store list. + // The quantity of the key value store list. // // This member is required. Quantity *int32 - // The items of the Key Value Store list. + // The items of the key value store list. Items []KeyValueStore - // The next marker associated with the Key Value Store list. + // The next marker associated with the key value store list. NextMarker *string noSmithyDocumentSerde @@ -2914,7 +2919,8 @@ type OriginAccessControl struct { // A CloudFront origin access control configuration. type OriginAccessControlConfig struct { - // A name to identify the origin access control. + // A name to identify the origin access control. You can specify up to 64 + // characters. // // This member is required. Name *string @@ -4226,7 +4232,8 @@ type ResponseHeadersPolicySecurityHeadersConfig struct { // Determines whether CloudFront includes the Strict-Transport-Security HTTP // response header and the header's value. For more information about the - // Strict-Transport-Security HTTP response header, see Strict-Transport-Security (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security) + // Strict-Transport-Security HTTP response header, see Security headers (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/understanding-response-headers-policies.html#understanding-response-headers-policies-security) + // in the Amazon CloudFront Developer Guide and Strict-Transport-Security (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security) // in the MDN Web Docs. StrictTransportSecurity *ResponseHeadersPolicyStrictTransportSecurity @@ -4401,10 +4408,14 @@ type S3Origin struct { // endpoint, use the CustomOriginConfig element instead. type S3OriginConfig struct { - // The CloudFront origin access identity to associate with the origin. Use an - // origin access identity to configure the origin so that viewers can only access - // objects in an Amazon S3 bucket through CloudFront. The format of the value is: - // origin-access-identity/cloudfront/ID-of-origin-access-identity where + // If you're using origin access control (OAC) instead of origin access identity, + // specify an empty OriginAccessIdentity element. For more information, see + // Restricting access to an Amazon Web Services (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-origin.html) + // in the Amazon CloudFront Developer Guide. The CloudFront origin access identity + // to associate with the origin. Use an origin access identity to configure the + // origin so that viewers can only access objects in an Amazon S3 bucket through + // CloudFront. The format of the value is: + // origin-access-identity/cloudfront/ID-of-origin-access-identity The // ID-of-origin-access-identity is the value that CloudFront returned in the ID // element when you created the origin access identity. If you want viewers to be // able to access objects using either the CloudFront URL or the Amazon S3 URL, @@ -4438,7 +4449,7 @@ type SessionStickinessConfig struct { // The maximum amount of time to consider requests from the viewer as being part // of the same session. Allowed values are 300–3600 seconds (5–60 minutes). The - // value must be less than or equal to IdleTTL . + // value must be greater than or equal to IdleTTL . // // This member is required. MaximumTTL *int32 diff --git a/service/cloudwatch/api_op_PutAnomalyDetector.go b/service/cloudwatch/api_op_PutAnomalyDetector.go index 258fb711582..4afd4b531b9 100644 --- a/service/cloudwatch/api_op_PutAnomalyDetector.go +++ b/service/cloudwatch/api_op_PutAnomalyDetector.go @@ -47,6 +47,11 @@ type PutAnomalyDetectorInput struct { // Deprecated: Use SingleMetricAnomalyDetector. Dimensions []types.Dimension + // Use this object to include parameters to provide information about your metric + // to CloudWatch to help it build more accurate anomaly detection models. + // Currently, it includes the PeriodicSpikes parameter. + MetricCharacteristics *types.MetricCharacteristics + // The metric math anomaly detector to be created. When using // MetricMathAnomalyDetector , you cannot include the following parameters in the // same operation: diff --git a/service/cloudwatch/deserializers.go b/service/cloudwatch/deserializers.go index 065dd290b3b..0eccc85ab41 100644 --- a/service/cloudwatch/deserializers.go +++ b/service/cloudwatch/deserializers.go @@ -4847,6 +4847,12 @@ func awsAwsquery_deserializeDocumentAnomalyDetector(v **types.AnomalyDetector, d return err } + case strings.EqualFold("MetricCharacteristics", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsAwsquery_deserializeDocumentMetricCharacteristics(&sv.MetricCharacteristics, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("MetricMathAnomalyDetector", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsAwsquery_deserializeDocumentMetricMathAnomalyDetector(&sv.MetricMathAnomalyDetector, nodeDecoder); err != nil { @@ -8520,6 +8526,58 @@ func awsAwsquery_deserializeDocumentMetricAlarmsUnwrapped(v *[]types.MetricAlarm *v = sv return nil } +func awsAwsquery_deserializeDocumentMetricCharacteristics(v **types.MetricCharacteristics, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.MetricCharacteristics + if *v == nil { + sv = &types.MetricCharacteristics{} + } 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("PeriodicSpikes", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected PeriodicSpikes to be of type *bool, got %T instead", val) + } + sv.PeriodicSpikes = ptr.Bool(xtv) + } + + 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_deserializeDocumentMetricDataQueries(v *[]types.MetricDataQuery, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cloudwatch/serializers.go b/service/cloudwatch/serializers.go index 7a377aec726..f71531f978f 100644 --- a/service/cloudwatch/serializers.go +++ b/service/cloudwatch/serializers.go @@ -2702,6 +2702,18 @@ func awsAwsquery_serializeDocumentMetric(v *types.Metric, value query.Value) err return nil } +func awsAwsquery_serializeDocumentMetricCharacteristics(v *types.MetricCharacteristics, value query.Value) error { + object := value.Object() + _ = object + + if v.PeriodicSpikes != nil { + objectKey := object.Key("PeriodicSpikes") + objectKey.Boolean(*v.PeriodicSpikes) + } + + return nil +} + func awsAwsquery_serializeDocumentMetricData(v []types.MetricDatum, value query.Value) error { array := value.Array("member") @@ -3900,6 +3912,13 @@ func awsAwsquery_serializeOpDocumentPutAnomalyDetectorInput(v *PutAnomalyDetecto } } + if v.MetricCharacteristics != nil { + objectKey := object.Key("MetricCharacteristics") + if err := awsAwsquery_serializeDocumentMetricCharacteristics(v.MetricCharacteristics, objectKey); err != nil { + return err + } + } + if v.MetricMathAnomalyDetector != nil { objectKey := object.Key("MetricMathAnomalyDetector") if err := awsAwsquery_serializeDocumentMetricMathAnomalyDetector(v.MetricMathAnomalyDetector, objectKey); err != nil { diff --git a/service/cloudwatch/types/types.go b/service/cloudwatch/types/types.go index 60e907c89b2..b33d90b5891 100644 --- a/service/cloudwatch/types/types.go +++ b/service/cloudwatch/types/types.go @@ -48,6 +48,11 @@ type AnomalyDetector struct { // Deprecated: Use SingleMetricAnomalyDetector.Dimensions property. Dimensions []Dimension + // This object includes parameters that you can use to provide information about + // your metric to CloudWatch to help it build more accurate anomaly detection + // models. Currently, it includes the PeriodicSpikes parameter. + MetricCharacteristics *MetricCharacteristics + // The CloudWatch metric math expression for this anomaly detector. MetricMathAnomalyDetector *MetricMathAnomalyDetector @@ -69,8 +74,7 @@ type AnomalyDetector struct { // Deprecated: Use SingleMetricAnomalyDetector.Stat property. Stat *string - // The current status of the anomaly detector's training. The possible values are - // TRAINED | PENDING_TRAINING | TRAINED_INSUFFICIENT_DATA + // The current status of the anomaly detector's training. StateValue AnomalyDetectorStateValue noSmithyDocumentSerde @@ -650,6 +654,19 @@ type MetricAlarm struct { noSmithyDocumentSerde } +// This object includes parameters that you can use to provide information to +// CloudWatch to help it build more accurate anomaly detection models. +type MetricCharacteristics struct { + + // Set this parameter to true if values for this metric consistently include + // spikes that should not be considered to be anomalies. With this set to true , + // CloudWatch will expect to see spikes that occurred consistently during the model + // training period, and won't flag future similar spikes as anomalies. + PeriodicSpikes *bool + + noSmithyDocumentSerde +} + // This structure is used in both GetMetricData and PutMetricAlarm . The supported // use of this structure is different for those two operations. When used in // GetMetricData , it indicates the metric data to return, and whether this call is diff --git a/service/codebuild/api_op_ImportSourceCredentials.go b/service/codebuild/api_op_ImportSourceCredentials.go index 50edea49684..b601dc409fd 100644 --- a/service/codebuild/api_op_ImportSourceCredentials.go +++ b/service/codebuild/api_op_ImportSourceCredentials.go @@ -43,7 +43,7 @@ type ImportSourceCredentialsInput struct { ServerType types.ServerType // For GitHub or GitHub Enterprise, this is the personal access token. For - // Bitbucket, this is the app password. + // Bitbucket, this is either the access token or the app password. // // This member is required. Token *string diff --git a/service/cognitoidentityprovider/internal/endpoints/endpoints.go b/service/cognitoidentityprovider/internal/endpoints/endpoints.go index a1cd241e237..cb08204c725 100644 --- a/service/cognitoidentityprovider/internal/endpoints/endpoints.go +++ b/service/cognitoidentityprovider/internal/endpoints/endpoints.go @@ -154,6 +154,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{}, diff --git a/service/iam/api_op_CreateOpenIDConnectProvider.go b/service/iam/api_op_CreateOpenIDConnectProvider.go index e472d15f07f..d90f27fced8 100644 --- a/service/iam/api_op_CreateOpenIDConnectProvider.go +++ b/service/iam/api_op_CreateOpenIDConnectProvider.go @@ -57,25 +57,6 @@ func (c *Client) CreateOpenIDConnectProvider(ctx context.Context, params *Create type CreateOpenIDConnectProviderInput struct { - // A list of server certificate thumbprints for the OpenID Connect (OIDC) identity - // provider's server certificates. Typically this list includes only one entry. - // However, IAM lets you have up to five thumbprints for an OIDC provider. This - // lets you maintain multiple thumbprints if the identity provider is rotating - // certificates. The server certificate thumbprint is the hex-encoded SHA-1 hash - // value of the X.509 certificate used by the domain where the OpenID Connect - // provider makes its keys available. It is always a 40-character string. You must - // provide at least one thumbprint when creating an IAM OIDC provider. For example, - // assume that the OIDC provider is server.example.com and the provider stores its - // keys at https://keys.server.example.com/openid-connect. In that case, the - // thumbprint string would be the hex-encoded SHA-1 hash value of the certificate - // used by https://keys.server.example.com. For more information about obtaining - // the OIDC provider thumbprint, see Obtaining the thumbprint for an OpenID - // Connect provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html) - // in the IAM user Guide. - // - // This member is required. - ThumbprintList []string - // The URL of the identity provider. The URL must begin with https:// and should // correspond to the iss claim in the provider's OpenID Connect ID tokens. Per the // OIDC standard, path components are allowed but query parameters are not. @@ -107,6 +88,24 @@ type CreateOpenIDConnectProviderInput struct { // is not created. Tags []types.Tag + // A list of server certificate thumbprints for the OpenID Connect (OIDC) identity + // provider's server certificates. Typically this list includes only one entry. + // However, IAM lets you have up to five thumbprints for an OIDC provider. This + // lets you maintain multiple thumbprints if the identity provider is rotating + // certificates. This parameter is optional. If it is not included, IAM will + // retrieve and use the top intermediate certificate authority (CA) thumbprint of + // the OpenID Connect identity provider server certificate. The server certificate + // thumbprint is the hex-encoded SHA-1 hash value of the X.509 certificate used by + // the domain where the OpenID Connect provider makes its keys available. It is + // always a 40-character string. For example, assume that the OIDC provider is + // server.example.com and the provider stores its keys at + // https://keys.server.example.com/openid-connect. In that case, the thumbprint + // string would be the hex-encoded SHA-1 hash value of the certificate used by + // https://keys.server.example.com. For more information about obtaining the OIDC + // provider thumbprint, see Obtaining the thumbprint for an OpenID Connect provider (https://docs.aws.amazon.com/IAM/latest/UserGuide/identity-providers-oidc-obtain-thumbprint.html) + // in the IAM user Guide. + ThumbprintList []string + noSmithyDocumentSerde } diff --git a/service/iam/api_op_RemoveRoleFromInstanceProfile.go b/service/iam/api_op_RemoveRoleFromInstanceProfile.go index 8191ee24711..ce71bb945cd 100644 --- a/service/iam/api_op_RemoveRoleFromInstanceProfile.go +++ b/service/iam/api_op_RemoveRoleFromInstanceProfile.go @@ -10,12 +10,13 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes the specified IAM role from the specified EC2 instance profile. Make -// sure that you do not have any Amazon EC2 instances running with the role you are -// about to remove from the instance profile. Removing a role from an instance -// profile that is associated with a running instance might break any applications -// running on the instance. For more information about roles, see IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. For more information about instance profiles, see Using +// Removes the specified IAM role from the specified Amazon EC2 instance profile. +// Make sure that you do not have any Amazon EC2 instances running with the role +// you are about to remove from the instance profile. Removing a role from an +// instance profile that is associated with a running instance might break any +// applications running on the instance. For more information about roles, see IAM +// roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) in the +// IAM User Guide. For more information about instance profiles, see Using // instance profiles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) // in the IAM User Guide. func (c *Client) RemoveRoleFromInstanceProfile(ctx context.Context, params *RemoveRoleFromInstanceProfileInput, optFns ...func(*Options)) (*RemoveRoleFromInstanceProfileOutput, error) { diff --git a/service/iam/api_op_SimulateCustomPolicy.go b/service/iam/api_op_SimulateCustomPolicy.go index d441857d739..8be759b1018 100644 --- a/service/iam/api_op_SimulateCustomPolicy.go +++ b/service/iam/api_op_SimulateCustomPolicy.go @@ -151,12 +151,12 @@ type SimulateCustomPolicyInput struct { // results. If your simulation does not match one of the following scenarios, then // you can omit this parameter. The following list shows each of the supported // scenario values and the resources that you must define to run the simulation. - // Each of the EC2 scenarios requires that you specify instance, image, and + // Each of the Amazon EC2 scenarios requires that you specify instance, image, and // security group resources. If your scenario includes an EBS volume, then you must - // specify that volume as a resource. If the EC2 scenario includes VPC, then you - // must supply the network interface resource. If it includes an IP subnet, then - // you must specify the subnet resource. For more information on the EC2 scenario - // options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) + // specify that volume as a resource. If the Amazon EC2 scenario includes VPC, then + // you must supply the network interface resource. If it includes an IP subnet, + // then you must specify the subnet resource. For more information on the Amazon + // EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) // in the Amazon EC2 User Guide. // - EC2-VPC-InstanceStore instance, image, security group, network interface // - EC2-VPC-InstanceStore-Subnet instance, image, security group, network diff --git a/service/iam/api_op_SimulatePrincipalPolicy.go b/service/iam/api_op_SimulatePrincipalPolicy.go index 082eab85b35..24a765c1625 100644 --- a/service/iam/api_op_SimulatePrincipalPolicy.go +++ b/service/iam/api_op_SimulatePrincipalPolicy.go @@ -170,12 +170,12 @@ type SimulatePrincipalPolicyInput struct { // results. If your simulation does not match one of the following scenarios, then // you can omit this parameter. The following list shows each of the supported // scenario values and the resources that you must define to run the simulation. - // Each of the EC2 scenarios requires that you specify instance, image, and + // Each of the Amazon EC2 scenarios requires that you specify instance, image, and // security group resources. If your scenario includes an EBS volume, then you must - // specify that volume as a resource. If the EC2 scenario includes VPC, then you - // must supply the network interface resource. If it includes an IP subnet, then - // you must specify the subnet resource. For more information on the EC2 scenario - // options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) + // specify that volume as a resource. If the Amazon EC2 scenario includes VPC, then + // you must supply the network interface resource. If it includes an IP subnet, + // then you must specify the subnet resource. For more information on the Amazon + // EC2 scenario options, see Supported platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html) // in the Amazon EC2 User Guide. // - EC2-VPC-InstanceStore instance, image, security group, network interface // - EC2-VPC-InstanceStore-Subnet instance, image, security group, network diff --git a/service/iam/api_op_UpdateRole.go b/service/iam/api_op_UpdateRole.go index 460886f3eea..573be1107e6 100644 --- a/service/iam/api_op_UpdateRole.go +++ b/service/iam/api_op_UpdateRole.go @@ -48,7 +48,8 @@ type UpdateRoleInput struct { // AssumeRole* API operations or the assume-role* CLI operations but does not // apply when you use those operations to create a console URL. For more // information, see Using IAM roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) - // in the IAM User Guide. + // in the IAM User Guide. IAM role credentials provided by Amazon EC2 instances + // assigned to the role are not subject to the specified maximum session duration. MaxSessionDuration *int32 noSmithyDocumentSerde diff --git a/service/iam/deserializers.go b/service/iam/deserializers.go index 93813d5b202..dc98aba5167 100644 --- a/service/iam/deserializers.go +++ b/service/iam/deserializers.go @@ -1276,6 +1276,9 @@ func awsAwsquery_deserializeOpErrorCreateOpenIDConnectProvider(response *smithyh case strings.EqualFold("LimitExceeded", errorCode): return awsAwsquery_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("OpenIdIdpCommunicationError", errorCode): + return awsAwsquery_deserializeErrorOpenIdIdpCommunicationErrorException(response, errorBody) + case strings.EqualFold("ServiceFailure", errorCode): return awsAwsquery_deserializeErrorServiceFailureException(response, errorBody) @@ -16554,6 +16557,50 @@ func awsAwsquery_deserializeErrorNoSuchEntityException(response *smithyhttp.Resp return output } +func awsAwsquery_deserializeErrorOpenIdIdpCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.OpenIdIdpCommunicationErrorException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return output + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + t, err = decoder.GetElement("Error") + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) + err = awsAwsquery_deserializeDocumentOpenIdIdpCommunicationErrorException(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return output +} + func awsAwsquery_deserializeErrorPasswordPolicyViolationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.PasswordPolicyViolationException{} var buff [1024]byte @@ -21035,6 +21082,55 @@ func awsAwsquery_deserializeDocumentOpenIDConnectProviderListTypeUnwrapped(v *[] *v = sv return nil } +func awsAwsquery_deserializeDocumentOpenIdIdpCommunicationErrorException(v **types.OpenIdIdpCommunicationErrorException, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.OpenIdIdpCommunicationErrorException + if *v == nil { + sv = &types.OpenIdIdpCommunicationErrorException{} + } 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("message", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Message = ptr.String(xtv) + } + + 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_deserializeDocumentOrganizationsDecisionDetail(v **types.OrganizationsDecisionDetail, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/iam/types/errors.go b/service/iam/types/errors.go index cf3ad6a2196..6435f645a68 100644 --- a/service/iam/types/errors.go +++ b/service/iam/types/errors.go @@ -529,6 +529,35 @@ func (e *NoSuchEntityException) ErrorCode() string { } func (e *NoSuchEntityException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// The request failed because IAM cannot connect to the OpenID Connect identity +// provider URL. +type OpenIdIdpCommunicationErrorException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *OpenIdIdpCommunicationErrorException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *OpenIdIdpCommunicationErrorException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *OpenIdIdpCommunicationErrorException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "OpenIdIdpCommunicationError" + } + return *e.ErrorCodeOverride +} +func (e *OpenIdIdpCommunicationErrorException) ErrorFault() smithy.ErrorFault { + return smithy.FaultClient +} + // The request was rejected because the provided password did not meet the // requirements imposed by the account password policy. type PasswordPolicyViolationException struct { diff --git a/service/iam/validators.go b/service/iam/validators.go index 69084268dc4..156f324ad1b 100644 --- a/service/iam/validators.go +++ b/service/iam/validators.go @@ -3487,9 +3487,6 @@ func validateOpCreateOpenIDConnectProviderInput(v *CreateOpenIDConnectProviderIn if v.Url == nil { invalidParams.Add(smithy.NewErrParamRequired("Url")) } - if v.ThumbprintList == nil { - invalidParams.Add(smithy.NewErrParamRequired("ThumbprintList")) - } if v.Tags != nil { if err := validateTagListType(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) diff --git a/service/medialive/api_op_CreateCloudWatchAlarmTemplate.go b/service/medialive/api_op_CreateCloudWatchAlarmTemplate.go new file mode 100644 index 00000000000..7d551d4f529 --- /dev/null +++ b/service/medialive/api_op_CreateCloudWatchAlarmTemplate.go @@ -0,0 +1,257 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a cloudwatch alarm template to dynamically generate cloudwatch metric +// alarms on targeted resource types. +func (c *Client) CreateCloudWatchAlarmTemplate(ctx context.Context, params *CreateCloudWatchAlarmTemplateInput, optFns ...func(*Options)) (*CreateCloudWatchAlarmTemplateOutput, error) { + if params == nil { + params = &CreateCloudWatchAlarmTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCloudWatchAlarmTemplate", params, optFns, c.addOperationCreateCloudWatchAlarmTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCloudWatchAlarmTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for CreateCloudWatchAlarmTemplateRequest +type CreateCloudWatchAlarmTemplateInput struct { + + // The comparison operator used to compare the specified statistic and the + // threshold. + // + // This member is required. + ComparisonOperator types.CloudWatchAlarmTemplateComparisonOperator + + // The number of periods over which data is compared to the specified threshold. + // + // This member is required. + EvaluationPeriods *int32 + + // A cloudwatch alarm template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + GroupIdentifier *string + + // The name of the metric associated with the alarm. Must be compatible with + // targetResourceType. + // + // This member is required. + MetricName *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // The period, in seconds, over which the specified statistic is applied. + // + // This member is required. + Period *int32 + + // The statistic to apply to the alarm's metric data. + // + // This member is required. + Statistic types.CloudWatchAlarmTemplateStatistic + + // The resource type this template should dynamically generate cloudwatch metric + // alarms for. + // + // This member is required. + TargetResourceType types.CloudWatchAlarmTemplateTargetResourceType + + // The threshold value to compare with the specified statistic. + // + // This member is required. + Threshold *float64 + + // Specifies how missing data points are treated when evaluating the alarm's + // condition. + // + // This member is required. + TreatMissingData types.CloudWatchAlarmTemplateTreatMissingData + + // The number of datapoints within the evaluation period that must be breaching to + // trigger the alarm. + DatapointsToAlarm *int32 + + // A resource's optional description. + Description *string + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Placeholder documentation for CreateCloudWatchAlarmTemplateResponse +type CreateCloudWatchAlarmTemplateOutput struct { + + // A cloudwatch alarm template's ARN (Amazon Resource Name) + Arn *string + + // The comparison operator used to compare the specified statistic and the + // threshold. + ComparisonOperator types.CloudWatchAlarmTemplateComparisonOperator + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // The number of datapoints within the evaluation period that must be breaching to + // trigger the alarm. + DatapointsToAlarm *int32 + + // A resource's optional description. + Description *string + + // The number of periods over which data is compared to the specified threshold. + EvaluationPeriods *int32 + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + GroupId *string + + // A cloudwatch alarm template's id. AWS provided templates have ids that start + // with aws- + Id *string + + // The name of the metric associated with the alarm. Must be compatible with + // targetResourceType. + MetricName *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // The period, in seconds, over which the specified statistic is applied. + Period *int32 + + // The statistic to apply to the alarm's metric data. + Statistic types.CloudWatchAlarmTemplateStatistic + + // Represents the tags associated with a resource. + Tags map[string]string + + // The resource type this template should dynamically generate cloudwatch metric + // alarms for. + TargetResourceType types.CloudWatchAlarmTemplateTargetResourceType + + // The threshold value to compare with the specified statistic. + Threshold *float64 + + // Specifies how missing data points are treated when evaluating the alarm's + // condition. + TreatMissingData types.CloudWatchAlarmTemplateTreatMissingData + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCloudWatchAlarmTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCloudWatchAlarmTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCreateCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCloudWatchAlarmTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateCloudWatchAlarmTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateCloudWatchAlarmTemplate", + } +} diff --git a/service/medialive/api_op_CreateCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_CreateCloudWatchAlarmTemplateGroup.go new file mode 100644 index 00000000000..fadf3335aa7 --- /dev/null +++ b/service/medialive/api_op_CreateCloudWatchAlarmTemplateGroup.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a cloudwatch alarm template group to group your cloudwatch alarm +// templates and to attach to signal maps for dynamically creating alarms. +func (c *Client) CreateCloudWatchAlarmTemplateGroup(ctx context.Context, params *CreateCloudWatchAlarmTemplateGroupInput, optFns ...func(*Options)) (*CreateCloudWatchAlarmTemplateGroupOutput, error) { + if params == nil { + params = &CreateCloudWatchAlarmTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateCloudWatchAlarmTemplateGroup", params, optFns, c.addOperationCreateCloudWatchAlarmTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateCloudWatchAlarmTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for CreateCloudWatchAlarmTemplateGroupRequest +type CreateCloudWatchAlarmTemplateGroupInput struct { + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // A resource's optional description. + Description *string + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Placeholder documentation for CreateCloudWatchAlarmTemplateGroupResponse +type CreateCloudWatchAlarmTemplateGroupOutput struct { + + // A cloudwatch alarm template group's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateCloudWatchAlarmTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCloudWatchAlarmTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCreateCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCloudWatchAlarmTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateCloudWatchAlarmTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateCloudWatchAlarmTemplateGroup", + } +} diff --git a/service/medialive/api_op_CreateEventBridgeRuleTemplate.go b/service/medialive/api_op_CreateEventBridgeRuleTemplate.go new file mode 100644 index 00000000000..2ce90d172e3 --- /dev/null +++ b/service/medialive/api_op_CreateEventBridgeRuleTemplate.go @@ -0,0 +1,191 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an eventbridge rule template to monitor events and send notifications +// to your targeted resources. +func (c *Client) CreateEventBridgeRuleTemplate(ctx context.Context, params *CreateEventBridgeRuleTemplateInput, optFns ...func(*Options)) (*CreateEventBridgeRuleTemplateOutput, error) { + if params == nil { + params = &CreateEventBridgeRuleTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEventBridgeRuleTemplate", params, optFns, c.addOperationCreateEventBridgeRuleTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEventBridgeRuleTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for CreateEventBridgeRuleTemplateRequest +type CreateEventBridgeRuleTemplateInput struct { + + // The type of event to match with the rule. + // + // This member is required. + EventType types.EventBridgeRuleTemplateEventType + + // An eventbridge rule template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + GroupIdentifier *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // A resource's optional description. + Description *string + + // Placeholder documentation for __listOfEventBridgeRuleTemplateTarget + EventTargets []types.EventBridgeRuleTemplateTarget + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Placeholder documentation for CreateEventBridgeRuleTemplateResponse +type CreateEventBridgeRuleTemplateOutput struct { + + // An eventbridge rule template's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // Placeholder documentation for __listOfEventBridgeRuleTemplateTarget + EventTargets []types.EventBridgeRuleTemplateTarget + + // The type of event to match with the rule. + EventType types.EventBridgeRuleTemplateEventType + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + GroupId *string + + // An eventbridge rule template's id. AWS provided templates have ids that start + // with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEventBridgeRuleTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEventBridgeRuleTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCreateEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEventBridgeRuleTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateEventBridgeRuleTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateEventBridgeRuleTemplate", + } +} diff --git a/service/medialive/api_op_CreateEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_CreateEventBridgeRuleTemplateGroup.go new file mode 100644 index 00000000000..c61bc93a269 --- /dev/null +++ b/service/medialive/api_op_CreateEventBridgeRuleTemplateGroup.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates an eventbridge rule template group to group your eventbridge rule +// templates and to attach to signal maps for dynamically creating notification +// rules. +func (c *Client) CreateEventBridgeRuleTemplateGroup(ctx context.Context, params *CreateEventBridgeRuleTemplateGroupInput, optFns ...func(*Options)) (*CreateEventBridgeRuleTemplateGroupOutput, error) { + if params == nil { + params = &CreateEventBridgeRuleTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateEventBridgeRuleTemplateGroup", params, optFns, c.addOperationCreateEventBridgeRuleTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateEventBridgeRuleTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for CreateEventBridgeRuleTemplateGroupRequest +type CreateEventBridgeRuleTemplateGroupInput struct { + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // A resource's optional description. + Description *string + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Placeholder documentation for CreateEventBridgeRuleTemplateGroupResponse +type CreateEventBridgeRuleTemplateGroupOutput struct { + + // An eventbridge rule template group's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateEventBridgeRuleTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateEventBridgeRuleTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCreateEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateEventBridgeRuleTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateEventBridgeRuleTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateEventBridgeRuleTemplateGroup", + } +} diff --git a/service/medialive/api_op_CreateSignalMap.go b/service/medialive/api_op_CreateSignalMap.go new file mode 100644 index 00000000000..978a8db2021 --- /dev/null +++ b/service/medialive/api_op_CreateSignalMap.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Initiates the creation of a new signal map. Will discover a new +// mediaResourceMap based on the provided discoveryEntryPointArn. +func (c *Client) CreateSignalMap(ctx context.Context, params *CreateSignalMapInput, optFns ...func(*Options)) (*CreateSignalMapOutput, error) { + if params == nil { + params = &CreateSignalMapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateSignalMap", params, optFns, c.addOperationCreateSignalMapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateSignalMapOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for CreateSignalMapRequest +type CreateSignalMapInput struct { + + // A top-level supported AWS resource ARN to discovery a signal map from. + // + // This member is required. + DiscoveryEntryPointArn *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // Placeholder documentation for __listOf__stringPatternS + CloudWatchAlarmTemplateGroupIdentifiers []string + + // A resource's optional description. + Description *string + + // Placeholder documentation for __listOf__stringPatternS + EventBridgeRuleTemplateGroupIdentifiers []string + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Placeholder documentation for CreateSignalMapResponse +type CreateSignalMapOutput struct { + + // A signal map's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + CloudWatchAlarmTemplateGroupIds []string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A top-level supported AWS resource ARN to discovery a signal map from. + DiscoveryEntryPointArn *string + + // Error message associated with a failed creation or failed update attempt of a + // signal map. + ErrorMessage *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + EventBridgeRuleTemplateGroupIds []string + + // A map representing an incomplete AWS media workflow as a graph. + FailedMediaResourceMap map[string]types.MediaResource + + // A signal map's id. + Id *string + + // Placeholder documentation for __timestampIso8601 + LastDiscoveredAt *time.Time + + // Represents the latest successful monitor deployment of a signal map. + LastSuccessfulMonitorDeployment *types.SuccessfulMonitorDeployment + + // A map representing an AWS media workflow as a graph. + MediaResourceMap map[string]types.MediaResource + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // If true, there are pending monitor changes for this signal map that can be + // deployed. + MonitorChangesPendingDeployment *bool + + // Represents the latest monitor deployment of a signal map. + MonitorDeployment *types.MonitorDeployment + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // A signal map's current status which is dependent on its lifecycle actions or + // associated jobs. + Status types.SignalMapStatus + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateSignalMapMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSignalMap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSignalMap{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSignalMap"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpCreateSignalMapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSignalMap(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateSignalMap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateSignalMap", + } +} diff --git a/service/medialive/api_op_DeleteCloudWatchAlarmTemplate.go b/service/medialive/api_op_DeleteCloudWatchAlarmTemplate.go new file mode 100644 index 00000000000..0efafcd5960 --- /dev/null +++ b/service/medialive/api_op_DeleteCloudWatchAlarmTemplate.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a cloudwatch alarm template. +func (c *Client) DeleteCloudWatchAlarmTemplate(ctx context.Context, params *DeleteCloudWatchAlarmTemplateInput, optFns ...func(*Options)) (*DeleteCloudWatchAlarmTemplateOutput, error) { + if params == nil { + params = &DeleteCloudWatchAlarmTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCloudWatchAlarmTemplate", params, optFns, c.addOperationDeleteCloudWatchAlarmTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCloudWatchAlarmTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for DeleteCloudWatchAlarmTemplateRequest +type DeleteCloudWatchAlarmTemplateInput struct { + + // A cloudwatch alarm template's identifier. Can be either be its id or current + // name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteCloudWatchAlarmTemplateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCloudWatchAlarmTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCloudWatchAlarmTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCloudWatchAlarmTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCloudWatchAlarmTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteCloudWatchAlarmTemplate", + } +} diff --git a/service/medialive/api_op_DeleteCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_DeleteCloudWatchAlarmTemplateGroup.go new file mode 100644 index 00000000000..eca265eb814 --- /dev/null +++ b/service/medialive/api_op_DeleteCloudWatchAlarmTemplateGroup.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a cloudwatch alarm template group. You must detach this group from all +// signal maps and ensure its existing templates are moved to another group or +// deleted. +func (c *Client) DeleteCloudWatchAlarmTemplateGroup(ctx context.Context, params *DeleteCloudWatchAlarmTemplateGroupInput, optFns ...func(*Options)) (*DeleteCloudWatchAlarmTemplateGroupOutput, error) { + if params == nil { + params = &DeleteCloudWatchAlarmTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteCloudWatchAlarmTemplateGroup", params, optFns, c.addOperationDeleteCloudWatchAlarmTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteCloudWatchAlarmTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for DeleteCloudWatchAlarmTemplateGroupRequest +type DeleteCloudWatchAlarmTemplateGroupInput struct { + + // A cloudwatch alarm template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteCloudWatchAlarmTemplateGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteCloudWatchAlarmTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCloudWatchAlarmTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCloudWatchAlarmTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteCloudWatchAlarmTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteCloudWatchAlarmTemplateGroup", + } +} diff --git a/service/medialive/api_op_DeleteEventBridgeRuleTemplate.go b/service/medialive/api_op_DeleteEventBridgeRuleTemplate.go new file mode 100644 index 00000000000..f340fa0d311 --- /dev/null +++ b/service/medialive/api_op_DeleteEventBridgeRuleTemplate.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an eventbridge rule template. +func (c *Client) DeleteEventBridgeRuleTemplate(ctx context.Context, params *DeleteEventBridgeRuleTemplateInput, optFns ...func(*Options)) (*DeleteEventBridgeRuleTemplateOutput, error) { + if params == nil { + params = &DeleteEventBridgeRuleTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteEventBridgeRuleTemplate", params, optFns, c.addOperationDeleteEventBridgeRuleTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteEventBridgeRuleTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for DeleteEventBridgeRuleTemplateRequest +type DeleteEventBridgeRuleTemplateInput struct { + + // An eventbridge rule template's identifier. Can be either be its id or current + // name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteEventBridgeRuleTemplateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteEventBridgeRuleTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteEventBridgeRuleTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEventBridgeRuleTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteEventBridgeRuleTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteEventBridgeRuleTemplate", + } +} diff --git a/service/medialive/api_op_DeleteEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_DeleteEventBridgeRuleTemplateGroup.go new file mode 100644 index 00000000000..b9f5b597641 --- /dev/null +++ b/service/medialive/api_op_DeleteEventBridgeRuleTemplateGroup.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an eventbridge rule template group. You must detach this group from all +// signal maps and ensure its existing templates are moved to another group or +// deleted. +func (c *Client) DeleteEventBridgeRuleTemplateGroup(ctx context.Context, params *DeleteEventBridgeRuleTemplateGroupInput, optFns ...func(*Options)) (*DeleteEventBridgeRuleTemplateGroupOutput, error) { + if params == nil { + params = &DeleteEventBridgeRuleTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteEventBridgeRuleTemplateGroup", params, optFns, c.addOperationDeleteEventBridgeRuleTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteEventBridgeRuleTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for DeleteEventBridgeRuleTemplateGroupRequest +type DeleteEventBridgeRuleTemplateGroupInput struct { + + // An eventbridge rule template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteEventBridgeRuleTemplateGroupOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteEventBridgeRuleTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteEventBridgeRuleTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEventBridgeRuleTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteEventBridgeRuleTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteEventBridgeRuleTemplateGroup", + } +} diff --git a/service/medialive/api_op_DeleteSignalMap.go b/service/medialive/api_op_DeleteSignalMap.go new file mode 100644 index 00000000000..b8b4761cbe0 --- /dev/null +++ b/service/medialive/api_op_DeleteSignalMap.go @@ -0,0 +1,132 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified signal map. +func (c *Client) DeleteSignalMap(ctx context.Context, params *DeleteSignalMapInput, optFns ...func(*Options)) (*DeleteSignalMapOutput, error) { + if params == nil { + params = &DeleteSignalMapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSignalMap", params, optFns, c.addOperationDeleteSignalMapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSignalMapOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for DeleteSignalMapRequest +type DeleteSignalMapInput struct { + + // A signal map's identifier. Can be either be its id or current name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +type DeleteSignalMapOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSignalMapMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteSignalMap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteSignalMap{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSignalMap"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteSignalMapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSignalMap(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSignalMap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSignalMap", + } +} diff --git a/service/medialive/api_op_GetCloudWatchAlarmTemplate.go b/service/medialive/api_op_GetCloudWatchAlarmTemplate.go new file mode 100644 index 00000000000..afeada7bb50 --- /dev/null +++ b/service/medialive/api_op_GetCloudWatchAlarmTemplate.go @@ -0,0 +1,196 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the specified cloudwatch alarm template. +func (c *Client) GetCloudWatchAlarmTemplate(ctx context.Context, params *GetCloudWatchAlarmTemplateInput, optFns ...func(*Options)) (*GetCloudWatchAlarmTemplateOutput, error) { + if params == nil { + params = &GetCloudWatchAlarmTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCloudWatchAlarmTemplate", params, optFns, c.addOperationGetCloudWatchAlarmTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCloudWatchAlarmTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for GetCloudWatchAlarmTemplateRequest +type GetCloudWatchAlarmTemplateInput struct { + + // A cloudwatch alarm template's identifier. Can be either be its id or current + // name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for GetCloudWatchAlarmTemplateResponse +type GetCloudWatchAlarmTemplateOutput struct { + + // A cloudwatch alarm template's ARN (Amazon Resource Name) + Arn *string + + // The comparison operator used to compare the specified statistic and the + // threshold. + ComparisonOperator types.CloudWatchAlarmTemplateComparisonOperator + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // The number of datapoints within the evaluation period that must be breaching to + // trigger the alarm. + DatapointsToAlarm *int32 + + // A resource's optional description. + Description *string + + // The number of periods over which data is compared to the specified threshold. + EvaluationPeriods *int32 + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + GroupId *string + + // A cloudwatch alarm template's id. AWS provided templates have ids that start + // with aws- + Id *string + + // The name of the metric associated with the alarm. Must be compatible with + // targetResourceType. + MetricName *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // The period, in seconds, over which the specified statistic is applied. + Period *int32 + + // The statistic to apply to the alarm's metric data. + Statistic types.CloudWatchAlarmTemplateStatistic + + // Represents the tags associated with a resource. + Tags map[string]string + + // The resource type this template should dynamically generate cloudwatch metric + // alarms for. + TargetResourceType types.CloudWatchAlarmTemplateTargetResourceType + + // The threshold value to compare with the specified statistic. + Threshold *float64 + + // Specifies how missing data points are treated when evaluating the alarm's + // condition. + TreatMissingData types.CloudWatchAlarmTemplateTreatMissingData + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCloudWatchAlarmTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCloudWatchAlarmTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCloudWatchAlarmTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCloudWatchAlarmTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCloudWatchAlarmTemplate", + } +} diff --git a/service/medialive/api_op_GetCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_GetCloudWatchAlarmTemplateGroup.go new file mode 100644 index 00000000000..5e15946eb18 --- /dev/null +++ b/service/medialive/api_op_GetCloudWatchAlarmTemplateGroup.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the specified cloudwatch alarm template group. +func (c *Client) GetCloudWatchAlarmTemplateGroup(ctx context.Context, params *GetCloudWatchAlarmTemplateGroupInput, optFns ...func(*Options)) (*GetCloudWatchAlarmTemplateGroupOutput, error) { + if params == nil { + params = &GetCloudWatchAlarmTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetCloudWatchAlarmTemplateGroup", params, optFns, c.addOperationGetCloudWatchAlarmTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetCloudWatchAlarmTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for GetCloudWatchAlarmTemplateGroupRequest +type GetCloudWatchAlarmTemplateGroupInput struct { + + // A cloudwatch alarm template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for GetCloudWatchAlarmTemplateGroupResponse +type GetCloudWatchAlarmTemplateGroupOutput struct { + + // A cloudwatch alarm template group's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetCloudWatchAlarmTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetCloudWatchAlarmTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCloudWatchAlarmTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetCloudWatchAlarmTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetCloudWatchAlarmTemplateGroup", + } +} diff --git a/service/medialive/api_op_GetEventBridgeRuleTemplate.go b/service/medialive/api_op_GetEventBridgeRuleTemplate.go new file mode 100644 index 00000000000..026f47e5b70 --- /dev/null +++ b/service/medialive/api_op_GetEventBridgeRuleTemplate.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the specified eventbridge rule template. +func (c *Client) GetEventBridgeRuleTemplate(ctx context.Context, params *GetEventBridgeRuleTemplateInput, optFns ...func(*Options)) (*GetEventBridgeRuleTemplateOutput, error) { + if params == nil { + params = &GetEventBridgeRuleTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEventBridgeRuleTemplate", params, optFns, c.addOperationGetEventBridgeRuleTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEventBridgeRuleTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for GetEventBridgeRuleTemplateRequest +type GetEventBridgeRuleTemplateInput struct { + + // An eventbridge rule template's identifier. Can be either be its id or current + // name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for GetEventBridgeRuleTemplateResponse +type GetEventBridgeRuleTemplateOutput struct { + + // An eventbridge rule template's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // Placeholder documentation for __listOfEventBridgeRuleTemplateTarget + EventTargets []types.EventBridgeRuleTemplateTarget + + // The type of event to match with the rule. + EventType types.EventBridgeRuleTemplateEventType + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + GroupId *string + + // An eventbridge rule template's id. AWS provided templates have ids that start + // with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEventBridgeRuleTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetEventBridgeRuleTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEventBridgeRuleTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEventBridgeRuleTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetEventBridgeRuleTemplate", + } +} diff --git a/service/medialive/api_op_GetEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_GetEventBridgeRuleTemplateGroup.go new file mode 100644 index 00000000000..53b8cb81f12 --- /dev/null +++ b/service/medialive/api_op_GetEventBridgeRuleTemplateGroup.go @@ -0,0 +1,159 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Retrieves the specified eventbridge rule template group. +func (c *Client) GetEventBridgeRuleTemplateGroup(ctx context.Context, params *GetEventBridgeRuleTemplateGroupInput, optFns ...func(*Options)) (*GetEventBridgeRuleTemplateGroupOutput, error) { + if params == nil { + params = &GetEventBridgeRuleTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetEventBridgeRuleTemplateGroup", params, optFns, c.addOperationGetEventBridgeRuleTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetEventBridgeRuleTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for GetEventBridgeRuleTemplateGroupRequest +type GetEventBridgeRuleTemplateGroupInput struct { + + // An eventbridge rule template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for GetEventBridgeRuleTemplateGroupResponse +type GetEventBridgeRuleTemplateGroupOutput struct { + + // An eventbridge rule template group's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetEventBridgeRuleTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetEventBridgeRuleTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetEventBridgeRuleTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opGetEventBridgeRuleTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetEventBridgeRuleTemplateGroup", + } +} diff --git a/service/medialive/api_op_GetSignalMap.go b/service/medialive/api_op_GetSignalMap.go new file mode 100644 index 00000000000..5fa2e0aa22e --- /dev/null +++ b/service/medialive/api_op_GetSignalMap.go @@ -0,0 +1,1100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "github.com/jmespath/go-jmespath" + "time" +) + +// Retrieves the specified signal map. +func (c *Client) GetSignalMap(ctx context.Context, params *GetSignalMapInput, optFns ...func(*Options)) (*GetSignalMapOutput, error) { + if params == nil { + params = &GetSignalMapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSignalMap", params, optFns, c.addOperationGetSignalMapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSignalMapOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for GetSignalMapRequest +type GetSignalMapInput struct { + + // A signal map's identifier. Can be either be its id or current name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for GetSignalMapResponse +type GetSignalMapOutput struct { + + // A signal map's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + CloudWatchAlarmTemplateGroupIds []string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A top-level supported AWS resource ARN to discovery a signal map from. + DiscoveryEntryPointArn *string + + // Error message associated with a failed creation or failed update attempt of a + // signal map. + ErrorMessage *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + EventBridgeRuleTemplateGroupIds []string + + // A map representing an incomplete AWS media workflow as a graph. + FailedMediaResourceMap map[string]types.MediaResource + + // A signal map's id. + Id *string + + // Placeholder documentation for __timestampIso8601 + LastDiscoveredAt *time.Time + + // Represents the latest successful monitor deployment of a signal map. + LastSuccessfulMonitorDeployment *types.SuccessfulMonitorDeployment + + // A map representing an AWS media workflow as a graph. + MediaResourceMap map[string]types.MediaResource + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // If true, there are pending monitor changes for this signal map that can be + // deployed. + MonitorChangesPendingDeployment *bool + + // Represents the latest monitor deployment of a signal map. + MonitorDeployment *types.MonitorDeployment + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // A signal map's current status which is dependent on its lifecycle actions or + // associated jobs. + Status types.SignalMapStatus + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSignalMapMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSignalMap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSignalMap{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "GetSignalMap"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpGetSignalMapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSignalMap(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// GetSignalMapAPIClient is a client that implements the GetSignalMap operation. +type GetSignalMapAPIClient interface { + GetSignalMap(context.Context, *GetSignalMapInput, ...func(*Options)) (*GetSignalMapOutput, error) +} + +var _ GetSignalMapAPIClient = (*Client)(nil) + +// SignalMapCreatedWaiterOptions are waiter options for SignalMapCreatedWaiter +type SignalMapCreatedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // SignalMapCreatedWaiter will use default minimum delay of 5 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, SignalMapCreatedWaiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetSignalMapInput, *GetSignalMapOutput, error) (bool, error) +} + +// SignalMapCreatedWaiter defines the waiters for SignalMapCreated +type SignalMapCreatedWaiter struct { + client GetSignalMapAPIClient + + options SignalMapCreatedWaiterOptions +} + +// NewSignalMapCreatedWaiter constructs a SignalMapCreatedWaiter. +func NewSignalMapCreatedWaiter(client GetSignalMapAPIClient, optFns ...func(*SignalMapCreatedWaiterOptions)) *SignalMapCreatedWaiter { + options := SignalMapCreatedWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = signalMapCreatedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &SignalMapCreatedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for SignalMapCreated waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *SignalMapCreatedWaiter) Wait(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapCreatedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for SignalMapCreated waiter and returns +// the output of the successful operation. The maxWaitDur is the maximum wait +// duration the waiter will wait. The maxWaitDur is required and must be greater +// than zero. +func (w *SignalMapCreatedWaiter) WaitForOutput(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapCreatedWaiterOptions)) (*GetSignalMapOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for SignalMapCreated waiter") +} + +func signalMapCreatedStateRetryable(ctx context.Context, input *GetSignalMapInput, output *GetSignalMapOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CREATE_COMPLETE" + value, ok := pathValue.(types.SignalMapStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CREATE_IN_PROGRESS" + value, ok := pathValue.(types.SignalMapStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CREATE_FAILED" + value, ok := pathValue.(types.SignalMapStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + return true, nil +} + +// SignalMapMonitorDeletedWaiterOptions are waiter options for +// SignalMapMonitorDeletedWaiter +type SignalMapMonitorDeletedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // SignalMapMonitorDeletedWaiter will use default minimum delay of 5 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, SignalMapMonitorDeletedWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetSignalMapInput, *GetSignalMapOutput, error) (bool, error) +} + +// SignalMapMonitorDeletedWaiter defines the waiters for SignalMapMonitorDeleted +type SignalMapMonitorDeletedWaiter struct { + client GetSignalMapAPIClient + + options SignalMapMonitorDeletedWaiterOptions +} + +// NewSignalMapMonitorDeletedWaiter constructs a SignalMapMonitorDeletedWaiter. +func NewSignalMapMonitorDeletedWaiter(client GetSignalMapAPIClient, optFns ...func(*SignalMapMonitorDeletedWaiterOptions)) *SignalMapMonitorDeletedWaiter { + options := SignalMapMonitorDeletedWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = signalMapMonitorDeletedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &SignalMapMonitorDeletedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for SignalMapMonitorDeleted waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *SignalMapMonitorDeletedWaiter) Wait(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapMonitorDeletedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for SignalMapMonitorDeleted waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *SignalMapMonitorDeletedWaiter) WaitForOutput(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapMonitorDeletedWaiterOptions)) (*GetSignalMapOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for SignalMapMonitorDeleted waiter") +} + +func signalMapMonitorDeletedStateRetryable(ctx context.Context, input *GetSignalMapInput, output *GetSignalMapOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DELETE_COMPLETE" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DELETE_IN_PROGRESS" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DELETE_FAILED" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + return true, nil +} + +// SignalMapMonitorDeployedWaiterOptions are waiter options for +// SignalMapMonitorDeployedWaiter +type SignalMapMonitorDeployedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // SignalMapMonitorDeployedWaiter will use default minimum delay of 5 seconds. Note + // that MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, SignalMapMonitorDeployedWaiter will use default max delay of 120 + // seconds. Note that MaxDelay must resolve to value greater than or equal to the + // MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetSignalMapInput, *GetSignalMapOutput, error) (bool, error) +} + +// SignalMapMonitorDeployedWaiter defines the waiters for SignalMapMonitorDeployed +type SignalMapMonitorDeployedWaiter struct { + client GetSignalMapAPIClient + + options SignalMapMonitorDeployedWaiterOptions +} + +// NewSignalMapMonitorDeployedWaiter constructs a SignalMapMonitorDeployedWaiter. +func NewSignalMapMonitorDeployedWaiter(client GetSignalMapAPIClient, optFns ...func(*SignalMapMonitorDeployedWaiterOptions)) *SignalMapMonitorDeployedWaiter { + options := SignalMapMonitorDeployedWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = signalMapMonitorDeployedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &SignalMapMonitorDeployedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for SignalMapMonitorDeployed waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *SignalMapMonitorDeployedWaiter) Wait(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapMonitorDeployedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for SignalMapMonitorDeployed waiter and +// returns the output of the successful operation. The maxWaitDur is the maximum +// wait duration the waiter will wait. The maxWaitDur is required and must be +// greater than zero. +func (w *SignalMapMonitorDeployedWaiter) WaitForOutput(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapMonitorDeployedWaiterOptions)) (*GetSignalMapOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for SignalMapMonitorDeployed waiter") +} + +func signalMapMonitorDeployedStateRetryable(ctx context.Context, input *GetSignalMapInput, output *GetSignalMapOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DRY_RUN_DEPLOYMENT_COMPLETE" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DEPLOYMENT_COMPLETE" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DRY_RUN_DEPLOYMENT_IN_PROGRESS" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DEPLOYMENT_IN_PROGRESS" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DRY_RUN_DEPLOYMENT_FAILED" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + pathValue, err := jmespath.Search("MonitorDeployment.Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DEPLOYMENT_FAILED" + value, ok := pathValue.(types.SignalMapMonitorDeploymentStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapMonitorDeploymentStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + return true, nil +} + +// SignalMapUpdatedWaiterOptions are waiter options for SignalMapUpdatedWaiter +type SignalMapUpdatedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + // + // Passing options here is functionally equivalent to passing values to this + // config's ClientOptions field that extend the inner client's APIOptions directly. + APIOptions []func(*middleware.Stack) error + + // Functional options to be passed to all operations invoked by this client. + // + // Function values that modify the inner APIOptions are applied after the waiter + // config's own APIOptions modifiers. + ClientOptions []func(*Options) + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // SignalMapUpdatedWaiter will use default minimum delay of 5 seconds. Note that + // MinDelay must resolve to a value lesser than or equal to the MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, SignalMapUpdatedWaiter will use default max delay of 120 seconds. + // Note that MaxDelay must resolve to value greater than or equal to the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetSignalMapInput, *GetSignalMapOutput, error) (bool, error) +} + +// SignalMapUpdatedWaiter defines the waiters for SignalMapUpdated +type SignalMapUpdatedWaiter struct { + client GetSignalMapAPIClient + + options SignalMapUpdatedWaiterOptions +} + +// NewSignalMapUpdatedWaiter constructs a SignalMapUpdatedWaiter. +func NewSignalMapUpdatedWaiter(client GetSignalMapAPIClient, optFns ...func(*SignalMapUpdatedWaiterOptions)) *SignalMapUpdatedWaiter { + options := SignalMapUpdatedWaiterOptions{} + options.MinDelay = 5 * time.Second + options.MaxDelay = 120 * time.Second + options.Retryable = signalMapUpdatedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &SignalMapUpdatedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for SignalMapUpdated waiter. The maxWaitDur is +// the maximum wait duration the waiter will wait. The maxWaitDur is required and +// must be greater than zero. +func (w *SignalMapUpdatedWaiter) Wait(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapUpdatedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for SignalMapUpdated waiter and returns +// the output of the successful operation. The maxWaitDur is the maximum wait +// duration the waiter will wait. The maxWaitDur is required and must be greater +// than zero. +func (w *SignalMapUpdatedWaiter) WaitForOutput(ctx context.Context, params *GetSignalMapInput, maxWaitDur time.Duration, optFns ...func(*SignalMapUpdatedWaiterOptions)) (*GetSignalMapOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 120 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetSignalMap(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + for _, opt := range options.ClientOptions { + opt(o) + } + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for SignalMapUpdated waiter") +} + +func signalMapUpdatedStateRetryable(ctx context.Context, input *GetSignalMapInput, output *GetSignalMapOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "UPDATE_COMPLETE" + value, ok := pathValue.(types.SignalMapStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "UPDATE_IN_PROGRESS" + value, ok := pathValue.(types.SignalMapStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "UPDATE_FAILED" + value, ok := pathValue.(types.SignalMapStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + if err == nil { + pathValue, err := jmespath.Search("Status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "UPDATE_REVERTED" + value, ok := pathValue.(types.SignalMapStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.SignalMapStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetSignalMap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSignalMap", + } +} diff --git a/service/medialive/api_op_ListCloudWatchAlarmTemplateGroups.go b/service/medialive/api_op_ListCloudWatchAlarmTemplateGroups.go new file mode 100644 index 00000000000..c30cf9c3413 --- /dev/null +++ b/service/medialive/api_op_ListCloudWatchAlarmTemplateGroups.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists cloudwatch alarm template groups. +func (c *Client) ListCloudWatchAlarmTemplateGroups(ctx context.Context, params *ListCloudWatchAlarmTemplateGroupsInput, optFns ...func(*Options)) (*ListCloudWatchAlarmTemplateGroupsOutput, error) { + if params == nil { + params = &ListCloudWatchAlarmTemplateGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCloudWatchAlarmTemplateGroups", params, optFns, c.addOperationListCloudWatchAlarmTemplateGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCloudWatchAlarmTemplateGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for ListCloudWatchAlarmTemplateGroupsRequest +type ListCloudWatchAlarmTemplateGroupsInput struct { + + // Placeholder documentation for MaxResults + MaxResults *int32 + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // Represents the scope of a resource, with options for all scopes, AWS provided + // resources, or local resources. + Scope *string + + // A signal map's identifier. Can be either be its id or current name. + SignalMapIdentifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for ListCloudWatchAlarmTemplateGroupsResponse +type ListCloudWatchAlarmTemplateGroupsOutput struct { + + // Placeholder documentation for __listOfCloudWatchAlarmTemplateGroupSummary + CloudWatchAlarmTemplateGroups []types.CloudWatchAlarmTemplateGroupSummary + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCloudWatchAlarmTemplateGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCloudWatchAlarmTemplateGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCloudWatchAlarmTemplateGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCloudWatchAlarmTemplateGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCloudWatchAlarmTemplateGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListCloudWatchAlarmTemplateGroupsAPIClient is a client that implements the +// ListCloudWatchAlarmTemplateGroups operation. +type ListCloudWatchAlarmTemplateGroupsAPIClient interface { + ListCloudWatchAlarmTemplateGroups(context.Context, *ListCloudWatchAlarmTemplateGroupsInput, ...func(*Options)) (*ListCloudWatchAlarmTemplateGroupsOutput, error) +} + +var _ ListCloudWatchAlarmTemplateGroupsAPIClient = (*Client)(nil) + +// ListCloudWatchAlarmTemplateGroupsPaginatorOptions is the paginator options for +// ListCloudWatchAlarmTemplateGroups +type ListCloudWatchAlarmTemplateGroupsPaginatorOptions struct { + // Placeholder documentation for MaxResults + 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 +} + +// ListCloudWatchAlarmTemplateGroupsPaginator is a paginator for +// ListCloudWatchAlarmTemplateGroups +type ListCloudWatchAlarmTemplateGroupsPaginator struct { + options ListCloudWatchAlarmTemplateGroupsPaginatorOptions + client ListCloudWatchAlarmTemplateGroupsAPIClient + params *ListCloudWatchAlarmTemplateGroupsInput + nextToken *string + firstPage bool +} + +// NewListCloudWatchAlarmTemplateGroupsPaginator returns a new +// ListCloudWatchAlarmTemplateGroupsPaginator +func NewListCloudWatchAlarmTemplateGroupsPaginator(client ListCloudWatchAlarmTemplateGroupsAPIClient, params *ListCloudWatchAlarmTemplateGroupsInput, optFns ...func(*ListCloudWatchAlarmTemplateGroupsPaginatorOptions)) *ListCloudWatchAlarmTemplateGroupsPaginator { + if params == nil { + params = &ListCloudWatchAlarmTemplateGroupsInput{} + } + + options := ListCloudWatchAlarmTemplateGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCloudWatchAlarmTemplateGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCloudWatchAlarmTemplateGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCloudWatchAlarmTemplateGroups page. +func (p *ListCloudWatchAlarmTemplateGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCloudWatchAlarmTemplateGroupsOutput, 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.ListCloudWatchAlarmTemplateGroups(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_opListCloudWatchAlarmTemplateGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCloudWatchAlarmTemplateGroups", + } +} diff --git a/service/medialive/api_op_ListCloudWatchAlarmTemplates.go b/service/medialive/api_op_ListCloudWatchAlarmTemplates.go new file mode 100644 index 00000000000..34ef1f7a1a8 --- /dev/null +++ b/service/medialive/api_op_ListCloudWatchAlarmTemplates.go @@ -0,0 +1,243 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists cloudwatch alarm templates. +func (c *Client) ListCloudWatchAlarmTemplates(ctx context.Context, params *ListCloudWatchAlarmTemplatesInput, optFns ...func(*Options)) (*ListCloudWatchAlarmTemplatesOutput, error) { + if params == nil { + params = &ListCloudWatchAlarmTemplatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListCloudWatchAlarmTemplates", params, optFns, c.addOperationListCloudWatchAlarmTemplatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListCloudWatchAlarmTemplatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for ListCloudWatchAlarmTemplatesRequest +type ListCloudWatchAlarmTemplatesInput struct { + + // A cloudwatch alarm template group's identifier. Can be either be its id or + // current name. + GroupIdentifier *string + + // Placeholder documentation for MaxResults + MaxResults *int32 + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // Represents the scope of a resource, with options for all scopes, AWS provided + // resources, or local resources. + Scope *string + + // A signal map's identifier. Can be either be its id or current name. + SignalMapIdentifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for ListCloudWatchAlarmTemplatesResponse +type ListCloudWatchAlarmTemplatesOutput struct { + + // Placeholder documentation for __listOfCloudWatchAlarmTemplateSummary + CloudWatchAlarmTemplates []types.CloudWatchAlarmTemplateSummary + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListCloudWatchAlarmTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListCloudWatchAlarmTemplates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListCloudWatchAlarmTemplates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListCloudWatchAlarmTemplates"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCloudWatchAlarmTemplates(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListCloudWatchAlarmTemplatesAPIClient is a client that implements the +// ListCloudWatchAlarmTemplates operation. +type ListCloudWatchAlarmTemplatesAPIClient interface { + ListCloudWatchAlarmTemplates(context.Context, *ListCloudWatchAlarmTemplatesInput, ...func(*Options)) (*ListCloudWatchAlarmTemplatesOutput, error) +} + +var _ ListCloudWatchAlarmTemplatesAPIClient = (*Client)(nil) + +// ListCloudWatchAlarmTemplatesPaginatorOptions is the paginator options for +// ListCloudWatchAlarmTemplates +type ListCloudWatchAlarmTemplatesPaginatorOptions struct { + // Placeholder documentation for MaxResults + 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 +} + +// ListCloudWatchAlarmTemplatesPaginator is a paginator for +// ListCloudWatchAlarmTemplates +type ListCloudWatchAlarmTemplatesPaginator struct { + options ListCloudWatchAlarmTemplatesPaginatorOptions + client ListCloudWatchAlarmTemplatesAPIClient + params *ListCloudWatchAlarmTemplatesInput + nextToken *string + firstPage bool +} + +// NewListCloudWatchAlarmTemplatesPaginator returns a new +// ListCloudWatchAlarmTemplatesPaginator +func NewListCloudWatchAlarmTemplatesPaginator(client ListCloudWatchAlarmTemplatesAPIClient, params *ListCloudWatchAlarmTemplatesInput, optFns ...func(*ListCloudWatchAlarmTemplatesPaginatorOptions)) *ListCloudWatchAlarmTemplatesPaginator { + if params == nil { + params = &ListCloudWatchAlarmTemplatesInput{} + } + + options := ListCloudWatchAlarmTemplatesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListCloudWatchAlarmTemplatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListCloudWatchAlarmTemplatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListCloudWatchAlarmTemplates page. +func (p *ListCloudWatchAlarmTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCloudWatchAlarmTemplatesOutput, 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.ListCloudWatchAlarmTemplates(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_opListCloudWatchAlarmTemplates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListCloudWatchAlarmTemplates", + } +} diff --git a/service/medialive/api_op_ListEventBridgeRuleTemplateGroups.go b/service/medialive/api_op_ListEventBridgeRuleTemplateGroups.go new file mode 100644 index 00000000000..4c81ae8ba22 --- /dev/null +++ b/service/medialive/api_op_ListEventBridgeRuleTemplateGroups.go @@ -0,0 +1,235 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists eventbridge rule template groups. +func (c *Client) ListEventBridgeRuleTemplateGroups(ctx context.Context, params *ListEventBridgeRuleTemplateGroupsInput, optFns ...func(*Options)) (*ListEventBridgeRuleTemplateGroupsOutput, error) { + if params == nil { + params = &ListEventBridgeRuleTemplateGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEventBridgeRuleTemplateGroups", params, optFns, c.addOperationListEventBridgeRuleTemplateGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEventBridgeRuleTemplateGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for ListEventBridgeRuleTemplateGroupsRequest +type ListEventBridgeRuleTemplateGroupsInput struct { + + // Placeholder documentation for MaxResults + MaxResults *int32 + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // A signal map's identifier. Can be either be its id or current name. + SignalMapIdentifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for ListEventBridgeRuleTemplateGroupsResponse +type ListEventBridgeRuleTemplateGroupsOutput struct { + + // Placeholder documentation for __listOfEventBridgeRuleTemplateGroupSummary + EventBridgeRuleTemplateGroups []types.EventBridgeRuleTemplateGroupSummary + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEventBridgeRuleTemplateGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListEventBridgeRuleTemplateGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEventBridgeRuleTemplateGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEventBridgeRuleTemplateGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventBridgeRuleTemplateGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListEventBridgeRuleTemplateGroupsAPIClient is a client that implements the +// ListEventBridgeRuleTemplateGroups operation. +type ListEventBridgeRuleTemplateGroupsAPIClient interface { + ListEventBridgeRuleTemplateGroups(context.Context, *ListEventBridgeRuleTemplateGroupsInput, ...func(*Options)) (*ListEventBridgeRuleTemplateGroupsOutput, error) +} + +var _ ListEventBridgeRuleTemplateGroupsAPIClient = (*Client)(nil) + +// ListEventBridgeRuleTemplateGroupsPaginatorOptions is the paginator options for +// ListEventBridgeRuleTemplateGroups +type ListEventBridgeRuleTemplateGroupsPaginatorOptions struct { + // Placeholder documentation for MaxResults + 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 +} + +// ListEventBridgeRuleTemplateGroupsPaginator is a paginator for +// ListEventBridgeRuleTemplateGroups +type ListEventBridgeRuleTemplateGroupsPaginator struct { + options ListEventBridgeRuleTemplateGroupsPaginatorOptions + client ListEventBridgeRuleTemplateGroupsAPIClient + params *ListEventBridgeRuleTemplateGroupsInput + nextToken *string + firstPage bool +} + +// NewListEventBridgeRuleTemplateGroupsPaginator returns a new +// ListEventBridgeRuleTemplateGroupsPaginator +func NewListEventBridgeRuleTemplateGroupsPaginator(client ListEventBridgeRuleTemplateGroupsAPIClient, params *ListEventBridgeRuleTemplateGroupsInput, optFns ...func(*ListEventBridgeRuleTemplateGroupsPaginatorOptions)) *ListEventBridgeRuleTemplateGroupsPaginator { + if params == nil { + params = &ListEventBridgeRuleTemplateGroupsInput{} + } + + options := ListEventBridgeRuleTemplateGroupsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEventBridgeRuleTemplateGroupsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEventBridgeRuleTemplateGroupsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEventBridgeRuleTemplateGroups page. +func (p *ListEventBridgeRuleTemplateGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEventBridgeRuleTemplateGroupsOutput, 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.ListEventBridgeRuleTemplateGroups(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_opListEventBridgeRuleTemplateGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEventBridgeRuleTemplateGroups", + } +} diff --git a/service/medialive/api_op_ListEventBridgeRuleTemplates.go b/service/medialive/api_op_ListEventBridgeRuleTemplates.go new file mode 100644 index 00000000000..6f2c84ad25a --- /dev/null +++ b/service/medialive/api_op_ListEventBridgeRuleTemplates.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists eventbridge rule templates. +func (c *Client) ListEventBridgeRuleTemplates(ctx context.Context, params *ListEventBridgeRuleTemplatesInput, optFns ...func(*Options)) (*ListEventBridgeRuleTemplatesOutput, error) { + if params == nil { + params = &ListEventBridgeRuleTemplatesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListEventBridgeRuleTemplates", params, optFns, c.addOperationListEventBridgeRuleTemplatesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListEventBridgeRuleTemplatesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for ListEventBridgeRuleTemplatesRequest +type ListEventBridgeRuleTemplatesInput struct { + + // An eventbridge rule template group's identifier. Can be either be its id or + // current name. + GroupIdentifier *string + + // Placeholder documentation for MaxResults + MaxResults *int32 + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // A signal map's identifier. Can be either be its id or current name. + SignalMapIdentifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for ListEventBridgeRuleTemplatesResponse +type ListEventBridgeRuleTemplatesOutput struct { + + // Placeholder documentation for __listOfEventBridgeRuleTemplateSummary + EventBridgeRuleTemplates []types.EventBridgeRuleTemplateSummary + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListEventBridgeRuleTemplatesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListEventBridgeRuleTemplates{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEventBridgeRuleTemplates{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListEventBridgeRuleTemplates"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEventBridgeRuleTemplates(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListEventBridgeRuleTemplatesAPIClient is a client that implements the +// ListEventBridgeRuleTemplates operation. +type ListEventBridgeRuleTemplatesAPIClient interface { + ListEventBridgeRuleTemplates(context.Context, *ListEventBridgeRuleTemplatesInput, ...func(*Options)) (*ListEventBridgeRuleTemplatesOutput, error) +} + +var _ ListEventBridgeRuleTemplatesAPIClient = (*Client)(nil) + +// ListEventBridgeRuleTemplatesPaginatorOptions is the paginator options for +// ListEventBridgeRuleTemplates +type ListEventBridgeRuleTemplatesPaginatorOptions struct { + // Placeholder documentation for MaxResults + 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 +} + +// ListEventBridgeRuleTemplatesPaginator is a paginator for +// ListEventBridgeRuleTemplates +type ListEventBridgeRuleTemplatesPaginator struct { + options ListEventBridgeRuleTemplatesPaginatorOptions + client ListEventBridgeRuleTemplatesAPIClient + params *ListEventBridgeRuleTemplatesInput + nextToken *string + firstPage bool +} + +// NewListEventBridgeRuleTemplatesPaginator returns a new +// ListEventBridgeRuleTemplatesPaginator +func NewListEventBridgeRuleTemplatesPaginator(client ListEventBridgeRuleTemplatesAPIClient, params *ListEventBridgeRuleTemplatesInput, optFns ...func(*ListEventBridgeRuleTemplatesPaginatorOptions)) *ListEventBridgeRuleTemplatesPaginator { + if params == nil { + params = &ListEventBridgeRuleTemplatesInput{} + } + + options := ListEventBridgeRuleTemplatesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListEventBridgeRuleTemplatesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListEventBridgeRuleTemplatesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListEventBridgeRuleTemplates page. +func (p *ListEventBridgeRuleTemplatesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEventBridgeRuleTemplatesOutput, 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.ListEventBridgeRuleTemplates(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_opListEventBridgeRuleTemplates(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListEventBridgeRuleTemplates", + } +} diff --git a/service/medialive/api_op_ListSignalMaps.go b/service/medialive/api_op_ListSignalMaps.go new file mode 100644 index 00000000000..6abd5bcace3 --- /dev/null +++ b/service/medialive/api_op_ListSignalMaps.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists signal maps. +func (c *Client) ListSignalMaps(ctx context.Context, params *ListSignalMapsInput, optFns ...func(*Options)) (*ListSignalMapsOutput, error) { + if params == nil { + params = &ListSignalMapsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListSignalMaps", params, optFns, c.addOperationListSignalMapsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSignalMapsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for ListSignalMapsRequest +type ListSignalMapsInput struct { + + // A cloudwatch alarm template group's identifier. Can be either be its id or + // current name. + CloudWatchAlarmTemplateGroupIdentifier *string + + // An eventbridge rule template group's identifier. Can be either be its id or + // current name. + EventBridgeRuleTemplateGroupIdentifier *string + + // Placeholder documentation for MaxResults + MaxResults *int32 + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for ListSignalMapsResponse +type ListSignalMapsOutput struct { + + // A token used to retrieve the next set of results in paginated list responses. + NextToken *string + + // Placeholder documentation for __listOfSignalMapSummary + SignalMaps []types.SignalMapSummary + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSignalMapsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListSignalMaps{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSignalMaps{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListSignalMaps"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSignalMaps(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListSignalMapsAPIClient is a client that implements the ListSignalMaps +// operation. +type ListSignalMapsAPIClient interface { + ListSignalMaps(context.Context, *ListSignalMapsInput, ...func(*Options)) (*ListSignalMapsOutput, error) +} + +var _ ListSignalMapsAPIClient = (*Client)(nil) + +// ListSignalMapsPaginatorOptions is the paginator options for ListSignalMaps +type ListSignalMapsPaginatorOptions struct { + // Placeholder documentation for MaxResults + 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 +} + +// ListSignalMapsPaginator is a paginator for ListSignalMaps +type ListSignalMapsPaginator struct { + options ListSignalMapsPaginatorOptions + client ListSignalMapsAPIClient + params *ListSignalMapsInput + nextToken *string + firstPage bool +} + +// NewListSignalMapsPaginator returns a new ListSignalMapsPaginator +func NewListSignalMapsPaginator(client ListSignalMapsAPIClient, params *ListSignalMapsInput, optFns ...func(*ListSignalMapsPaginatorOptions)) *ListSignalMapsPaginator { + if params == nil { + params = &ListSignalMapsInput{} + } + + options := ListSignalMapsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSignalMapsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSignalMapsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListSignalMaps page. +func (p *ListSignalMapsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSignalMapsOutput, 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.ListSignalMaps(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_opListSignalMaps(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListSignalMaps", + } +} diff --git a/service/medialive/api_op_StartDeleteMonitorDeployment.go b/service/medialive/api_op_StartDeleteMonitorDeployment.go new file mode 100644 index 00000000000..548d3a7f835 --- /dev/null +++ b/service/medialive/api_op_StartDeleteMonitorDeployment.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Initiates a deployment to delete the monitor of the specified signal map. +func (c *Client) StartDeleteMonitorDeployment(ctx context.Context, params *StartDeleteMonitorDeploymentInput, optFns ...func(*Options)) (*StartDeleteMonitorDeploymentOutput, error) { + if params == nil { + params = &StartDeleteMonitorDeploymentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartDeleteMonitorDeployment", params, optFns, c.addOperationStartDeleteMonitorDeploymentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartDeleteMonitorDeploymentOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for StartDeleteMonitorDeploymentRequest +type StartDeleteMonitorDeploymentInput struct { + + // A signal map's identifier. Can be either be its id or current name. + // + // This member is required. + Identifier *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for StartDeleteMonitorDeploymentResponse +type StartDeleteMonitorDeploymentOutput struct { + + // A signal map's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + CloudWatchAlarmTemplateGroupIds []string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A top-level supported AWS resource ARN to discovery a signal map from. + DiscoveryEntryPointArn *string + + // Error message associated with a failed creation or failed update attempt of a + // signal map. + ErrorMessage *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + EventBridgeRuleTemplateGroupIds []string + + // A map representing an incomplete AWS media workflow as a graph. + FailedMediaResourceMap map[string]types.MediaResource + + // A signal map's id. + Id *string + + // Placeholder documentation for __timestampIso8601 + LastDiscoveredAt *time.Time + + // Represents the latest successful monitor deployment of a signal map. + LastSuccessfulMonitorDeployment *types.SuccessfulMonitorDeployment + + // A map representing an AWS media workflow as a graph. + MediaResourceMap map[string]types.MediaResource + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // If true, there are pending monitor changes for this signal map that can be + // deployed. + MonitorChangesPendingDeployment *bool + + // Represents the latest monitor deployment of a signal map. + MonitorDeployment *types.MonitorDeployment + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // A signal map's current status which is dependent on its lifecycle actions or + // associated jobs. + Status types.SignalMapStatus + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartDeleteMonitorDeploymentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDeleteMonitorDeployment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartDeleteMonitorDeployment{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartDeleteMonitorDeployment"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpStartDeleteMonitorDeploymentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDeleteMonitorDeployment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartDeleteMonitorDeployment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartDeleteMonitorDeployment", + } +} diff --git a/service/medialive/api_op_StartMonitorDeployment.go b/service/medialive/api_op_StartMonitorDeployment.go new file mode 100644 index 00000000000..2e1543f0987 --- /dev/null +++ b/service/medialive/api_op_StartMonitorDeployment.go @@ -0,0 +1,197 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Initiates a deployment to deploy the latest monitor of the specified signal map. +func (c *Client) StartMonitorDeployment(ctx context.Context, params *StartMonitorDeploymentInput, optFns ...func(*Options)) (*StartMonitorDeploymentOutput, error) { + if params == nil { + params = &StartMonitorDeploymentInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartMonitorDeployment", params, optFns, c.addOperationStartMonitorDeploymentMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartMonitorDeploymentOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for StartMonitorDeploymentRequest +type StartMonitorDeploymentInput struct { + + // A signal map's identifier. Can be either be its id or current name. + // + // This member is required. + Identifier *string + + // Placeholder documentation for __boolean + DryRun *bool + + noSmithyDocumentSerde +} + +// Placeholder documentation for StartMonitorDeploymentResponse +type StartMonitorDeploymentOutput struct { + + // A signal map's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + CloudWatchAlarmTemplateGroupIds []string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A top-level supported AWS resource ARN to discovery a signal map from. + DiscoveryEntryPointArn *string + + // Error message associated with a failed creation or failed update attempt of a + // signal map. + ErrorMessage *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + EventBridgeRuleTemplateGroupIds []string + + // A map representing an incomplete AWS media workflow as a graph. + FailedMediaResourceMap map[string]types.MediaResource + + // A signal map's id. + Id *string + + // Placeholder documentation for __timestampIso8601 + LastDiscoveredAt *time.Time + + // Represents the latest successful monitor deployment of a signal map. + LastSuccessfulMonitorDeployment *types.SuccessfulMonitorDeployment + + // A map representing an AWS media workflow as a graph. + MediaResourceMap map[string]types.MediaResource + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // If true, there are pending monitor changes for this signal map that can be + // deployed. + MonitorChangesPendingDeployment *bool + + // Represents the latest monitor deployment of a signal map. + MonitorDeployment *types.MonitorDeployment + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // A signal map's current status which is dependent on its lifecycle actions or + // associated jobs. + Status types.SignalMapStatus + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartMonitorDeploymentMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartMonitorDeployment{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartMonitorDeployment{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartMonitorDeployment"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpStartMonitorDeploymentValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartMonitorDeployment(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartMonitorDeployment(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartMonitorDeployment", + } +} diff --git a/service/medialive/api_op_StartUpdateSignalMap.go b/service/medialive/api_op_StartUpdateSignalMap.go new file mode 100644 index 00000000000..1674777d294 --- /dev/null +++ b/service/medialive/api_op_StartUpdateSignalMap.go @@ -0,0 +1,215 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Initiates an update for the specified signal map. Will discover a new signal +// map if a changed discoveryEntryPointArn is provided. +func (c *Client) StartUpdateSignalMap(ctx context.Context, params *StartUpdateSignalMapInput, optFns ...func(*Options)) (*StartUpdateSignalMapOutput, error) { + if params == nil { + params = &StartUpdateSignalMapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartUpdateSignalMap", params, optFns, c.addOperationStartUpdateSignalMapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartUpdateSignalMapOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for StartUpdateSignalMapRequest +type StartUpdateSignalMapInput struct { + + // A signal map's identifier. Can be either be its id or current name. + // + // This member is required. + Identifier *string + + // Placeholder documentation for __listOf__stringPatternS + CloudWatchAlarmTemplateGroupIdentifiers []string + + // A resource's optional description. + Description *string + + // A top-level supported AWS resource ARN to discovery a signal map from. + DiscoveryEntryPointArn *string + + // Placeholder documentation for __listOf__stringPatternS + EventBridgeRuleTemplateGroupIdentifiers []string + + // If true, will force a rediscovery of a signal map if an unchanged + // discoveryEntryPointArn is provided. + ForceRediscovery *bool + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for StartUpdateSignalMapResponse +type StartUpdateSignalMapOutput struct { + + // A signal map's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + CloudWatchAlarmTemplateGroupIds []string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A top-level supported AWS resource ARN to discovery a signal map from. + DiscoveryEntryPointArn *string + + // Error message associated with a failed creation or failed update attempt of a + // signal map. + ErrorMessage *string + + // Placeholder documentation for __listOf__stringMin7Max11PatternAws097 + EventBridgeRuleTemplateGroupIds []string + + // A map representing an incomplete AWS media workflow as a graph. + FailedMediaResourceMap map[string]types.MediaResource + + // A signal map's id. + Id *string + + // Placeholder documentation for __timestampIso8601 + LastDiscoveredAt *time.Time + + // Represents the latest successful monitor deployment of a signal map. + LastSuccessfulMonitorDeployment *types.SuccessfulMonitorDeployment + + // A map representing an AWS media workflow as a graph. + MediaResourceMap map[string]types.MediaResource + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // If true, there are pending monitor changes for this signal map that can be + // deployed. + MonitorChangesPendingDeployment *bool + + // Represents the latest monitor deployment of a signal map. + MonitorDeployment *types.MonitorDeployment + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // A signal map's current status which is dependent on its lifecycle actions or + // associated jobs. + Status types.SignalMapStatus + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartUpdateSignalMapMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartUpdateSignalMap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartUpdateSignalMap{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartUpdateSignalMap"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpStartUpdateSignalMapValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartUpdateSignalMap(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartUpdateSignalMap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartUpdateSignalMap", + } +} diff --git a/service/medialive/api_op_UpdateCloudWatchAlarmTemplate.go b/service/medialive/api_op_UpdateCloudWatchAlarmTemplate.go new file mode 100644 index 00000000000..74465457017 --- /dev/null +++ b/service/medialive/api_op_UpdateCloudWatchAlarmTemplate.go @@ -0,0 +1,239 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the specified cloudwatch alarm template. +func (c *Client) UpdateCloudWatchAlarmTemplate(ctx context.Context, params *UpdateCloudWatchAlarmTemplateInput, optFns ...func(*Options)) (*UpdateCloudWatchAlarmTemplateOutput, error) { + if params == nil { + params = &UpdateCloudWatchAlarmTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCloudWatchAlarmTemplate", params, optFns, c.addOperationUpdateCloudWatchAlarmTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCloudWatchAlarmTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for UpdateCloudWatchAlarmTemplateRequest +type UpdateCloudWatchAlarmTemplateInput struct { + + // A cloudwatch alarm template's identifier. Can be either be its id or current + // name. + // + // This member is required. + Identifier *string + + // The comparison operator used to compare the specified statistic and the + // threshold. + ComparisonOperator types.CloudWatchAlarmTemplateComparisonOperator + + // The number of datapoints within the evaluation period that must be breaching to + // trigger the alarm. + DatapointsToAlarm *int32 + + // A resource's optional description. + Description *string + + // The number of periods over which data is compared to the specified threshold. + EvaluationPeriods *int32 + + // A cloudwatch alarm template group's identifier. Can be either be its id or + // current name. + GroupIdentifier *string + + // The name of the metric associated with the alarm. Must be compatible with + // targetResourceType. + MetricName *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // The period, in seconds, over which the specified statistic is applied. + Period *int32 + + // The statistic to apply to the alarm's metric data. + Statistic types.CloudWatchAlarmTemplateStatistic + + // The resource type this template should dynamically generate cloudwatch metric + // alarms for. + TargetResourceType types.CloudWatchAlarmTemplateTargetResourceType + + // The threshold value to compare with the specified statistic. + Threshold *float64 + + // Specifies how missing data points are treated when evaluating the alarm's + // condition. + TreatMissingData types.CloudWatchAlarmTemplateTreatMissingData + + noSmithyDocumentSerde +} + +// Placeholder documentation for UpdateCloudWatchAlarmTemplateResponse +type UpdateCloudWatchAlarmTemplateOutput struct { + + // A cloudwatch alarm template's ARN (Amazon Resource Name) + Arn *string + + // The comparison operator used to compare the specified statistic and the + // threshold. + ComparisonOperator types.CloudWatchAlarmTemplateComparisonOperator + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // The number of datapoints within the evaluation period that must be breaching to + // trigger the alarm. + DatapointsToAlarm *int32 + + // A resource's optional description. + Description *string + + // The number of periods over which data is compared to the specified threshold. + EvaluationPeriods *int32 + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + GroupId *string + + // A cloudwatch alarm template's id. AWS provided templates have ids that start + // with aws- + Id *string + + // The name of the metric associated with the alarm. Must be compatible with + // targetResourceType. + MetricName *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // The period, in seconds, over which the specified statistic is applied. + Period *int32 + + // The statistic to apply to the alarm's metric data. + Statistic types.CloudWatchAlarmTemplateStatistic + + // Represents the tags associated with a resource. + Tags map[string]string + + // The resource type this template should dynamically generate cloudwatch metric + // alarms for. + TargetResourceType types.CloudWatchAlarmTemplateTargetResourceType + + // The threshold value to compare with the specified statistic. + Threshold *float64 + + // Specifies how missing data points are treated when evaluating the alarm's + // condition. + TreatMissingData types.CloudWatchAlarmTemplateTreatMissingData + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCloudWatchAlarmTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCloudWatchAlarmTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateCloudWatchAlarmTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCloudWatchAlarmTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateCloudWatchAlarmTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateCloudWatchAlarmTemplate", + } +} diff --git a/service/medialive/api_op_UpdateCloudWatchAlarmTemplateGroup.go b/service/medialive/api_op_UpdateCloudWatchAlarmTemplateGroup.go new file mode 100644 index 00000000000..c9eb256dd1b --- /dev/null +++ b/service/medialive/api_op_UpdateCloudWatchAlarmTemplateGroup.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the specified cloudwatch alarm template group. +func (c *Client) UpdateCloudWatchAlarmTemplateGroup(ctx context.Context, params *UpdateCloudWatchAlarmTemplateGroupInput, optFns ...func(*Options)) (*UpdateCloudWatchAlarmTemplateGroupOutput, error) { + if params == nil { + params = &UpdateCloudWatchAlarmTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateCloudWatchAlarmTemplateGroup", params, optFns, c.addOperationUpdateCloudWatchAlarmTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateCloudWatchAlarmTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for UpdateCloudWatchAlarmTemplateGroupRequest +type UpdateCloudWatchAlarmTemplateGroupInput struct { + + // A cloudwatch alarm template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + Identifier *string + + // A resource's optional description. + Description *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for UpdateCloudWatchAlarmTemplateGroupResponse +type UpdateCloudWatchAlarmTemplateGroupOutput struct { + + // A cloudwatch alarm template group's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateCloudWatchAlarmTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateCloudWatchAlarmTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateCloudWatchAlarmTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateCloudWatchAlarmTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateCloudWatchAlarmTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateCloudWatchAlarmTemplateGroup", + } +} diff --git a/service/medialive/api_op_UpdateEventBridgeRuleTemplate.go b/service/medialive/api_op_UpdateEventBridgeRuleTemplate.go new file mode 100644 index 00000000000..a5578972427 --- /dev/null +++ b/service/medialive/api_op_UpdateEventBridgeRuleTemplate.go @@ -0,0 +1,187 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/medialive/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the specified eventbridge rule template. +func (c *Client) UpdateEventBridgeRuleTemplate(ctx context.Context, params *UpdateEventBridgeRuleTemplateInput, optFns ...func(*Options)) (*UpdateEventBridgeRuleTemplateOutput, error) { + if params == nil { + params = &UpdateEventBridgeRuleTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateEventBridgeRuleTemplate", params, optFns, c.addOperationUpdateEventBridgeRuleTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateEventBridgeRuleTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for UpdateEventBridgeRuleTemplateRequest +type UpdateEventBridgeRuleTemplateInput struct { + + // An eventbridge rule template's identifier. Can be either be its id or current + // name. + // + // This member is required. + Identifier *string + + // A resource's optional description. + Description *string + + // Placeholder documentation for __listOfEventBridgeRuleTemplateTarget + EventTargets []types.EventBridgeRuleTemplateTarget + + // The type of event to match with the rule. + EventType types.EventBridgeRuleTemplateEventType + + // An eventbridge rule template group's identifier. Can be either be its id or + // current name. + GroupIdentifier *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for UpdateEventBridgeRuleTemplateResponse +type UpdateEventBridgeRuleTemplateOutput struct { + + // An eventbridge rule template's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // Placeholder documentation for __listOfEventBridgeRuleTemplateTarget + EventTargets []types.EventBridgeRuleTemplateTarget + + // The type of event to match with the rule. + EventType types.EventBridgeRuleTemplateEventType + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + GroupId *string + + // An eventbridge rule template's id. AWS provided templates have ids that start + // with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateEventBridgeRuleTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateEventBridgeRuleTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateEventBridgeRuleTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventBridgeRuleTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateEventBridgeRuleTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateEventBridgeRuleTemplate", + } +} diff --git a/service/medialive/api_op_UpdateEventBridgeRuleTemplateGroup.go b/service/medialive/api_op_UpdateEventBridgeRuleTemplateGroup.go new file mode 100644 index 00000000000..8256b6f2c68 --- /dev/null +++ b/service/medialive/api_op_UpdateEventBridgeRuleTemplateGroup.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package medialive + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the specified eventbridge rule template group. +func (c *Client) UpdateEventBridgeRuleTemplateGroup(ctx context.Context, params *UpdateEventBridgeRuleTemplateGroupInput, optFns ...func(*Options)) (*UpdateEventBridgeRuleTemplateGroupOutput, error) { + if params == nil { + params = &UpdateEventBridgeRuleTemplateGroupInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateEventBridgeRuleTemplateGroup", params, optFns, c.addOperationUpdateEventBridgeRuleTemplateGroupMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateEventBridgeRuleTemplateGroupOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Placeholder documentation for UpdateEventBridgeRuleTemplateGroupRequest +type UpdateEventBridgeRuleTemplateGroupInput struct { + + // An eventbridge rule template group's identifier. Can be either be its id or + // current name. + // + // This member is required. + Identifier *string + + // A resource's optional description. + Description *string + + noSmithyDocumentSerde +} + +// Placeholder documentation for UpdateEventBridgeRuleTemplateGroupResponse +type UpdateEventBridgeRuleTemplateGroupOutput struct { + + // An eventbridge rule template group's ARN (Amazon Resource Name) + Arn *string + + // Placeholder documentation for __timestampIso8601 + CreatedAt *time.Time + + // A resource's optional description. + Description *string + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + Id *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + Name *string + + // Represents the tags associated with a resource. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateEventBridgeRuleTemplateGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplateGroup{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateEventBridgeRuleTemplateGroup"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateEventBridgeRuleTemplateGroupValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateEventBridgeRuleTemplateGroup(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateEventBridgeRuleTemplateGroup(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateEventBridgeRuleTemplateGroup", + } +} diff --git a/service/medialive/deserializers.go b/service/medialive/deserializers.go index ecac04486cf..3c457cf9ba4 100644 --- a/service/medialive/deserializers.go +++ b/service/medialive/deserializers.go @@ -1200,14 +1200,14 @@ func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutp return nil } -type awsRestjson1_deserializeOpCreateInput struct { +type awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplate struct { } -func (*awsRestjson1_deserializeOpCreateInput) ID() string { +func (*awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateInput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplate) 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) @@ -1221,9 +1221,9 @@ func (m *awsRestjson1_deserializeOpCreateInput) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateInput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateCloudWatchAlarmTemplate(response, &metadata) } - output := &CreateInputOutput{} + output := &CreateCloudWatchAlarmTemplateOutput{} out.Result = output var buff [1024]byte @@ -1244,7 +1244,7 @@ func (m *awsRestjson1_deserializeOpCreateInput) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateInputOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateCloudWatchAlarmTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1257,7 +1257,7 @@ func (m *awsRestjson1_deserializeOpCreateInput) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateInput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateCloudWatchAlarmTemplate(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)} @@ -1298,21 +1298,21 @@ func awsRestjson1_deserializeOpErrorCreateInput(response *smithyhttp.Response, m } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -1326,7 +1326,7 @@ func awsRestjson1_deserializeOpErrorCreateInput(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentCreateInputOutput(v **CreateInputOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateCloudWatchAlarmTemplateOutput(v **CreateCloudWatchAlarmTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1339,20 +1339,209 @@ func awsRestjson1_deserializeOpDocumentCreateInputOutput(v **CreateInputOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateInputOutput + var sv *CreateCloudWatchAlarmTemplateOutput if *v == nil { - sv = &CreateInputOutput{} + sv = &CreateCloudWatchAlarmTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "input": - if err := awsRestjson1_deserializeDocumentInput(&sv.Input, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveCloudwatchAlarmTemplate to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "comparisonOperator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateComparisonOperator to be of type string, got %T instead", value) + } + sv.ComparisonOperator = types.CloudWatchAlarmTemplateComparisonOperator(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "datapointsToAlarm": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DatapointsToAlarm = ptr.Int32(int32(i64)) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "evaluationPeriods": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EvaluationPeriods = ptr.Int32(int32(i64)) + } + + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax64 to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "period": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin10Max86400 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Period = ptr.Int32(int32(i64)) + } + + case "statistic": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateStatistic to be of type string, got %T instead", value) + } + sv.Statistic = types.CloudWatchAlarmTemplateStatistic(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } + case "targetResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateTargetResourceType to be of type string, got %T instead", value) + } + sv.TargetResourceType = types.CloudWatchAlarmTemplateTargetResourceType(jtv) + } + + case "threshold": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Threshold = ptr.Float64(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) + + } + sv.Threshold = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "treatMissingData": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateTreatMissingData to be of type string, got %T instead", value) + } + sv.TreatMissingData = types.CloudWatchAlarmTemplateTreatMissingData(jtv) + } + default: _, _ = key, value @@ -1362,14 +1551,14 @@ func awsRestjson1_deserializeOpDocumentCreateInputOutput(v **CreateInputOutput, return nil } -type awsRestjson1_deserializeOpCreateInputSecurityGroup struct { +type awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplateGroup struct { } -func (*awsRestjson1_deserializeOpCreateInputSecurityGroup) ID() string { +func (*awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateInputSecurityGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateCloudWatchAlarmTemplateGroup) 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) @@ -1383,9 +1572,9 @@ func (m *awsRestjson1_deserializeOpCreateInputSecurityGroup) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateInputSecurityGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateCloudWatchAlarmTemplateGroup(response, &metadata) } - output := &CreateInputSecurityGroupOutput{} + output := &CreateCloudWatchAlarmTemplateGroupOutput{} out.Result = output var buff [1024]byte @@ -1406,7 +1595,7 @@ func (m *awsRestjson1_deserializeOpCreateInputSecurityGroup) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateInputSecurityGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateCloudWatchAlarmTemplateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1419,7 +1608,7 @@ func (m *awsRestjson1_deserializeOpCreateInputSecurityGroup) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateInputSecurityGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateCloudWatchAlarmTemplateGroup(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)} @@ -1460,21 +1649,21 @@ func awsRestjson1_deserializeOpErrorCreateInputSecurityGroup(response *smithyhtt } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -1488,7 +1677,7 @@ func awsRestjson1_deserializeOpErrorCreateInputSecurityGroup(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentCreateInputSecurityGroupOutput(v **CreateInputSecurityGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateCloudWatchAlarmTemplateGroupOutput(v **CreateCloudWatchAlarmTemplateGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1501,17 +1690,79 @@ func awsRestjson1_deserializeOpDocumentCreateInputSecurityGroupOutput(v **Create return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateInputSecurityGroupOutput + var sv *CreateCloudWatchAlarmTemplateGroupOutput if *v == nil { - sv = &CreateInputSecurityGroupOutput{} + sv = &CreateCloudWatchAlarmTemplateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "securityGroup": - if err := awsRestjson1_deserializeDocumentInputSecurityGroup(&sv.SecurityGroup, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveCloudwatchAlarmTemplateGroup to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -1524,14 +1775,14 @@ func awsRestjson1_deserializeOpDocumentCreateInputSecurityGroupOutput(v **Create return nil } -type awsRestjson1_deserializeOpCreateMultiplex struct { +type awsRestjson1_deserializeOpCreateEventBridgeRuleTemplate struct { } -func (*awsRestjson1_deserializeOpCreateMultiplex) ID() string { +func (*awsRestjson1_deserializeOpCreateEventBridgeRuleTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMultiplex) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateEventBridgeRuleTemplate) 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) @@ -1545,9 +1796,9 @@ func (m *awsRestjson1_deserializeOpCreateMultiplex) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMultiplex(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateEventBridgeRuleTemplate(response, &metadata) } - output := &CreateMultiplexOutput{} + output := &CreateEventBridgeRuleTemplateOutput{} out.Result = output var buff [1024]byte @@ -1568,7 +1819,7 @@ func (m *awsRestjson1_deserializeOpCreateMultiplex) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMultiplexOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateEventBridgeRuleTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1581,7 +1832,7 @@ func (m *awsRestjson1_deserializeOpCreateMultiplex) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMultiplex(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateEventBridgeRuleTemplate(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)} @@ -1622,9 +1873,6 @@ func awsRestjson1_deserializeOpErrorCreateMultiplex(response *smithyhttp.Respons } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -1634,18 +1882,15 @@ func awsRestjson1_deserializeOpErrorCreateMultiplex(response *smithyhttp.Respons case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1656,7 +1901,7 @@ func awsRestjson1_deserializeOpErrorCreateMultiplex(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentCreateMultiplexOutput(v **CreateMultiplexOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateEventBridgeRuleTemplateOutput(v **CreateEventBridgeRuleTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1669,17 +1914,102 @@ func awsRestjson1_deserializeOpDocumentCreateMultiplexOutput(v **CreateMultiplex return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMultiplexOutput + var sv *CreateEventBridgeRuleTemplateOutput if *v == nil { - sv = &CreateMultiplexOutput{} + sv = &CreateEventBridgeRuleTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "multiplex": - if err := awsRestjson1_deserializeDocumentMultiplex(&sv.Multiplex, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveEventbridgeRuleTemplate to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "eventTargets": + if err := awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateTarget(&sv.EventTargets, value); err != nil { + return err + } + + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventBridgeRuleTemplateEventType to be of type string, got %T instead", value) + } + sv.EventType = types.EventBridgeRuleTemplateEventType(jtv) + } + + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -1692,14 +2022,14 @@ func awsRestjson1_deserializeOpDocumentCreateMultiplexOutput(v **CreateMultiplex return nil } -type awsRestjson1_deserializeOpCreateMultiplexProgram struct { +type awsRestjson1_deserializeOpCreateEventBridgeRuleTemplateGroup struct { } -func (*awsRestjson1_deserializeOpCreateMultiplexProgram) ID() string { +func (*awsRestjson1_deserializeOpCreateEventBridgeRuleTemplateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMultiplexProgram) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateEventBridgeRuleTemplateGroup) 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) @@ -1713,9 +2043,9 @@ func (m *awsRestjson1_deserializeOpCreateMultiplexProgram) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMultiplexProgram(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateEventBridgeRuleTemplateGroup(response, &metadata) } - output := &CreateMultiplexProgramOutput{} + output := &CreateEventBridgeRuleTemplateGroupOutput{} out.Result = output var buff [1024]byte @@ -1736,7 +2066,7 @@ func (m *awsRestjson1_deserializeOpCreateMultiplexProgram) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMultiplexProgramOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateEventBridgeRuleTemplateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1749,7 +2079,7 @@ func (m *awsRestjson1_deserializeOpCreateMultiplexProgram) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMultiplexProgram(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateEventBridgeRuleTemplateGroup(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)} @@ -1790,9 +2120,6 @@ func awsRestjson1_deserializeOpErrorCreateMultiplexProgram(response *smithyhttp. } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -1802,18 +2129,15 @@ func awsRestjson1_deserializeOpErrorCreateMultiplexProgram(response *smithyhttp. case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1824,7 +2148,7 @@ func awsRestjson1_deserializeOpErrorCreateMultiplexProgram(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateMultiplexProgramOutput(v **CreateMultiplexProgramOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateEventBridgeRuleTemplateGroupOutput(v **CreateEventBridgeRuleTemplateGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1837,17 +2161,79 @@ func awsRestjson1_deserializeOpDocumentCreateMultiplexProgramOutput(v **CreateMu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMultiplexProgramOutput + var sv *CreateEventBridgeRuleTemplateGroupOutput if *v == nil { - sv = &CreateMultiplexProgramOutput{} + sv = &CreateEventBridgeRuleTemplateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "multiplexProgram": - if err := awsRestjson1_deserializeDocumentMultiplexProgram(&sv.MultiplexProgram, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveEventbridgeRuleTemplateGroup to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -1860,14 +2246,14 @@ func awsRestjson1_deserializeOpDocumentCreateMultiplexProgramOutput(v **CreateMu return nil } -type awsRestjson1_deserializeOpCreatePartnerInput struct { +type awsRestjson1_deserializeOpCreateInput struct { } -func (*awsRestjson1_deserializeOpCreatePartnerInput) ID() string { +func (*awsRestjson1_deserializeOpCreateInput) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreatePartnerInput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateInput) 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) @@ -1881,9 +2267,9 @@ func (m *awsRestjson1_deserializeOpCreatePartnerInput) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreatePartnerInput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateInput(response, &metadata) } - output := &CreatePartnerInputOutput{} + output := &CreateInputOutput{} out.Result = output var buff [1024]byte @@ -1904,7 +2290,7 @@ func (m *awsRestjson1_deserializeOpCreatePartnerInput) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreatePartnerInputOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateInputOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1917,7 +2303,7 @@ func (m *awsRestjson1_deserializeOpCreatePartnerInput) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreatePartnerInput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateInput(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)} @@ -1986,7 +2372,7 @@ func awsRestjson1_deserializeOpErrorCreatePartnerInput(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentCreatePartnerInputOutput(v **CreatePartnerInputOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateInputOutput(v **CreateInputOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1999,9 +2385,9 @@ func awsRestjson1_deserializeOpDocumentCreatePartnerInputOutput(v **CreatePartne return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreatePartnerInputOutput + var sv *CreateInputOutput if *v == nil { - sv = &CreatePartnerInputOutput{} + sv = &CreateInputOutput{} } else { sv = *v } @@ -2022,14 +2408,14 @@ func awsRestjson1_deserializeOpDocumentCreatePartnerInputOutput(v **CreatePartne return nil } -type awsRestjson1_deserializeOpCreateTags struct { +type awsRestjson1_deserializeOpCreateInputSecurityGroup struct { } -func (*awsRestjson1_deserializeOpCreateTags) ID() string { +func (*awsRestjson1_deserializeOpCreateInputSecurityGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateInputSecurityGroup) 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) @@ -2043,21 +2429,43 @@ func (m *awsRestjson1_deserializeOpCreateTags) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTags(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateInputSecurityGroup(response, &metadata) } - output := &CreateTagsOutput{} + output := &CreateInputSecurityGroupOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + 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_deserializeOpDocumentCreateInputSecurityGroupOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateInputSecurityGroup(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)} @@ -2098,17 +2506,23 @@ func awsRestjson1_deserializeOpErrorCreateTags(response *smithyhttp.Response, me } switch { + case strings.EqualFold("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -2120,15 +2534,51 @@ func awsRestjson1_deserializeOpErrorCreateTags(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDeleteChannel struct { -} +func awsRestjson1_deserializeOpDocumentCreateInputSecurityGroupOutput(v **CreateInputSecurityGroupOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } -func (*awsRestjson1_deserializeOpDeleteChannel) ID() string { - return "OperationDeserializer" -} + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } -func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, + var sv *CreateInputSecurityGroupOutput + if *v == nil { + sv = &CreateInputSecurityGroupOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "securityGroup": + if err := awsRestjson1_deserializeDocumentInputSecurityGroup(&sv.SecurityGroup, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateMultiplex struct { +} + +func (*awsRestjson1_deserializeOpCreateMultiplex) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateMultiplex) 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 { @@ -2141,9 +2591,9 @@ func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMultiplex(response, &metadata) } - output := &DeleteChannelOutput{} + output := &CreateMultiplexOutput{} out.Result = output var buff [1024]byte @@ -2164,7 +2614,7 @@ func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteChannelOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateMultiplexOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2177,7 +2627,7 @@ func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateMultiplex(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)} @@ -2236,12 +2686,12 @@ func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2252,7 +2702,7 @@ func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDeleteChannelOutput(v **DeleteChannelOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateMultiplexOutput(v **CreateMultiplexOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2265,138 +2715,17 @@ func awsRestjson1_deserializeOpDocumentDeleteChannelOutput(v **DeleteChannelOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteChannelOutput + var sv *CreateMultiplexOutput if *v == nil { - sv = &DeleteChannelOutput{} + sv = &CreateMultiplexOutput{} } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "cdiInputSpecification": - if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { - return err - } - - case "channelClass": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) - } - sv.ChannelClass = types.ChannelClass(jtv) - } - - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { - return err - } - - case "egressEndpoints": - if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { - return err - } - - case "encoderSettings": - if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { - return err - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "inputAttachments": - if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { - return err - } - - case "inputSpecification": - if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { - return err - } - - case "logLevel": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) - } - sv.LogLevel = types.LogLevel(jtv) - } - - case "maintenance": - if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "pipelineDetails": - if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { - return err - } - - case "pipelinesRunningCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) - } - - case "roleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.RoleArn = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) - } - sv.State = types.ChannelState(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - case "vpc": - if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { + case "multiplex": + if err := awsRestjson1_deserializeDocumentMultiplex(&sv.Multiplex, value); err != nil { return err } @@ -2409,14 +2738,14 @@ func awsRestjson1_deserializeOpDocumentDeleteChannelOutput(v **DeleteChannelOutp return nil } -type awsRestjson1_deserializeOpDeleteInput struct { +type awsRestjson1_deserializeOpCreateMultiplexProgram struct { } -func (*awsRestjson1_deserializeOpDeleteInput) ID() string { +func (*awsRestjson1_deserializeOpCreateMultiplexProgram) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteInput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateMultiplexProgram) 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) @@ -2430,15 +2759,43 @@ func (m *awsRestjson1_deserializeOpDeleteInput) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteInput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMultiplexProgram(response, &metadata) } - output := &DeleteInputOutput{} + output := &CreateMultiplexProgramOutput{} 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 = awsRestjson1_deserializeOpDocumentCreateMultiplexProgramOutput(&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_deserializeOpErrorDeleteInput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateMultiplexProgram(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)} @@ -2497,12 +2854,12 @@ func awsRestjson1_deserializeOpErrorDeleteInput(response *smithyhttp.Response, m case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2513,36 +2870,100 @@ func awsRestjson1_deserializeOpErrorDeleteInput(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpDeleteInputSecurityGroup struct { -} - -func (*awsRestjson1_deserializeOpDeleteInputSecurityGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteInputSecurityGroup) 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 +func awsRestjson1_deserializeOpDocumentCreateMultiplexProgramOutput(v **CreateMultiplexProgramOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteInputSecurityGroup(response, &metadata) + var sv *CreateMultiplexProgramOutput + if *v == nil { + sv = &CreateMultiplexProgramOutput{} + } else { + sv = *v } - output := &DeleteInputSecurityGroupOutput{} - out.Result = output - return out, metadata, err + for key, value := range shape { + switch key { + case "multiplexProgram": + if err := awsRestjson1_deserializeDocumentMultiplexProgram(&sv.MultiplexProgram, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeOpErrorDeleteInputSecurityGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +type awsRestjson1_deserializeOpCreatePartnerInput struct { +} + +func (*awsRestjson1_deserializeOpCreatePartnerInput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreatePartnerInput) 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_deserializeOpErrorCreatePartnerInput(response, &metadata) + } + output := &CreatePartnerInputOutput{} + 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 = awsRestjson1_deserializeOpDocumentCreatePartnerInputOutput(&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_deserializeOpErrorCreatePartnerInput(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)} @@ -2598,9 +3019,6 @@ func awsRestjson1_deserializeOpErrorDeleteInputSecurityGroup(response *smithyhtt case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -2614,14 +3032,50 @@ func awsRestjson1_deserializeOpErrorDeleteInputSecurityGroup(response *smithyhtt } } -type awsRestjson1_deserializeOpDeleteMultiplex struct { +func awsRestjson1_deserializeOpDocumentCreatePartnerInputOutput(v **CreatePartnerInputOutput, 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 *CreatePartnerInputOutput + if *v == nil { + sv = &CreatePartnerInputOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "input": + if err := awsRestjson1_deserializeDocumentInput(&sv.Input, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteMultiplex) ID() string { +type awsRestjson1_deserializeOpCreateSignalMap struct { +} + +func (*awsRestjson1_deserializeOpCreateSignalMap) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMultiplex) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateSignalMap) 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) @@ -2635,9 +3089,9 @@ func (m *awsRestjson1_deserializeOpDeleteMultiplex) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMultiplex(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateSignalMap(response, &metadata) } - output := &DeleteMultiplexOutput{} + output := &CreateSignalMapOutput{} out.Result = output var buff [1024]byte @@ -2658,7 +3112,7 @@ func (m *awsRestjson1_deserializeOpDeleteMultiplex) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteMultiplexOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateSignalMapOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2671,7 +3125,7 @@ func (m *awsRestjson1_deserializeOpDeleteMultiplex) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMultiplex(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateSignalMap(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)} @@ -2712,9 +3166,6 @@ func awsRestjson1_deserializeOpErrorDeleteMultiplex(response *smithyhttp.Respons } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -2724,9 +3175,6 @@ func awsRestjson1_deserializeOpErrorDeleteMultiplex(response *smithyhttp.Respons case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -2746,7 +3194,7 @@ func awsRestjson1_deserializeOpErrorDeleteMultiplex(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentDeleteMultiplexOutput(v **DeleteMultiplexOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateSignalMapOutput(v **CreateSignalMapOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2759,9 +3207,9 @@ func awsRestjson1_deserializeOpDocumentDeleteMultiplexOutput(v **DeleteMultiplex return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteMultiplexOutput + var sv *CreateSignalMapOutput if *v == nil { - sv = &DeleteMultiplexOutput{} + sv = &CreateSignalMapOutput{} } else { sv = *v } @@ -2772,81 +3220,145 @@ func awsRestjson1_deserializeOpDocumentDeleteMultiplexOutput(v **DeleteMultiplex 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 __stringPatternArnMedialiveSignalMap to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } - case "availabilityZones": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { + case "cloudWatchAlarmTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.CloudWatchAlarmTemplateGroupIds, value); err != nil { return err } - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { - return err + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "id": + case "description": 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 __stringMin0Max1024 to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "multiplexSettings": - if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { + case "discoveryEntryPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.DiscoveryEntryPointArn = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "eventBridgeRuleTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.EventBridgeRuleTemplateGroupIds, value); err != nil { return err } - case "name": + case "failedMediaResourceMap": + if err := awsRestjson1_deserializeDocumentFailedMediaResourceMap(&sv.FailedMediaResourceMap, value); err != nil { + return err + } + + case "id": 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 __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "pipelinesRunningCount": + case "lastDiscoveredAt": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) } - i64, err := jtv.Int64() + t, err := smithytime.ParseDateTime(jtv) if err != nil { return err } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + sv.LastDiscoveredAt = ptr.Time(t) } - case "programCount": + case "lastSuccessfulMonitorDeployment": + if err := awsRestjson1_deserializeDocumentSuccessfulMonitorDeployment(&sv.LastSuccessfulMonitorDeployment, value); err != nil { + return err + } + + case "mediaResourceMap": + if err := awsRestjson1_deserializeDocumentMediaResourceMap(&sv.MediaResourceMap, value); err != nil { + return err + } + + case "modifiedAt": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) } - i64, err := jtv.Int64() + t, err := smithytime.ParseDateTime(jtv) if err != nil { return err } - sv.ProgramCount = ptr.Int32(int32(i64)) + sv.ModifiedAt = ptr.Time(t) } - case "state": + case "monitorChangesPendingDeployment": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.MonitorChangesPendingDeployment = ptr.Bool(jtv) + } + + case "monitorDeployment": + if err := awsRestjson1_deserializeDocumentMonitorDeployment(&sv.MonitorDeployment, value); err != nil { + return err + } + + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) } - sv.State = types.MultiplexState(jtv) + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapStatus(jtv) } case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -2859,14 +3371,14 @@ func awsRestjson1_deserializeOpDocumentDeleteMultiplexOutput(v **DeleteMultiplex return nil } -type awsRestjson1_deserializeOpDeleteMultiplexProgram struct { +type awsRestjson1_deserializeOpCreateTags struct { } -func (*awsRestjson1_deserializeOpDeleteMultiplexProgram) ID() string { +func (*awsRestjson1_deserializeOpCreateTags) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMultiplexProgram) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateTags) 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) @@ -2880,43 +3392,21 @@ func (m *awsRestjson1_deserializeOpDeleteMultiplexProgram) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMultiplexProgram(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateTags(response, &metadata) } - output := &DeleteMultiplexProgramOutput{} + output := &CreateTagsOutput{} 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 = awsRestjson1_deserializeOpDocumentDeleteMultiplexProgramOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMultiplexProgram(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateTags(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)} @@ -2957,30 +3447,18 @@ func awsRestjson1_deserializeOpErrorDeleteMultiplexProgram(response *smithyhttp. } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2991,78 +3469,14 @@ func awsRestjson1_deserializeOpErrorDeleteMultiplexProgram(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDeleteMultiplexProgramOutput(v **DeleteMultiplexProgramOutput, 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 *DeleteMultiplexProgramOutput - if *v == nil { - sv = &DeleteMultiplexProgramOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "channelId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.ChannelId = ptr.String(jtv) - } - - case "multiplexProgramSettings": - if err := awsRestjson1_deserializeDocumentMultiplexProgramSettings(&sv.MultiplexProgramSettings, value); err != nil { - return err - } - - case "packetIdentifiersMap": - if err := awsRestjson1_deserializeDocumentMultiplexProgramPacketIdentifiersMap(&sv.PacketIdentifiersMap, value); err != nil { - return err - } - - case "pipelineDetails": - if err := awsRestjson1_deserializeDocument__listOfMultiplexProgramPipelineDetail(&sv.PipelineDetails, value); err != nil { - return err - } - - case "programName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.ProgramName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDeleteReservation struct { +type awsRestjson1_deserializeOpDeleteChannel struct { } -func (*awsRestjson1_deserializeOpDeleteReservation) ID() string { +func (*awsRestjson1_deserializeOpDeleteChannel) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteChannel) 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) @@ -3076,9 +3490,9 @@ func (m *awsRestjson1_deserializeOpDeleteReservation) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteReservation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannel(response, &metadata) } - output := &DeleteReservationOutput{} + output := &DeleteChannelOutput{} out.Result = output var buff [1024]byte @@ -3099,7 +3513,7 @@ func (m *awsRestjson1_deserializeOpDeleteReservation) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteReservationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3112,7 +3526,7 @@ func (m *awsRestjson1_deserializeOpDeleteReservation) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteChannel(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)} @@ -3187,7 +3601,7 @@ func awsRestjson1_deserializeOpErrorDeleteReservation(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentDeleteReservationOutput(v **DeleteReservationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteChannelOutput(v **DeleteChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3200,9 +3614,9 @@ func awsRestjson1_deserializeOpDocumentDeleteReservationOutput(v **DeleteReserva return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteReservationOutput + var sv *DeleteChannelOutput if *v == nil { - sv = &DeleteReservationOutput{} + sv = &DeleteChannelOutput{} } else { sv = *v } @@ -3218,173 +3632,111 @@ func awsRestjson1_deserializeOpDocumentDeleteReservationOutput(v **DeleteReserva sv.Arn = ptr.String(jtv) } - case "count": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) + case "cdiInputSpecification": + if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { + return err } - case "currencyCode": + case "channelClass": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.CurrencyCode = ptr.String(jtv) - } - - case "duration": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) } - sv.Duration = ptr.Int32(int32(i64)) + sv.ChannelClass = types.ChannelClass(jtv) } - case "durationUnits": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OfferingDurationUnits to be of type string, got %T instead", value) - } - sv.DurationUnits = types.OfferingDurationUnits(jtv) + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { + return err } - case "end": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.End = ptr.String(jtv) + case "egressEndpoints": + if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { + return err } - case "fixedPrice": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.FixedPrice = ptr.Float64(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) - - } - sv.FixedPrice = ptr.Float64(f64) - - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) - - } + case "encoderSettings": + if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { + return err } - case "name": + case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "offeringDescription": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.OfferingDescription = ptr.String(jtv) + case "inputAttachments": + if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { + return err } - case "offeringId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.OfferingId = ptr.String(jtv) + case "inputSpecification": + if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { + return err } - case "offeringType": + case "logLevel": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected OfferingType to be of type string, got %T instead", value) + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) } - sv.OfferingType = types.OfferingType(jtv) + sv.LogLevel = types.LogLevel(jtv) } - case "region": + case "maintenance": + if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { + return err + } + + case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.Region = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "renewalSettings": - if err := awsRestjson1_deserializeDocumentRenewalSettings(&sv.RenewalSettings, value); err != nil { + case "pipelineDetails": + if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { return err } - case "reservationId": + case "pipelinesRunningCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } - sv.ReservationId = ptr.String(jtv) - } - - case "resourceSpecification": - if err := awsRestjson1_deserializeDocumentReservationResourceSpecification(&sv.ResourceSpecification, value); err != nil { - return err + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) } - case "start": + case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.Start = ptr.String(jtv) + sv.RoleArn = ptr.String(jtv) } case "state": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReservationState to be of type string, got %T instead", value) + return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) } - sv.State = types.ReservationState(jtv) + sv.State = types.ChannelState(jtv) } case "tags": @@ -3392,38 +3744,9 @@ func awsRestjson1_deserializeOpDocumentDeleteReservationOutput(v **DeleteReserva return err } - case "usagePrice": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UsagePrice = ptr.Float64(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) - - } - sv.UsagePrice = ptr.Float64(f64) - - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) - - } + case "vpc": + if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { + return err } default: @@ -3435,14 +3758,14 @@ func awsRestjson1_deserializeOpDocumentDeleteReservationOutput(v **DeleteReserva return nil } -type awsRestjson1_deserializeOpDeleteSchedule struct { +type awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplate struct { } -func (*awsRestjson1_deserializeOpDeleteSchedule) ID() string { +func (*awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplate) 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) @@ -3456,15 +3779,21 @@ func (m *awsRestjson1_deserializeOpDeleteSchedule) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCloudWatchAlarmTemplate(response, &metadata) } - output := &DeleteScheduleOutput{} + output := &DeleteCloudWatchAlarmTemplateOutput{} out.Result = output + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteCloudWatchAlarmTemplate(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)} @@ -3505,18 +3834,15 @@ func awsRestjson1_deserializeOpErrorDeleteSchedule(response *smithyhttp.Response } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -3536,14 +3862,14 @@ func awsRestjson1_deserializeOpErrorDeleteSchedule(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteTags struct { +type awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplateGroup struct { } -func (*awsRestjson1_deserializeOpDeleteTags) ID() string { +func (*awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteCloudWatchAlarmTemplateGroup) 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) @@ -3557,9 +3883,9 @@ func (m *awsRestjson1_deserializeOpDeleteTags) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteTags(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteCloudWatchAlarmTemplateGroup(response, &metadata) } - output := &DeleteTagsOutput{} + output := &DeleteCloudWatchAlarmTemplateGroupOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3571,7 +3897,7 @@ func (m *awsRestjson1_deserializeOpDeleteTags) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteCloudWatchAlarmTemplateGroup(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)} @@ -3615,6 +3941,9 @@ func awsRestjson1_deserializeOpErrorDeleteTags(response *smithyhttp.Response, me case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -3624,6 +3953,9 @@ func awsRestjson1_deserializeOpErrorDeleteTags(response *smithyhttp.Response, me case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3634,14 +3966,14 @@ func awsRestjson1_deserializeOpErrorDeleteTags(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDescribeAccountConfiguration struct { +type awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplate struct { } -func (*awsRestjson1_deserializeOpDescribeAccountConfiguration) ID() string { +func (*awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeAccountConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplate) 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) @@ -3655,43 +3987,21 @@ func (m *awsRestjson1_deserializeOpDescribeAccountConfiguration) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAccountConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEventBridgeRuleTemplate(response, &metadata) } - output := &DescribeAccountConfigurationOutput{} + output := &DeleteEventBridgeRuleTemplateOutput{} 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 = awsRestjson1_deserializeOpDocumentDescribeAccountConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeAccountConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteEventBridgeRuleTemplate(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)} @@ -3732,21 +4042,21 @@ func awsRestjson1_deserializeOpErrorDescribeAccountConfiguration(response *smith } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -3760,50 +4070,14 @@ func awsRestjson1_deserializeOpErrorDescribeAccountConfiguration(response *smith } } -func awsRestjson1_deserializeOpDocumentDescribeAccountConfigurationOutput(v **DescribeAccountConfigurationOutput, 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 *DescribeAccountConfigurationOutput - if *v == nil { - sv = &DescribeAccountConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "accountConfiguration": - if err := awsRestjson1_deserializeDocumentAccountConfiguration(&sv.AccountConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeChannel struct { +type awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplateGroup struct { } -func (*awsRestjson1_deserializeOpDescribeChannel) ID() string { +func (*awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEventBridgeRuleTemplateGroup) 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) @@ -3817,43 +4091,119 @@ func (m *awsRestjson1_deserializeOpDescribeChannel) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEventBridgeRuleTemplateGroup(response, &metadata) } - output := &DescribeChannelOutput{} + output := &DeleteEventBridgeRuleTemplateGroupOutput{} out.Result = output + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteEventBridgeRuleTemplateGroup(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(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + 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 out, metadata, err + return err } - err = awsRestjson1_deserializeOpDocumentDescribeChannelOutput(&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(), + 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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteInput struct { +} + +func (*awsRestjson1_deserializeOpDeleteInput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteInput) 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_deserializeOpErrorDeleteInput(response, &metadata) } + output := &DeleteInputOutput{} + out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteInput(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)} @@ -3900,6 +4250,9 @@ func awsRestjson1_deserializeOpErrorDescribeChannel(response *smithyhttp.Respons case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -3925,171 +4278,115 @@ func awsRestjson1_deserializeOpErrorDescribeChannel(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentDescribeChannelOutput(v **DescribeChannelOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } +type awsRestjson1_deserializeOpDeleteInputSecurityGroup struct { +} - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } +func (*awsRestjson1_deserializeOpDeleteInputSecurityGroup) ID() string { + return "OperationDeserializer" +} - var sv *DescribeChannelOutput - if *v == nil { - sv = &DescribeChannelOutput{} - } else { - sv = *v +func (m *awsRestjson1_deserializeOpDeleteInputSecurityGroup) 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 } - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "cdiInputSpecification": - if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { - return err - } - - case "channelClass": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) - } - sv.ChannelClass = types.ChannelClass(jtv) - } - - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { - return err - } + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - case "egressEndpoints": - if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { - return err - } + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteInputSecurityGroup(response, &metadata) + } + output := &DeleteInputSecurityGroupOutput{} + out.Result = output - case "encoderSettings": - if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { - return err - } + return out, metadata, err +} - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } +func awsRestjson1_deserializeOpErrorDeleteInputSecurityGroup(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()) - case "inputAttachments": - if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { - return err - } + errorCode := "UnknownError" + errorMessage := errorCode - case "inputSpecification": - if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { - return err - } + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } - case "logLevel": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) - } - sv.LogLevel = types.LogLevel(jtv) - } + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - case "maintenance": - if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { - return err - } + 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 + } - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - case "pipelineDetails": - if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { - return err - } + switch { + case strings.EqualFold("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case "pipelinesRunningCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) - } + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case "roleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.RoleArn = ptr.String(jtv) - } + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) - } - sv.State = types.ChannelState(jtv) - } + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case "vpc": - if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { - return err - } + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - default: - _, _ = key, value + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + } - *v = sv - return nil } -type awsRestjson1_deserializeOpDescribeInput struct { +type awsRestjson1_deserializeOpDeleteMultiplex struct { } -func (*awsRestjson1_deserializeOpDescribeInput) ID() string { +func (*awsRestjson1_deserializeOpDeleteMultiplex) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeInput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteMultiplex) 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) @@ -4103,9 +4400,9 @@ func (m *awsRestjson1_deserializeOpDescribeInput) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeInput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteMultiplex(response, &metadata) } - output := &DescribeInputOutput{} + output := &DeleteMultiplexOutput{} out.Result = output var buff [1024]byte @@ -4126,7 +4423,7 @@ func (m *awsRestjson1_deserializeOpDescribeInput) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeInputOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteMultiplexOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4139,7 +4436,7 @@ func (m *awsRestjson1_deserializeOpDescribeInput) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeInput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteMultiplex(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)} @@ -4186,6 +4483,9 @@ func awsRestjson1_deserializeOpErrorDescribeInput(response *smithyhttp.Response, case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -4211,7 +4511,7 @@ func awsRestjson1_deserializeOpErrorDescribeInput(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteMultiplexOutput(v **DeleteMultiplexOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4224,9 +4524,9 @@ func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeInputOutput + var sv *DeleteMultiplexOutput if *v == nil { - sv = &DescribeInputOutput{} + sv = &DeleteMultiplexOutput{} } else { sv = *v } @@ -4242,13 +4542,13 @@ func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutp sv.Arn = ptr.String(jtv) } - case "attachedChannels": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AttachedChannels, value); err != nil { + case "availabilityZones": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { return err } case "destinations": - if err := awsRestjson1_deserializeDocument__listOfInputDestination(&sv.Destinations, value); err != nil { + if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { return err } @@ -4261,74 +4561,53 @@ func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutp sv.Id = ptr.String(jtv) } - case "inputClass": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InputClass to be of type string, got %T instead", value) - } - sv.InputClass = types.InputClass(jtv) - } - - case "inputDevices": - if err := awsRestjson1_deserializeDocument__listOfInputDeviceSettings(&sv.InputDevices, value); err != nil { - return err - } - - case "inputPartnerIds": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.InputPartnerIds, value); err != nil { + case "multiplexSettings": + if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { return err } - case "inputSourceType": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected InputSourceType to be of type string, got %T instead", value) + return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.InputSourceType = types.InputSourceType(jtv) + sv.Name = ptr.String(jtv) } - case "mediaConnectFlows": - if err := awsRestjson1_deserializeDocument__listOfMediaConnectFlow(&sv.MediaConnectFlows, value); err != nil { - return err - } - - case "name": + case "pipelinesRunningCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } - sv.Name = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) } - case "roleArn": + case "programCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) - } - - case "securityGroups": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.SecurityGroups, value); err != nil { - return err - } - - case "sources": - if err := awsRestjson1_deserializeDocument__listOfInputSource(&sv.Sources, value); err != nil { - return err + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProgramCount = ptr.Int32(int32(i64)) } case "state": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected InputState to be of type string, got %T instead", value) + return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) } - sv.State = types.InputState(jtv) + sv.State = types.MultiplexState(jtv) } case "tags": @@ -4336,15 +4615,6 @@ func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutp return err } - case "type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InputType to be of type string, got %T instead", value) - } - sv.Type = types.InputType(jtv) - } - default: _, _ = key, value @@ -4354,14 +4624,14 @@ func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutp return nil } -type awsRestjson1_deserializeOpDescribeInputDevice struct { +type awsRestjson1_deserializeOpDeleteMultiplexProgram struct { } -func (*awsRestjson1_deserializeOpDescribeInputDevice) ID() string { +func (*awsRestjson1_deserializeOpDeleteMultiplexProgram) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeInputDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteMultiplexProgram) 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) @@ -4375,9 +4645,9 @@ func (m *awsRestjson1_deserializeOpDescribeInputDevice) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeInputDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteMultiplexProgram(response, &metadata) } - output := &DescribeInputDeviceOutput{} + output := &DeleteMultiplexProgramOutput{} out.Result = output var buff [1024]byte @@ -4398,7 +4668,7 @@ func (m *awsRestjson1_deserializeOpDescribeInputDevice) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeInputDeviceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteMultiplexProgramOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4411,7 +4681,7 @@ func (m *awsRestjson1_deserializeOpDescribeInputDevice) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeInputDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteMultiplexProgram(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)} @@ -4458,6 +4728,9 @@ func awsRestjson1_deserializeOpErrorDescribeInputDevice(response *smithyhttp.Res case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -4483,7 +4756,7 @@ func awsRestjson1_deserializeOpErrorDescribeInputDevice(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentDescribeInputDeviceOutput(v **DescribeInputDeviceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteMultiplexProgramOutput(v **DeleteMultiplexProgramOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4496,137 +4769,46 @@ func awsRestjson1_deserializeOpDocumentDescribeInputDeviceOutput(v **DescribeInp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeInputDeviceOutput + var sv *DeleteMultiplexProgramOutput if *v == nil { - sv = &DescribeInputDeviceOutput{} + sv = &DeleteMultiplexProgramOutput{} } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "availabilityZone": + case "channelId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.AvailabilityZone = ptr.String(jtv) - } - - case "connectionState": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InputDeviceConnectionState to be of type string, got %T instead", value) - } - sv.ConnectionState = types.InputDeviceConnectionState(jtv) - } - - case "deviceSettingsSyncState": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeviceSettingsSyncState to be of type string, got %T instead", value) - } - sv.DeviceSettingsSyncState = types.DeviceSettingsSyncState(jtv) - } - - case "deviceUpdateStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeviceUpdateStatus to be of type string, got %T instead", value) - } - sv.DeviceUpdateStatus = types.DeviceUpdateStatus(jtv) + sv.ChannelId = ptr.String(jtv) } - case "hdDeviceSettings": - if err := awsRestjson1_deserializeDocumentInputDeviceHdSettings(&sv.HdDeviceSettings, value); err != nil { + case "multiplexProgramSettings": + if err := awsRestjson1_deserializeDocumentMultiplexProgramSettings(&sv.MultiplexProgramSettings, value); err != nil { return err } - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "macAddress": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.MacAddress = ptr.String(jtv) - } - - case "medialiveInputArns": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.MedialiveInputArns, value); err != nil { + case "packetIdentifiersMap": + if err := awsRestjson1_deserializeDocumentMultiplexProgramPacketIdentifiersMap(&sv.PacketIdentifiersMap, value); err != nil { return err } - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "networkSettings": - if err := awsRestjson1_deserializeDocumentInputDeviceNetworkSettings(&sv.NetworkSettings, value); err != nil { + case "pipelineDetails": + if err := awsRestjson1_deserializeDocument__listOfMultiplexProgramPipelineDetail(&sv.PipelineDetails, value); err != nil { return err } - case "outputType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InputDeviceOutputType to be of type string, got %T instead", value) - } - sv.OutputType = types.InputDeviceOutputType(jtv) - } - - case "serialNumber": + case "programName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.SerialNumber = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - case "type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InputDeviceType to be of type string, got %T instead", value) - } - sv.Type = types.InputDeviceType(jtv) - } - - case "uhdDeviceSettings": - if err := awsRestjson1_deserializeDocumentInputDeviceUhdSettings(&sv.UhdDeviceSettings, value); err != nil { - return err + sv.ProgramName = ptr.String(jtv) } default: @@ -4638,14 +4820,14 @@ func awsRestjson1_deserializeOpDocumentDescribeInputDeviceOutput(v **DescribeInp return nil } -type awsRestjson1_deserializeOpDescribeInputDeviceThumbnail struct { +type awsRestjson1_deserializeOpDeleteReservation struct { } -func (*awsRestjson1_deserializeOpDescribeInputDeviceThumbnail) ID() string { +func (*awsRestjson1_deserializeOpDeleteReservation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeInputDeviceThumbnail) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteReservation) 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) @@ -4659,25 +4841,43 @@ func (m *awsRestjson1_deserializeOpDescribeInputDeviceThumbnail) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeInputDeviceThumbnail(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteReservation(response, &metadata) } - output := &DescribeInputDeviceThumbnailOutput{} + output := &DeleteReservationOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsDescribeInputDeviceThumbnailOutput(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_deserializeOpDocumentDescribeInputDeviceThumbnailOutput(output, response.Body) + err = awsRestjson1_deserializeOpDocumentDeleteReservationOutput(&output, shape) if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + 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_deserializeOpErrorDescribeInputDeviceThumbnail(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteReservation(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)} @@ -4724,6 +4924,9 @@ func awsRestjson1_deserializeOpErrorDescribeInputDeviceThumbnail(response *smith case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -4749,58 +4952,5566 @@ func awsRestjson1_deserializeOpErrorDescribeInputDeviceThumbnail(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsDescribeInputDeviceThumbnailOutput(v *DescribeInputDeviceThumbnailOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpDocumentDeleteReservationOutput(v **DeleteReservationOutput, value interface{}) error { if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) } - - if headerValues := response.Header.Values("Content-Length"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseInt(headerValues[0], 0, 64) - if err != nil { - return err - } - v.ContentLength = ptr.Int64(vv) + if value == nil { + return nil } - if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ContentType = types.ContentType(headerValues[0]) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.ETag = ptr.String(headerValues[0]) + var sv *DeleteReservationOutput + if *v == nil { + sv = &DeleteReservationOutput{} + } else { + sv = *v } - if headerValues := response.Header.Values("Last-Modified"); len(headerValues) != 0 { + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = ptr.Int32(int32(i64)) + } + + case "currencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.CurrencyCode = ptr.String(jtv) + } + + case "duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "durationUnits": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OfferingDurationUnits to be of type string, got %T instead", value) + } + sv.DurationUnits = types.OfferingDurationUnits(jtv) + } + + case "end": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.End = ptr.String(jtv) + } + + case "fixedPrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FixedPrice = ptr.Float64(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) + + } + sv.FixedPrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "offeringDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OfferingDescription = ptr.String(jtv) + } + + case "offeringId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OfferingId = ptr.String(jtv) + } + + case "offeringType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OfferingType to be of type string, got %T instead", value) + } + sv.OfferingType = types.OfferingType(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "renewalSettings": + if err := awsRestjson1_deserializeDocumentRenewalSettings(&sv.RenewalSettings, value); err != nil { + return err + } + + case "reservationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ReservationId = ptr.String(jtv) + } + + case "resourceSpecification": + if err := awsRestjson1_deserializeDocumentReservationResourceSpecification(&sv.ResourceSpecification, value); err != nil { + return err + } + + case "start": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Start = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReservationState to be of type string, got %T instead", value) + } + sv.State = types.ReservationState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "usagePrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UsagePrice = ptr.Float64(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) + + } + sv.UsagePrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteSchedule struct { +} + +func (*awsRestjson1_deserializeOpDeleteSchedule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteSchedule) 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_deserializeOpErrorDeleteSchedule(response, &metadata) + } + output := &DeleteScheduleOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteSchedule(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteSignalMap struct { +} + +func (*awsRestjson1_deserializeOpDeleteSignalMap) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteSignalMap) 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_deserializeOpErrorDeleteSignalMap(response, &metadata) + } + output := &DeleteSignalMapOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteSignalMap(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteTags struct { +} + +func (*awsRestjson1_deserializeOpDeleteTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteTags) 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_deserializeOpErrorDeleteTags(response, &metadata) + } + output := &DeleteTagsOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteTags(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDescribeAccountConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDescribeAccountConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAccountConfiguration) 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_deserializeOpErrorDescribeAccountConfiguration(response, &metadata) + } + output := &DescribeAccountConfigurationOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeAccountConfigurationOutput(&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_deserializeOpErrorDescribeAccountConfiguration(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeAccountConfigurationOutput(v **DescribeAccountConfigurationOutput, 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 *DescribeAccountConfigurationOutput + if *v == nil { + sv = &DescribeAccountConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "accountConfiguration": + if err := awsRestjson1_deserializeDocumentAccountConfiguration(&sv.AccountConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeChannel struct { +} + +func (*awsRestjson1_deserializeOpDescribeChannel) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeChannel) 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_deserializeOpErrorDescribeChannel(response, &metadata) + } + output := &DescribeChannelOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeChannelOutput(&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_deserializeOpErrorDescribeChannel(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeChannelOutput(v **DescribeChannelOutput, 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 *DescribeChannelOutput + if *v == nil { + sv = &DescribeChannelOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cdiInputSpecification": + if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { + return err + } + + case "channelClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) + } + sv.ChannelClass = types.ChannelClass(jtv) + } + + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { + return err + } + + case "egressEndpoints": + if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { + return err + } + + case "encoderSettings": + if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "inputAttachments": + if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { + return err + } + + case "inputSpecification": + if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { + return err + } + + case "logLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } + + case "maintenance": + if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "pipelineDetails": + if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { + return err + } + + case "pipelinesRunningCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) + } + sv.State = types.ChannelState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "vpc": + if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeInput struct { +} + +func (*awsRestjson1_deserializeOpDescribeInput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeInput) 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_deserializeOpErrorDescribeInput(response, &metadata) + } + output := &DescribeInputOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeInputOutput(&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_deserializeOpErrorDescribeInput(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeInputOutput(v **DescribeInputOutput, 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 *DescribeInputOutput + if *v == nil { + sv = &DescribeInputOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "attachedChannels": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AttachedChannels, value); err != nil { + return err + } + + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfInputDestination(&sv.Destinations, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "inputClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputClass to be of type string, got %T instead", value) + } + sv.InputClass = types.InputClass(jtv) + } + + case "inputDevices": + if err := awsRestjson1_deserializeDocument__listOfInputDeviceSettings(&sv.InputDevices, value); err != nil { + return err + } + + case "inputPartnerIds": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.InputPartnerIds, value); err != nil { + return err + } + + case "inputSourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputSourceType to be of type string, got %T instead", value) + } + sv.InputSourceType = types.InputSourceType(jtv) + } + + case "mediaConnectFlows": + if err := awsRestjson1_deserializeDocument__listOfMediaConnectFlow(&sv.MediaConnectFlows, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "securityGroups": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.SecurityGroups, value); err != nil { + return err + } + + case "sources": + if err := awsRestjson1_deserializeDocument__listOfInputSource(&sv.Sources, value); err != nil { + return err + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputState to be of type string, got %T instead", value) + } + sv.State = types.InputState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputType to be of type string, got %T instead", value) + } + sv.Type = types.InputType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeInputDevice struct { +} + +func (*awsRestjson1_deserializeOpDescribeInputDevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeInputDevice) 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_deserializeOpErrorDescribeInputDevice(response, &metadata) + } + output := &DescribeInputDeviceOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeInputDeviceOutput(&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_deserializeOpErrorDescribeInputDevice(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeInputDeviceOutput(v **DescribeInputDeviceOutput, 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 *DescribeInputDeviceOutput + if *v == nil { + sv = &DescribeInputDeviceOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "availabilityZone": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.AvailabilityZone = ptr.String(jtv) + } + + case "connectionState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputDeviceConnectionState to be of type string, got %T instead", value) + } + sv.ConnectionState = types.InputDeviceConnectionState(jtv) + } + + case "deviceSettingsSyncState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceSettingsSyncState to be of type string, got %T instead", value) + } + sv.DeviceSettingsSyncState = types.DeviceSettingsSyncState(jtv) + } + + case "deviceUpdateStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DeviceUpdateStatus to be of type string, got %T instead", value) + } + sv.DeviceUpdateStatus = types.DeviceUpdateStatus(jtv) + } + + case "hdDeviceSettings": + if err := awsRestjson1_deserializeDocumentInputDeviceHdSettings(&sv.HdDeviceSettings, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "macAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.MacAddress = ptr.String(jtv) + } + + case "medialiveInputArns": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.MedialiveInputArns, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "networkSettings": + if err := awsRestjson1_deserializeDocumentInputDeviceNetworkSettings(&sv.NetworkSettings, value); err != nil { + return err + } + + case "outputType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputDeviceOutputType to be of type string, got %T instead", value) + } + sv.OutputType = types.InputDeviceOutputType(jtv) + } + + case "serialNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SerialNumber = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputDeviceType to be of type string, got %T instead", value) + } + sv.Type = types.InputDeviceType(jtv) + } + + case "uhdDeviceSettings": + if err := awsRestjson1_deserializeDocumentInputDeviceUhdSettings(&sv.UhdDeviceSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeInputDeviceThumbnail struct { +} + +func (*awsRestjson1_deserializeOpDescribeInputDeviceThumbnail) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeInputDeviceThumbnail) 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_deserializeOpErrorDescribeInputDeviceThumbnail(response, &metadata) + } + output := &DescribeInputDeviceThumbnailOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsDescribeInputDeviceThumbnailOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentDescribeInputDeviceThumbnailOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeInputDeviceThumbnail(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsDescribeInputDeviceThumbnailOutput(v *DescribeInputDeviceThumbnailOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Content-Length"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 64) + if err != nil { + return err + } + v.ContentLength = ptr.Int64(vv) + } + + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ContentType = types.ContentType(headerValues[0]) + } + + if headerValues := response.Header.Values("ETag"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.ETag = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("Last-Modified"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) t, err := smithytime.ParseHTTPDate(headerValues[0]) if err != nil { return err } - v.LastModified = ptr.Time(t) + v.LastModified = ptr.Time(t) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentDescribeInputDeviceThumbnailOutput(v *DescribeInputDeviceThumbnailOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + v.Body = body + return nil +} + +type awsRestjson1_deserializeOpDescribeInputSecurityGroup struct { +} + +func (*awsRestjson1_deserializeOpDescribeInputSecurityGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeInputSecurityGroup) 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_deserializeOpErrorDescribeInputSecurityGroup(response, &metadata) + } + output := &DescribeInputSecurityGroupOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeInputSecurityGroupOutput(&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_deserializeOpErrorDescribeInputSecurityGroup(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeInputSecurityGroupOutput(v **DescribeInputSecurityGroupOutput, 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 *DescribeInputSecurityGroupOutput + if *v == nil { + sv = &DescribeInputSecurityGroupOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "inputs": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Inputs, value); err != nil { + return err + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InputSecurityGroupState to be of type string, got %T instead", value) + } + sv.State = types.InputSecurityGroupState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "whitelistRules": + if err := awsRestjson1_deserializeDocument__listOfInputWhitelistRule(&sv.WhitelistRules, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeMultiplex struct { +} + +func (*awsRestjson1_deserializeOpDescribeMultiplex) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeMultiplex) 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_deserializeOpErrorDescribeMultiplex(response, &metadata) + } + output := &DescribeMultiplexOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeMultiplexOutput(&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_deserializeOpErrorDescribeMultiplex(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeMultiplexOutput(v **DescribeMultiplexOutput, 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 *DescribeMultiplexOutput + if *v == nil { + sv = &DescribeMultiplexOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "availabilityZones": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { + return err + } + + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "multiplexSettings": + if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "pipelinesRunningCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + } + + case "programCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProgramCount = ptr.Int32(int32(i64)) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) + } + sv.State = types.MultiplexState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeMultiplexProgram struct { +} + +func (*awsRestjson1_deserializeOpDescribeMultiplexProgram) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeMultiplexProgram) 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_deserializeOpErrorDescribeMultiplexProgram(response, &metadata) + } + output := &DescribeMultiplexProgramOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeMultiplexProgramOutput(&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_deserializeOpErrorDescribeMultiplexProgram(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeMultiplexProgramOutput(v **DescribeMultiplexProgramOutput, 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 *DescribeMultiplexProgramOutput + if *v == nil { + sv = &DescribeMultiplexProgramOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "channelId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ChannelId = ptr.String(jtv) + } + + case "multiplexProgramSettings": + if err := awsRestjson1_deserializeDocumentMultiplexProgramSettings(&sv.MultiplexProgramSettings, value); err != nil { + return err + } + + case "packetIdentifiersMap": + if err := awsRestjson1_deserializeDocumentMultiplexProgramPacketIdentifiersMap(&sv.PacketIdentifiersMap, value); err != nil { + return err + } + + case "pipelineDetails": + if err := awsRestjson1_deserializeDocument__listOfMultiplexProgramPipelineDetail(&sv.PipelineDetails, value); err != nil { + return err + } + + case "programName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ProgramName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeOffering struct { +} + +func (*awsRestjson1_deserializeOpDescribeOffering) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeOffering) 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_deserializeOpErrorDescribeOffering(response, &metadata) + } + output := &DescribeOfferingOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(&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_deserializeOpErrorDescribeOffering(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferingOutput, 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 *DescribeOfferingOutput + if *v == nil { + sv = &DescribeOfferingOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "currencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.CurrencyCode = ptr.String(jtv) + } + + case "duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "durationUnits": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OfferingDurationUnits to be of type string, got %T instead", value) + } + sv.DurationUnits = types.OfferingDurationUnits(jtv) + } + + case "fixedPrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FixedPrice = ptr.Float64(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) + + } + sv.FixedPrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "offeringDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OfferingDescription = ptr.String(jtv) + } + + case "offeringId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OfferingId = ptr.String(jtv) + } + + case "offeringType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OfferingType to be of type string, got %T instead", value) + } + sv.OfferingType = types.OfferingType(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "resourceSpecification": + if err := awsRestjson1_deserializeDocumentReservationResourceSpecification(&sv.ResourceSpecification, value); err != nil { + return err + } + + case "usagePrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UsagePrice = ptr.Float64(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) + + } + sv.UsagePrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeReservation struct { +} + +func (*awsRestjson1_deserializeOpDescribeReservation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeReservation) 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_deserializeOpErrorDescribeReservation(response, &metadata) + } + output := &DescribeReservationOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeReservationOutput(&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_deserializeOpErrorDescribeReservation(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeReservationOutput, 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 *DescribeReservationOutput + if *v == nil { + sv = &DescribeReservationOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "count": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Count = ptr.Int32(int32(i64)) + } + + case "currencyCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.CurrencyCode = ptr.String(jtv) + } + + case "duration": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Duration = ptr.Int32(int32(i64)) + } + + case "durationUnits": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OfferingDurationUnits to be of type string, got %T instead", value) + } + sv.DurationUnits = types.OfferingDurationUnits(jtv) + } + + case "end": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.End = ptr.String(jtv) + } + + case "fixedPrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FixedPrice = ptr.Float64(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) + + } + sv.FixedPrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "offeringDescription": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OfferingDescription = ptr.String(jtv) + } + + case "offeringId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OfferingId = ptr.String(jtv) + } + + case "offeringType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OfferingType to be of type string, got %T instead", value) + } + sv.OfferingType = types.OfferingType(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "renewalSettings": + if err := awsRestjson1_deserializeDocumentRenewalSettings(&sv.RenewalSettings, value); err != nil { + return err + } + + case "reservationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ReservationId = ptr.String(jtv) + } + + case "resourceSpecification": + if err := awsRestjson1_deserializeDocumentReservationResourceSpecification(&sv.ResourceSpecification, value); err != nil { + return err + } + + case "start": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Start = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReservationState to be of type string, got %T instead", value) + } + sv.State = types.ReservationState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "usagePrice": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.UsagePrice = ptr.Float64(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) + + } + sv.UsagePrice = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeSchedule struct { +} + +func (*awsRestjson1_deserializeOpDescribeSchedule) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeSchedule) 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_deserializeOpErrorDescribeSchedule(response, &metadata) + } + output := &DescribeScheduleOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeScheduleOutput(&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_deserializeOpErrorDescribeSchedule(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeScheduleOutput(v **DescribeScheduleOutput, 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 *DescribeScheduleOutput + if *v == nil { + sv = &DescribeScheduleOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "scheduleActions": + if err := awsRestjson1_deserializeDocument__listOfScheduleAction(&sv.ScheduleActions, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeThumbnails struct { +} + +func (*awsRestjson1_deserializeOpDescribeThumbnails) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeThumbnails) 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_deserializeOpErrorDescribeThumbnails(response, &metadata) + } + output := &DescribeThumbnailsOutput{} + 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 = awsRestjson1_deserializeOpDocumentDescribeThumbnailsOutput(&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_deserializeOpErrorDescribeThumbnails(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeThumbnailsOutput(v **DescribeThumbnailsOutput, 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 *DescribeThumbnailsOutput + if *v == nil { + sv = &DescribeThumbnailsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "thumbnailDetails": + if err := awsRestjson1_deserializeDocument__listOfThumbnailDetail(&sv.ThumbnailDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetCloudWatchAlarmTemplate struct { +} + +func (*awsRestjson1_deserializeOpGetCloudWatchAlarmTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetCloudWatchAlarmTemplate) 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_deserializeOpErrorGetCloudWatchAlarmTemplate(response, &metadata) + } + output := &GetCloudWatchAlarmTemplateOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetCloudWatchAlarmTemplateOutput(&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_deserializeOpErrorGetCloudWatchAlarmTemplate(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetCloudWatchAlarmTemplateOutput(v **GetCloudWatchAlarmTemplateOutput, 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 *GetCloudWatchAlarmTemplateOutput + if *v == nil { + sv = &GetCloudWatchAlarmTemplateOutput{} + } 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 __stringPatternArnMedialiveCloudwatchAlarmTemplate to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "comparisonOperator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateComparisonOperator to be of type string, got %T instead", value) + } + sv.ComparisonOperator = types.CloudWatchAlarmTemplateComparisonOperator(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "datapointsToAlarm": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DatapointsToAlarm = ptr.Int32(int32(i64)) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "evaluationPeriods": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EvaluationPeriods = ptr.Int32(int32(i64)) + } + + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax64 to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "period": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin10Max86400 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Period = ptr.Int32(int32(i64)) + } + + case "statistic": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateStatistic to be of type string, got %T instead", value) + } + sv.Statistic = types.CloudWatchAlarmTemplateStatistic(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "targetResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateTargetResourceType to be of type string, got %T instead", value) + } + sv.TargetResourceType = types.CloudWatchAlarmTemplateTargetResourceType(jtv) + } + + case "threshold": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Threshold = ptr.Float64(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) + + } + sv.Threshold = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "treatMissingData": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateTreatMissingData to be of type string, got %T instead", value) + } + sv.TreatMissingData = types.CloudWatchAlarmTemplateTreatMissingData(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetCloudWatchAlarmTemplateGroup struct { +} + +func (*awsRestjson1_deserializeOpGetCloudWatchAlarmTemplateGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetCloudWatchAlarmTemplateGroup) 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_deserializeOpErrorGetCloudWatchAlarmTemplateGroup(response, &metadata) + } + output := &GetCloudWatchAlarmTemplateGroupOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetCloudWatchAlarmTemplateGroupOutput(&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_deserializeOpErrorGetCloudWatchAlarmTemplateGroup(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetCloudWatchAlarmTemplateGroupOutput(v **GetCloudWatchAlarmTemplateGroupOutput, 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 *GetCloudWatchAlarmTemplateGroupOutput + if *v == nil { + sv = &GetCloudWatchAlarmTemplateGroupOutput{} + } 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 __stringPatternArnMedialiveCloudwatchAlarmTemplateGroup to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetEventBridgeRuleTemplate struct { +} + +func (*awsRestjson1_deserializeOpGetEventBridgeRuleTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetEventBridgeRuleTemplate) 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_deserializeOpErrorGetEventBridgeRuleTemplate(response, &metadata) + } + output := &GetEventBridgeRuleTemplateOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetEventBridgeRuleTemplateOutput(&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_deserializeOpErrorGetEventBridgeRuleTemplate(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetEventBridgeRuleTemplateOutput(v **GetEventBridgeRuleTemplateOutput, 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 *GetEventBridgeRuleTemplateOutput + if *v == nil { + sv = &GetEventBridgeRuleTemplateOutput{} + } 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 __stringPatternArnMedialiveEventbridgeRuleTemplate to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "eventTargets": + if err := awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateTarget(&sv.EventTargets, value); err != nil { + return err + } + + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventBridgeRuleTemplateEventType to be of type string, got %T instead", value) + } + sv.EventType = types.EventBridgeRuleTemplateEventType(jtv) + } + + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetEventBridgeRuleTemplateGroup struct { +} + +func (*awsRestjson1_deserializeOpGetEventBridgeRuleTemplateGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetEventBridgeRuleTemplateGroup) 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_deserializeOpErrorGetEventBridgeRuleTemplateGroup(response, &metadata) + } + output := &GetEventBridgeRuleTemplateGroupOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetEventBridgeRuleTemplateGroupOutput(&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_deserializeOpErrorGetEventBridgeRuleTemplateGroup(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetEventBridgeRuleTemplateGroupOutput(v **GetEventBridgeRuleTemplateGroupOutput, 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 *GetEventBridgeRuleTemplateGroupOutput + if *v == nil { + sv = &GetEventBridgeRuleTemplateGroupOutput{} + } 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 __stringPatternArnMedialiveEventbridgeRuleTemplateGroup to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetSignalMap struct { +} + +func (*awsRestjson1_deserializeOpGetSignalMap) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSignalMap) 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_deserializeOpErrorGetSignalMap(response, &metadata) + } + output := &GetSignalMapOutput{} + 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 = awsRestjson1_deserializeOpDocumentGetSignalMapOutput(&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_deserializeOpErrorGetSignalMap(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetSignalMapOutput(v **GetSignalMapOutput, 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 *GetSignalMapOutput + if *v == nil { + sv = &GetSignalMapOutput{} + } 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 __stringPatternArnMedialiveSignalMap to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cloudWatchAlarmTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.CloudWatchAlarmTemplateGroupIds, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "discoveryEntryPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.DiscoveryEntryPointArn = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "eventBridgeRuleTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.EventBridgeRuleTemplateGroupIds, value); err != nil { + return err + } + + case "failedMediaResourceMap": + if err := awsRestjson1_deserializeDocumentFailedMediaResourceMap(&sv.FailedMediaResourceMap, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastDiscoveredAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastDiscoveredAt = ptr.Time(t) + } + + case "lastSuccessfulMonitorDeployment": + if err := awsRestjson1_deserializeDocumentSuccessfulMonitorDeployment(&sv.LastSuccessfulMonitorDeployment, value); err != nil { + return err + } + + case "mediaResourceMap": + if err := awsRestjson1_deserializeDocumentMediaResourceMap(&sv.MediaResourceMap, value); err != nil { + return err + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "monitorChangesPendingDeployment": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.MonitorChangesPendingDeployment = ptr.Bool(jtv) + } + + case "monitorDeployment": + if err := awsRestjson1_deserializeDocumentMonitorDeployment(&sv.MonitorDeployment, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListChannels struct { +} + +func (*awsRestjson1_deserializeOpListChannels) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListChannels) 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_deserializeOpErrorListChannels(response, &metadata) + } + output := &ListChannelsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListChannelsOutput(&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_deserializeOpErrorListChannels(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, 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 *ListChannelsOutput + if *v == nil { + sv = &ListChannelsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "channels": + if err := awsRestjson1_deserializeDocument__listOfChannelSummary(&sv.Channels, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCloudWatchAlarmTemplateGroups struct { +} + +func (*awsRestjson1_deserializeOpListCloudWatchAlarmTemplateGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCloudWatchAlarmTemplateGroups) 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_deserializeOpErrorListCloudWatchAlarmTemplateGroups(response, &metadata) + } + output := &ListCloudWatchAlarmTemplateGroupsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListCloudWatchAlarmTemplateGroupsOutput(&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_deserializeOpErrorListCloudWatchAlarmTemplateGroups(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCloudWatchAlarmTemplateGroupsOutput(v **ListCloudWatchAlarmTemplateGroupsOutput, 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 *ListCloudWatchAlarmTemplateGroupsOutput + if *v == nil { + sv = &ListCloudWatchAlarmTemplateGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cloudWatchAlarmTemplateGroups": + if err := awsRestjson1_deserializeDocument__listOfCloudWatchAlarmTemplateGroupSummary(&sv.CloudWatchAlarmTemplateGroups, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListCloudWatchAlarmTemplates struct { +} + +func (*awsRestjson1_deserializeOpListCloudWatchAlarmTemplates) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListCloudWatchAlarmTemplates) 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_deserializeOpErrorListCloudWatchAlarmTemplates(response, &metadata) + } + output := &ListCloudWatchAlarmTemplatesOutput{} + 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 = awsRestjson1_deserializeOpDocumentListCloudWatchAlarmTemplatesOutput(&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_deserializeOpErrorListCloudWatchAlarmTemplates(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListCloudWatchAlarmTemplatesOutput(v **ListCloudWatchAlarmTemplatesOutput, 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 *ListCloudWatchAlarmTemplatesOutput + if *v == nil { + sv = &ListCloudWatchAlarmTemplatesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cloudWatchAlarmTemplates": + if err := awsRestjson1_deserializeDocument__listOfCloudWatchAlarmTemplateSummary(&sv.CloudWatchAlarmTemplates, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEventBridgeRuleTemplateGroups struct { +} + +func (*awsRestjson1_deserializeOpListEventBridgeRuleTemplateGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListEventBridgeRuleTemplateGroups) 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_deserializeOpErrorListEventBridgeRuleTemplateGroups(response, &metadata) + } + output := &ListEventBridgeRuleTemplateGroupsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListEventBridgeRuleTemplateGroupsOutput(&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_deserializeOpErrorListEventBridgeRuleTemplateGroups(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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListEventBridgeRuleTemplateGroupsOutput(v **ListEventBridgeRuleTemplateGroupsOutput, 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 *ListEventBridgeRuleTemplateGroupsOutput + if *v == nil { + sv = &ListEventBridgeRuleTemplateGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventBridgeRuleTemplateGroups": + if err := awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateGroupSummary(&sv.EventBridgeRuleTemplateGroups, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListEventBridgeRuleTemplates struct { +} + +func (*awsRestjson1_deserializeOpListEventBridgeRuleTemplates) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListEventBridgeRuleTemplates) 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_deserializeOpErrorListEventBridgeRuleTemplates(response, &metadata) + } + output := &ListEventBridgeRuleTemplatesOutput{} + 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 = awsRestjson1_deserializeOpDocumentListEventBridgeRuleTemplatesOutput(&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_deserializeOpErrorListEventBridgeRuleTemplates(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 } - return nil + 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("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } } -func awsRestjson1_deserializeOpDocumentDescribeInputDeviceThumbnailOutput(v *DescribeInputDeviceThumbnailOutput, body io.ReadCloser) error { + +func awsRestjson1_deserializeOpDocumentListEventBridgeRuleTemplatesOutput(v **ListEventBridgeRuleTemplatesOutput, value interface{}) error { if v == nil { - return fmt.Errorf("unsupported deserialization of nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - v.Body = body + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListEventBridgeRuleTemplatesOutput + if *v == nil { + sv = &ListEventBridgeRuleTemplatesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eventBridgeRuleTemplates": + if err := awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateSummary(&sv.EventBridgeRuleTemplates, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv return nil } -type awsRestjson1_deserializeOpDescribeInputSecurityGroup struct { +type awsRestjson1_deserializeOpListInputDevices struct { } -func (*awsRestjson1_deserializeOpDescribeInputSecurityGroup) ID() string { +func (*awsRestjson1_deserializeOpListInputDevices) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeInputSecurityGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListInputDevices) 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) @@ -4814,9 +10525,9 @@ func (m *awsRestjson1_deserializeOpDescribeInputSecurityGroup) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeInputSecurityGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListInputDevices(response, &metadata) } - output := &DescribeInputSecurityGroupOutput{} + output := &ListInputDevicesOutput{} out.Result = output var buff [1024]byte @@ -4837,7 +10548,7 @@ func (m *awsRestjson1_deserializeOpDescribeInputSecurityGroup) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeInputSecurityGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListInputDevicesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4850,7 +10561,7 @@ func (m *awsRestjson1_deserializeOpDescribeInputSecurityGroup) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeInputSecurityGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListInputDevices(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)} @@ -4906,9 +10617,6 @@ func awsRestjson1_deserializeOpErrorDescribeInputSecurityGroup(response *smithyh case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -4922,7 +10630,7 @@ func awsRestjson1_deserializeOpErrorDescribeInputSecurityGroup(response *smithyh } } -func awsRestjson1_deserializeOpDocumentDescribeInputSecurityGroupOutput(v **DescribeInputSecurityGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListInputDevicesOutput(v **ListInputDevicesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4935,55 +10643,27 @@ func awsRestjson1_deserializeOpDocumentDescribeInputSecurityGroupOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeInputSecurityGroupOutput + var sv *ListInputDevicesOutput if *v == nil { - sv = &DescribeInputSecurityGroupOutput{} + sv = &ListInputDevicesOutput{} } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "inputs": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Inputs, value); err != nil { + case "inputDevices": + if err := awsRestjson1_deserializeDocument__listOfInputDeviceSummary(&sv.InputDevices, value); err != nil { return err } - case "state": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected InputSecurityGroupState to be of type string, got %T instead", value) + return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.State = types.InputSecurityGroupState(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - case "whitelistRules": - if err := awsRestjson1_deserializeDocument__listOfInputWhitelistRule(&sv.WhitelistRules, value); err != nil { - return err + sv.NextToken = ptr.String(jtv) } default: @@ -4995,14 +10675,14 @@ func awsRestjson1_deserializeOpDocumentDescribeInputSecurityGroupOutput(v **Desc return nil } -type awsRestjson1_deserializeOpDescribeMultiplex struct { +type awsRestjson1_deserializeOpListInputDeviceTransfers struct { } -func (*awsRestjson1_deserializeOpDescribeMultiplex) ID() string { +func (*awsRestjson1_deserializeOpListInputDeviceTransfers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeMultiplex) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListInputDeviceTransfers) 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) @@ -5016,9 +10696,9 @@ func (m *awsRestjson1_deserializeOpDescribeMultiplex) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeMultiplex(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListInputDeviceTransfers(response, &metadata) } - output := &DescribeMultiplexOutput{} + output := &ListInputDeviceTransfersOutput{} out.Result = output var buff [1024]byte @@ -5039,7 +10719,7 @@ func (m *awsRestjson1_deserializeOpDescribeMultiplex) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeMultiplexOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListInputDeviceTransfersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5052,7 +10732,7 @@ func (m *awsRestjson1_deserializeOpDescribeMultiplex) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeMultiplex(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListInputDeviceTransfers(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)} @@ -5108,12 +10788,12 @@ func awsRestjson1_deserializeOpErrorDescribeMultiplex(response *smithyhttp.Respo case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5124,7 +10804,7 @@ func awsRestjson1_deserializeOpErrorDescribeMultiplex(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentDescribeMultiplexOutput(v **DescribeMultiplexOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListInputDeviceTransfersOutput(v **ListInputDeviceTransfersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5137,95 +10817,27 @@ func awsRestjson1_deserializeOpDocumentDescribeMultiplexOutput(v **DescribeMulti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeMultiplexOutput + var sv *ListInputDeviceTransfersOutput if *v == nil { - sv = &DescribeMultiplexOutput{} + sv = &ListInputDeviceTransfersOutput{} } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "availabilityZones": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { - return err - } - - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { - return err - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "multiplexSettings": - if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "pipelinesRunningCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) - } - - case "programCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ProgramCount = ptr.Int32(int32(i64)) + } + + for key, value := range shape { + switch key { + case "inputDeviceTransfers": + if err := awsRestjson1_deserializeDocument__listOfTransferringInputDeviceSummary(&sv.InputDeviceTransfers, value); err != nil { + return err } - case "state": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) + return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.State = types.MultiplexState(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err + sv.NextToken = ptr.String(jtv) } default: @@ -5237,14 +10849,14 @@ func awsRestjson1_deserializeOpDocumentDescribeMultiplexOutput(v **DescribeMulti return nil } -type awsRestjson1_deserializeOpDescribeMultiplexProgram struct { +type awsRestjson1_deserializeOpListInputs struct { } -func (*awsRestjson1_deserializeOpDescribeMultiplexProgram) ID() string { +func (*awsRestjson1_deserializeOpListInputs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeMultiplexProgram) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListInputs) 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) @@ -5258,9 +10870,9 @@ func (m *awsRestjson1_deserializeOpDescribeMultiplexProgram) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeMultiplexProgram(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListInputs(response, &metadata) } - output := &DescribeMultiplexProgramOutput{} + output := &ListInputsOutput{} out.Result = output var buff [1024]byte @@ -5281,7 +10893,7 @@ func (m *awsRestjson1_deserializeOpDescribeMultiplexProgram) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeMultiplexProgramOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListInputsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5294,7 +10906,7 @@ func (m *awsRestjson1_deserializeOpDescribeMultiplexProgram) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeMultiplexProgram(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListInputs(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)} @@ -5350,9 +10962,6 @@ func awsRestjson1_deserializeOpErrorDescribeMultiplexProgram(response *smithyhtt case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -5366,7 +10975,7 @@ func awsRestjson1_deserializeOpErrorDescribeMultiplexProgram(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentDescribeMultiplexProgramOutput(v **DescribeMultiplexProgramOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListInputsOutput(v **ListInputsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5379,46 +10988,27 @@ func awsRestjson1_deserializeOpDocumentDescribeMultiplexProgramOutput(v **Descri return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeMultiplexProgramOutput + var sv *ListInputsOutput if *v == nil { - sv = &DescribeMultiplexProgramOutput{} + sv = &ListInputsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "channelId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.ChannelId = ptr.String(jtv) - } - - case "multiplexProgramSettings": - if err := awsRestjson1_deserializeDocumentMultiplexProgramSettings(&sv.MultiplexProgramSettings, value); err != nil { - return err - } - - case "packetIdentifiersMap": - if err := awsRestjson1_deserializeDocumentMultiplexProgramPacketIdentifiersMap(&sv.PacketIdentifiersMap, value); err != nil { - return err - } - - case "pipelineDetails": - if err := awsRestjson1_deserializeDocument__listOfMultiplexProgramPipelineDetail(&sv.PipelineDetails, value); err != nil { + case "inputs": + if err := awsRestjson1_deserializeDocument__listOfInput(&sv.Inputs, value); err != nil { return err } - case "programName": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.ProgramName = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -5430,14 +11020,14 @@ func awsRestjson1_deserializeOpDocumentDescribeMultiplexProgramOutput(v **Descri return nil } -type awsRestjson1_deserializeOpDescribeOffering struct { +type awsRestjson1_deserializeOpListInputSecurityGroups struct { } -func (*awsRestjson1_deserializeOpDescribeOffering) ID() string { +func (*awsRestjson1_deserializeOpListInputSecurityGroups) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListInputSecurityGroups) 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) @@ -5451,9 +11041,9 @@ func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeOffering(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListInputSecurityGroups(response, &metadata) } - output := &DescribeOfferingOutput{} + output := &ListInputSecurityGroupsOutput{} out.Result = output var buff [1024]byte @@ -5474,7 +11064,7 @@ func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListInputSecurityGroupsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5487,7 +11077,7 @@ func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeOffering(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListInputSecurityGroups(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)} @@ -5543,9 +11133,6 @@ func awsRestjson1_deserializeOpErrorDescribeOffering(response *smithyhttp.Respon case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -5559,7 +11146,7 @@ func awsRestjson1_deserializeOpErrorDescribeOffering(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListInputSecurityGroupsOutput(v **ListInputSecurityGroupsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5572,162 +11159,198 @@ func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeOfferingOutput + var sv *ListInputSecurityGroupsOutput if *v == nil { - sv = &DescribeOfferingOutput{} + sv = &ListInputSecurityGroupsOutput{} } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) + case "inputSecurityGroups": + if err := awsRestjson1_deserializeDocument__listOfInputSecurityGroup(&sv.InputSecurityGroups, value); err != nil { + return err } - case "currencyCode": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.CurrencyCode = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "duration": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Duration = ptr.Int32(int32(i64)) - } + default: + _, _ = key, value - case "durationUnits": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OfferingDurationUnits to be of type string, got %T instead", value) - } - sv.DurationUnits = types.OfferingDurationUnits(jtv) - } + } + } + *v = sv + return nil +} - case "fixedPrice": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.FixedPrice = ptr.Float64(f64) +type awsRestjson1_deserializeOpListMultiplexes struct { +} - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() +func (*awsRestjson1_deserializeOpListMultiplexes) ID() string { + return "OperationDeserializer" +} - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) +func (m *awsRestjson1_deserializeOpListMultiplexes) 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 + } - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListMultiplexes(response, &metadata) + } + output := &ListMultiplexesOutput{} + out.Result = output - } - sv.FixedPrice = ptr.Float64(f64) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + 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 + } - case "offeringDescription": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.OfferingDescription = ptr.String(jtv) - } + err = awsRestjson1_deserializeOpDocumentListMultiplexesOutput(&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_deserializeOpErrorListMultiplexes(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case "offeringId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.OfferingId = ptr.String(jtv) - } + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case "offeringType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OfferingType to be of type string, got %T instead", value) - } - sv.OfferingType = types.OfferingType(jtv) - } + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case "region": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Region = ptr.String(jtv) - } + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case "resourceSpecification": - if err := awsRestjson1_deserializeDocumentReservationResourceSpecification(&sv.ResourceSpecification, value); err != nil { - return err - } + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case "usagePrice": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UsagePrice = ptr.Float64(f64) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + } +} - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) +func awsRestjson1_deserializeOpDocumentListMultiplexesOutput(v **ListMultiplexesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - } - sv.UsagePrice = ptr.Float64(f64) + var sv *ListMultiplexesOutput + if *v == nil { + sv = &ListMultiplexesOutput{} + } else { + sv = *v + } - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + for key, value := range shape { + switch key { + case "multiplexes": + if err := awsRestjson1_deserializeDocument__listOfMultiplexSummary(&sv.Multiplexes, value); err != nil { + return err + } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) } + sv.NextToken = ptr.String(jtv) } default: @@ -5739,14 +11362,14 @@ func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferi return nil } -type awsRestjson1_deserializeOpDescribeReservation struct { +type awsRestjson1_deserializeOpListMultiplexPrograms struct { } -func (*awsRestjson1_deserializeOpDescribeReservation) ID() string { +func (*awsRestjson1_deserializeOpListMultiplexPrograms) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListMultiplexPrograms) 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) @@ -5760,9 +11383,9 @@ func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeReservation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListMultiplexPrograms(response, &metadata) } - output := &DescribeReservationOutput{} + output := &ListMultiplexProgramsOutput{} out.Result = output var buff [1024]byte @@ -5783,7 +11406,7 @@ func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeReservationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListMultiplexProgramsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5796,7 +11419,7 @@ func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListMultiplexPrograms(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)} @@ -5868,7 +11491,7 @@ func awsRestjson1_deserializeOpErrorDescribeReservation(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeReservationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListMultiplexProgramsOutput(v **ListMultiplexProgramsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5881,232 +11504,200 @@ func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeRes return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeReservationOutput + var sv *ListMultiplexProgramsOutput if *v == nil { - sv = &DescribeReservationOutput{} + sv = &ListMultiplexProgramsOutput{} } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "count": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Count = ptr.Int32(int32(i64)) + case "multiplexPrograms": + if err := awsRestjson1_deserializeDocument__listOfMultiplexProgramSummary(&sv.MultiplexPrograms, value); err != nil { + return err } - case "currencyCode": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.CurrencyCode = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } - case "duration": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Duration = ptr.Int32(int32(i64)) - } + default: + _, _ = key, value - case "durationUnits": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OfferingDurationUnits to be of type string, got %T instead", value) - } - sv.DurationUnits = types.OfferingDurationUnits(jtv) - } + } + } + *v = sv + return nil +} - case "end": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.End = ptr.String(jtv) - } +type awsRestjson1_deserializeOpListOfferings struct { +} - case "fixedPrice": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.FixedPrice = ptr.Float64(f64) +func (*awsRestjson1_deserializeOpListOfferings) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListOfferings) 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_deserializeOpErrorListOfferings(response, &metadata) + } + output := &ListOfferingsOutput{} + 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 = awsRestjson1_deserializeOpDocumentListOfferingsOutput(&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_deserializeOpErrorListOfferings(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 - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + 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 + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - } - sv.FixedPrice = ptr.Float64(f64) + switch { + case strings.EqualFold("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - } - } + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case "offeringDescription": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.OfferingDescription = ptr.String(jtv) - } + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case "offeringId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.OfferingId = ptr.String(jtv) - } + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case "offeringType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OfferingType to be of type string, got %T instead", value) - } - sv.OfferingType = types.OfferingType(jtv) - } + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case "region": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Region = ptr.String(jtv) - } + } +} - case "renewalSettings": - if err := awsRestjson1_deserializeDocumentRenewalSettings(&sv.RenewalSettings, value); err != nil { - return err - } +func awsRestjson1_deserializeOpDocumentListOfferingsOutput(v **ListOfferingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "reservationId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.ReservationId = ptr.String(jtv) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "resourceSpecification": - if err := awsRestjson1_deserializeDocumentReservationResourceSpecification(&sv.ResourceSpecification, value); err != nil { - return err - } + var sv *ListOfferingsOutput + if *v == nil { + sv = &ListOfferingsOutput{} + } else { + sv = *v + } - case "start": + for key, value := range shape { + switch key { + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.Start = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReservationState to be of type string, got %T instead", value) - } - sv.State = types.ReservationState(jtv) + sv.NextToken = ptr.String(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + case "offerings": + if err := awsRestjson1_deserializeDocument__listOfOffering(&sv.Offerings, value); err != nil { return err } - case "usagePrice": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.UsagePrice = ptr.Float64(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) - - } - sv.UsagePrice = ptr.Float64(f64) - - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) - - } - } - default: _, _ = key, value @@ -6116,14 +11707,14 @@ func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeRes return nil } -type awsRestjson1_deserializeOpDescribeSchedule struct { +type awsRestjson1_deserializeOpListReservations struct { } -func (*awsRestjson1_deserializeOpDescribeSchedule) ID() string { +func (*awsRestjson1_deserializeOpListReservations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeSchedule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListReservations) 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) @@ -6137,9 +11728,9 @@ func (m *awsRestjson1_deserializeOpDescribeSchedule) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeSchedule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListReservations(response, &metadata) } - output := &DescribeScheduleOutput{} + output := &ListReservationsOutput{} out.Result = output var buff [1024]byte @@ -6160,7 +11751,7 @@ func (m *awsRestjson1_deserializeOpDescribeSchedule) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeScheduleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListReservationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6173,7 +11764,7 @@ func (m *awsRestjson1_deserializeOpDescribeSchedule) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeSchedule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListReservations(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)} @@ -6229,9 +11820,6 @@ func awsRestjson1_deserializeOpErrorDescribeSchedule(response *smithyhttp.Respon case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6245,7 +11833,7 @@ func awsRestjson1_deserializeOpErrorDescribeSchedule(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDescribeScheduleOutput(v **DescribeScheduleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListReservationsOutput(v **ListReservationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6258,9 +11846,9 @@ func awsRestjson1_deserializeOpDocumentDescribeScheduleOutput(v **DescribeSchedu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeScheduleOutput + var sv *ListReservationsOutput if *v == nil { - sv = &DescribeScheduleOutput{} + sv = &ListReservationsOutput{} } else { sv = *v } @@ -6276,8 +11864,8 @@ func awsRestjson1_deserializeOpDocumentDescribeScheduleOutput(v **DescribeSchedu sv.NextToken = ptr.String(jtv) } - case "scheduleActions": - if err := awsRestjson1_deserializeDocument__listOfScheduleAction(&sv.ScheduleActions, value); err != nil { + case "reservations": + if err := awsRestjson1_deserializeDocument__listOfReservation(&sv.Reservations, value); err != nil { return err } @@ -6290,14 +11878,14 @@ func awsRestjson1_deserializeOpDocumentDescribeScheduleOutput(v **DescribeSchedu return nil } -type awsRestjson1_deserializeOpDescribeThumbnails struct { +type awsRestjson1_deserializeOpListSignalMaps struct { } -func (*awsRestjson1_deserializeOpDescribeThumbnails) ID() string { +func (*awsRestjson1_deserializeOpListSignalMaps) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeThumbnails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSignalMaps) 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) @@ -6311,9 +11899,9 @@ func (m *awsRestjson1_deserializeOpDescribeThumbnails) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeThumbnails(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSignalMaps(response, &metadata) } - output := &DescribeThumbnailsOutput{} + output := &ListSignalMapsOutput{} out.Result = output var buff [1024]byte @@ -6334,7 +11922,7 @@ func (m *awsRestjson1_deserializeOpDescribeThumbnails) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeThumbnailsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSignalMapsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6347,7 +11935,7 @@ func (m *awsRestjson1_deserializeOpDescribeThumbnails) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeThumbnails(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSignalMaps(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)} @@ -6388,21 +11976,12 @@ func awsRestjson1_deserializeOpErrorDescribeThumbnails(response *smithyhttp.Resp } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -6422,7 +12001,7 @@ func awsRestjson1_deserializeOpErrorDescribeThumbnails(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentDescribeThumbnailsOutput(v **DescribeThumbnailsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSignalMapsOutput(v **ListSignalMapsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6435,17 +12014,26 @@ func awsRestjson1_deserializeOpDocumentDescribeThumbnailsOutput(v **DescribeThum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeThumbnailsOutput + var sv *ListSignalMapsOutput if *v == nil { - sv = &DescribeThumbnailsOutput{} + sv = &ListSignalMapsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "thumbnailDetails": - if err := awsRestjson1_deserializeDocument__listOfThumbnailDetail(&sv.ThumbnailDetails, value); err != nil { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "signalMaps": + if err := awsRestjson1_deserializeDocument__listOfSignalMapSummary(&sv.SignalMaps, value); err != nil { return err } @@ -6458,14 +12046,14 @@ func awsRestjson1_deserializeOpDocumentDescribeThumbnailsOutput(v **DescribeThum return nil } -type awsRestjson1_deserializeOpListChannels struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpListChannels) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListChannels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6479,9 +12067,9 @@ func (m *awsRestjson1_deserializeOpListChannels) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannels(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &ListChannelsOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -6502,7 +12090,7 @@ func (m *awsRestjson1_deserializeOpListChannels) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListChannelsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6515,7 +12103,7 @@ func (m *awsRestjson1_deserializeOpListChannels) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListChannels(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6556,23 +12144,17 @@ func awsRestjson1_deserializeOpErrorListChannels(response *smithyhttp.Response, } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -6584,7 +12166,7 @@ func awsRestjson1_deserializeOpErrorListChannels(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6597,29 +12179,20 @@ func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListChannelsOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &ListChannelsOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "channels": - if err := awsRestjson1_deserializeDocument__listOfChannelSummary(&sv.Channels, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -6629,14 +12202,14 @@ func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput return nil } -type awsRestjson1_deserializeOpListInputDevices struct { +type awsRestjson1_deserializeOpPurchaseOffering struct { } -func (*awsRestjson1_deserializeOpListInputDevices) ID() string { +func (*awsRestjson1_deserializeOpPurchaseOffering) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListInputDevices) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPurchaseOffering) 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) @@ -6650,9 +12223,9 @@ func (m *awsRestjson1_deserializeOpListInputDevices) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListInputDevices(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPurchaseOffering(response, &metadata) } - output := &ListInputDevicesOutput{} + output := &PurchaseOfferingOutput{} out.Result = output var buff [1024]byte @@ -6673,7 +12246,7 @@ func (m *awsRestjson1_deserializeOpListInputDevices) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListInputDevicesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6686,7 +12259,7 @@ func (m *awsRestjson1_deserializeOpListInputDevices) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListInputDevices(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPurchaseOffering(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)} @@ -6733,6 +12306,9 @@ func awsRestjson1_deserializeOpErrorListInputDevices(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -6742,6 +12318,9 @@ func awsRestjson1_deserializeOpErrorListInputDevices(response *smithyhttp.Respon case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6755,7 +12334,7 @@ func awsRestjson1_deserializeOpErrorListInputDevices(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListInputDevicesOutput(v **ListInputDevicesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6768,29 +12347,20 @@ func awsRestjson1_deserializeOpDocumentListInputDevicesOutput(v **ListInputDevic return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListInputDevicesOutput + var sv *PurchaseOfferingOutput if *v == nil { - sv = &ListInputDevicesOutput{} + sv = &PurchaseOfferingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "inputDevices": - if err := awsRestjson1_deserializeDocument__listOfInputDeviceSummary(&sv.InputDevices, value); err != nil { + case "reservation": + if err := awsRestjson1_deserializeDocumentReservation(&sv.Reservation, value); err != nil { return err } - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - default: _, _ = key, value @@ -6800,14 +12370,14 @@ func awsRestjson1_deserializeOpDocumentListInputDevicesOutput(v **ListInputDevic return nil } -type awsRestjson1_deserializeOpListInputDeviceTransfers struct { +type awsRestjson1_deserializeOpRebootInputDevice struct { } -func (*awsRestjson1_deserializeOpListInputDeviceTransfers) ID() string { +func (*awsRestjson1_deserializeOpRebootInputDevice) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListInputDeviceTransfers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRebootInputDevice) 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) @@ -6821,43 +12391,15 @@ func (m *awsRestjson1_deserializeOpListInputDeviceTransfers) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListInputDeviceTransfers(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRebootInputDevice(response, &metadata) } - output := &ListInputDeviceTransfersOutput{} + output := &RebootInputDeviceOutput{} 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 = awsRestjson1_deserializeOpDocumentListInputDeviceTransfersOutput(&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_deserializeOpErrorListInputDeviceTransfers(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRebootInputDevice(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)} @@ -6913,6 +12455,9 @@ func awsRestjson1_deserializeOpErrorListInputDeviceTransfers(response *smithyhtt case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -6929,59 +12474,14 @@ func awsRestjson1_deserializeOpErrorListInputDeviceTransfers(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentListInputDeviceTransfersOutput(v **ListInputDeviceTransfersOutput, 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 *ListInputDeviceTransfersOutput - if *v == nil { - sv = &ListInputDeviceTransfersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "inputDeviceTransfers": - if err := awsRestjson1_deserializeDocument__listOfTransferringInputDeviceSummary(&sv.InputDeviceTransfers, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListInputs struct { +type awsRestjson1_deserializeOpRejectInputDeviceTransfer struct { } -func (*awsRestjson1_deserializeOpListInputs) ID() string { +func (*awsRestjson1_deserializeOpRejectInputDeviceTransfer) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListInputs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRejectInputDeviceTransfer) 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) @@ -6995,43 +12495,15 @@ func (m *awsRestjson1_deserializeOpListInputs) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListInputs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRejectInputDeviceTransfer(response, &metadata) } - output := &ListInputsOutput{} + output := &RejectInputDeviceTransferOutput{} 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 = awsRestjson1_deserializeOpDocumentListInputsOutput(&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_deserializeOpErrorListInputs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRejectInputDeviceTransfer(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)} @@ -7078,6 +12550,9 @@ func awsRestjson1_deserializeOpErrorListInputs(response *smithyhttp.Response, me case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -7087,72 +12562,33 @@ func awsRestjson1_deserializeOpErrorListInputs(response *smithyhttp.Response, me case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListInputsOutput(v **ListInputsOutput, 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 *ListInputsOutput - if *v == nil { - sv = &ListInputsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "inputs": - if err := awsRestjson1_deserializeDocument__listOfInput(&sv.Inputs, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - + Message: errorMessage, } + return genericError + } - *v = sv - return nil } -type awsRestjson1_deserializeOpListInputSecurityGroups struct { +type awsRestjson1_deserializeOpRestartChannelPipelines struct { } -func (*awsRestjson1_deserializeOpListInputSecurityGroups) ID() string { +func (*awsRestjson1_deserializeOpRestartChannelPipelines) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListInputSecurityGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRestartChannelPipelines) 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) @@ -7166,9 +12602,9 @@ func (m *awsRestjson1_deserializeOpListInputSecurityGroups) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListInputSecurityGroups(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRestartChannelPipelines(response, &metadata) } - output := &ListInputSecurityGroupsOutput{} + output := &RestartChannelPipelinesOutput{} out.Result = output var buff [1024]byte @@ -7189,7 +12625,7 @@ func (m *awsRestjson1_deserializeOpListInputSecurityGroups) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListInputSecurityGroupsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRestartChannelPipelinesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7202,7 +12638,7 @@ func (m *awsRestjson1_deserializeOpListInputSecurityGroups) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListInputSecurityGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRestartChannelPipelines(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)} @@ -7249,6 +12685,9 @@ func awsRestjson1_deserializeOpErrorListInputSecurityGroups(response *smithyhttp case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -7258,6 +12697,9 @@ func awsRestjson1_deserializeOpErrorListInputSecurityGroups(response *smithyhttp case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7271,7 +12713,7 @@ func awsRestjson1_deserializeOpErrorListInputSecurityGroups(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListInputSecurityGroupsOutput(v **ListInputSecurityGroupsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRestartChannelPipelinesOutput(v **RestartChannelPipelinesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7284,27 +12726,148 @@ func awsRestjson1_deserializeOpDocumentListInputSecurityGroupsOutput(v **ListInp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListInputSecurityGroupsOutput + var sv *RestartChannelPipelinesOutput if *v == nil { - sv = &ListInputSecurityGroupsOutput{} + sv = &RestartChannelPipelinesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "inputSecurityGroups": - if err := awsRestjson1_deserializeDocument__listOfInputSecurityGroup(&sv.InputSecurityGroups, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cdiInputSpecification": + if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { return err } - case "nextToken": + case "channelClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) + } + sv.ChannelClass = types.ChannelClass(jtv) + } + + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { + return err + } + + case "egressEndpoints": + if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { + return err + } + + case "encoderSettings": + if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { + return err + } + + case "id": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Id = ptr.String(jtv) + } + + case "inputAttachments": + if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { + return err + } + + case "inputSpecification": + if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { + return err + } + + case "logLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } + + case "maintenance": + if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { + return err + } + + case "maintenanceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.MaintenanceStatus = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "pipelineDetails": + if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { + return err + } + + case "pipelinesRunningCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) + } + sv.State = types.ChannelState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "vpc": + if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { + return err } default: @@ -7316,14 +12879,14 @@ func awsRestjson1_deserializeOpDocumentListInputSecurityGroupsOutput(v **ListInp return nil } -type awsRestjson1_deserializeOpListMultiplexes struct { +type awsRestjson1_deserializeOpStartChannel struct { } -func (*awsRestjson1_deserializeOpListMultiplexes) ID() string { +func (*awsRestjson1_deserializeOpStartChannel) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMultiplexes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartChannel) 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) @@ -7337,9 +12900,9 @@ func (m *awsRestjson1_deserializeOpListMultiplexes) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMultiplexes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartChannel(response, &metadata) } - output := &ListMultiplexesOutput{} + output := &StartChannelOutput{} out.Result = output var buff [1024]byte @@ -7360,7 +12923,7 @@ func (m *awsRestjson1_deserializeOpListMultiplexes) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMultiplexesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7373,7 +12936,7 @@ func (m *awsRestjson1_deserializeOpListMultiplexes) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMultiplexes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartChannel(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)} @@ -7420,6 +12983,9 @@ func awsRestjson1_deserializeOpErrorListMultiplexes(response *smithyhttp.Respons case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -7429,6 +12995,9 @@ func awsRestjson1_deserializeOpErrorListMultiplexes(response *smithyhttp.Respons case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) @@ -7439,43 +13008,155 @@ func awsRestjson1_deserializeOpErrorListMultiplexes(response *smithyhttp.Respons } return genericError - } -} + } +} + +func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput, 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 *StartChannelOutput + if *v == nil { + sv = &StartChannelOutput{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cdiInputSpecification": + if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { + return err + } + + case "channelClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) + } + sv.ChannelClass = types.ChannelClass(jtv) + } + + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { + return err + } + + case "egressEndpoints": + if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { + return err + } + + case "encoderSettings": + if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "inputAttachments": + if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { + return err + } + + case "inputSpecification": + if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { + return err + } -func awsRestjson1_deserializeOpDocumentListMultiplexesOutput(v **ListMultiplexesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "logLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "maintenance": + if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { + return err + } - var sv *ListMultiplexesOutput - if *v == nil { - sv = &ListMultiplexesOutput{} - } else { - sv = *v - } + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - for key, value := range shape { - switch key { - case "multiplexes": - if err := awsRestjson1_deserializeDocument__listOfMultiplexSummary(&sv.Multiplexes, value); err != nil { + case "pipelineDetails": + if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { return err } - case "nextToken": + case "pipelinesRunningCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + } + + case "roleArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.RoleArn = ptr.String(jtv) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) + } + sv.State = types.ChannelState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "vpc": + if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { + return err } default: @@ -7487,14 +13168,14 @@ func awsRestjson1_deserializeOpDocumentListMultiplexesOutput(v **ListMultiplexes return nil } -type awsRestjson1_deserializeOpListMultiplexPrograms struct { +type awsRestjson1_deserializeOpStartDeleteMonitorDeployment struct { } -func (*awsRestjson1_deserializeOpListMultiplexPrograms) ID() string { +func (*awsRestjson1_deserializeOpStartDeleteMonitorDeployment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListMultiplexPrograms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartDeleteMonitorDeployment) 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) @@ -7508,9 +13189,9 @@ func (m *awsRestjson1_deserializeOpListMultiplexPrograms) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMultiplexPrograms(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartDeleteMonitorDeployment(response, &metadata) } - output := &ListMultiplexProgramsOutput{} + output := &StartDeleteMonitorDeploymentOutput{} out.Result = output var buff [1024]byte @@ -7531,7 +13212,7 @@ func (m *awsRestjson1_deserializeOpListMultiplexPrograms) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListMultiplexProgramsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartDeleteMonitorDeploymentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7544,7 +13225,7 @@ func (m *awsRestjson1_deserializeOpListMultiplexPrograms) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListMultiplexPrograms(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartDeleteMonitorDeployment(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)} @@ -7585,18 +13266,15 @@ func awsRestjson1_deserializeOpErrorListMultiplexPrograms(response *smithyhttp.R } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -7616,7 +13294,7 @@ func awsRestjson1_deserializeOpErrorListMultiplexPrograms(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentListMultiplexProgramsOutput(v **ListMultiplexProgramsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartDeleteMonitorDeploymentOutput(v **StartDeleteMonitorDeploymentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7629,27 +13307,159 @@ func awsRestjson1_deserializeOpDocumentListMultiplexProgramsOutput(v **ListMulti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListMultiplexProgramsOutput + var sv *StartDeleteMonitorDeploymentOutput if *v == nil { - sv = &ListMultiplexProgramsOutput{} + sv = &StartDeleteMonitorDeploymentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "multiplexPrograms": - if err := awsRestjson1_deserializeDocument__listOfMultiplexProgramSummary(&sv.MultiplexPrograms, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveSignalMap to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cloudWatchAlarmTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.CloudWatchAlarmTemplateGroupIds, value); err != nil { return err } - case "nextToken": + case "createdAt": 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 __timestampIso8601 to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "discoveryEntryPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.DiscoveryEntryPointArn = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "eventBridgeRuleTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.EventBridgeRuleTemplateGroupIds, value); err != nil { + return err + } + + case "failedMediaResourceMap": + if err := awsRestjson1_deserializeDocumentFailedMediaResourceMap(&sv.FailedMediaResourceMap, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastDiscoveredAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastDiscoveredAt = ptr.Time(t) + } + + case "lastSuccessfulMonitorDeployment": + if err := awsRestjson1_deserializeDocumentSuccessfulMonitorDeployment(&sv.LastSuccessfulMonitorDeployment, value); err != nil { + return err + } + + case "mediaResourceMap": + if err := awsRestjson1_deserializeDocumentMediaResourceMap(&sv.MediaResourceMap, value); err != nil { + return err + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "monitorChangesPendingDeployment": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.MonitorChangesPendingDeployment = ptr.Bool(jtv) + } + + case "monitorDeployment": + if err := awsRestjson1_deserializeDocumentMonitorDeployment(&sv.MonitorDeployment, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } default: @@ -7661,14 +13471,14 @@ func awsRestjson1_deserializeOpDocumentListMultiplexProgramsOutput(v **ListMulti return nil } -type awsRestjson1_deserializeOpListOfferings struct { +type awsRestjson1_deserializeOpStartInputDevice struct { } -func (*awsRestjson1_deserializeOpListOfferings) ID() string { +func (*awsRestjson1_deserializeOpStartInputDevice) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartInputDevice) 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) @@ -7682,43 +13492,15 @@ func (m *awsRestjson1_deserializeOpListOfferings) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListOfferings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartInputDevice(response, &metadata) } - output := &ListOfferingsOutput{} + output := &StartInputDeviceOutput{} 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 = awsRestjson1_deserializeOpDocumentListOfferingsOutput(&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_deserializeOpErrorListOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartInputDevice(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)} @@ -7774,9 +13556,15 @@ func awsRestjson1_deserializeOpErrorListOfferings(response *smithyhttp.Response, case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7787,59 +13575,14 @@ func awsRestjson1_deserializeOpErrorListOfferings(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListOfferingsOutput(v **ListOfferingsOutput, 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 *ListOfferingsOutput - if *v == nil { - sv = &ListOfferingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "offerings": - if err := awsRestjson1_deserializeDocument__listOfOffering(&sv.Offerings, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListReservations struct { +type awsRestjson1_deserializeOpStartInputDeviceMaintenanceWindow struct { } -func (*awsRestjson1_deserializeOpListReservations) ID() string { +func (*awsRestjson1_deserializeOpStartInputDeviceMaintenanceWindow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListReservations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartInputDeviceMaintenanceWindow) 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) @@ -7853,43 +13596,15 @@ func (m *awsRestjson1_deserializeOpListReservations) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListReservations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartInputDeviceMaintenanceWindow(response, &metadata) } - output := &ListReservationsOutput{} + output := &StartInputDeviceMaintenanceWindowOutput{} 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 = awsRestjson1_deserializeOpDocumentListReservationsOutput(&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_deserializeOpErrorListReservations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartInputDeviceMaintenanceWindow(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)} @@ -7945,9 +13660,15 @@ func awsRestjson1_deserializeOpErrorListReservations(response *smithyhttp.Respon case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7958,59 +13679,14 @@ func awsRestjson1_deserializeOpErrorListReservations(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListReservationsOutput(v **ListReservationsOutput, 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 *ListReservationsOutput - if *v == nil { - sv = &ListReservationsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "reservations": - if err := awsRestjson1_deserializeDocument__listOfReservation(&sv.Reservations, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpStartMonitorDeployment struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpStartMonitorDeployment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartMonitorDeployment) 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) @@ -8024,9 +13700,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartMonitorDeployment(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &StartMonitorDeploymentOutput{} out.Result = output var buff [1024]byte @@ -8047,7 +13723,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartMonitorDeploymentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8060,7 +13736,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartMonitorDeployment(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)} @@ -8104,6 +13780,9 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -8113,6 +13792,9 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8120,33 +13802,174 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } return genericError - } -} + } +} + +func awsRestjson1_deserializeOpDocumentStartMonitorDeploymentOutput(v **StartMonitorDeploymentOutput, 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 *StartMonitorDeploymentOutput + if *v == nil { + sv = &StartMonitorDeploymentOutput{} + } 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 __stringPatternArnMedialiveSignalMap to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cloudWatchAlarmTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.CloudWatchAlarmTemplateGroupIds, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "discoveryEntryPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.DiscoveryEntryPointArn = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "eventBridgeRuleTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.EventBridgeRuleTemplateGroupIds, value); err != nil { + return err + } + + case "failedMediaResourceMap": + if err := awsRestjson1_deserializeDocumentFailedMediaResourceMap(&sv.FailedMediaResourceMap, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "lastDiscoveredAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastDiscoveredAt = ptr.Time(t) + } + + case "lastSuccessfulMonitorDeployment": + if err := awsRestjson1_deserializeDocumentSuccessfulMonitorDeployment(&sv.LastSuccessfulMonitorDeployment, value); err != nil { + return err + } + + case "mediaResourceMap": + if err := awsRestjson1_deserializeDocumentMediaResourceMap(&sv.MediaResourceMap, value); err != nil { + return err + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "monitorChangesPendingDeployment": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.MonitorChangesPendingDeployment = ptr.Bool(jtv) + } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "monitorDeployment": + if err := awsRestjson1_deserializeDocumentMonitorDeployment(&sv.MonitorDeployment, value); err != nil { + return err + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - var sv *ListTagsForResourceOutput - if *v == nil { - sv = &ListTagsForResourceOutput{} - } else { - sv = *v - } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapStatus(jtv) + } - for key, value := range shape { - switch key { case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -8159,14 +13982,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpPurchaseOffering struct { +type awsRestjson1_deserializeOpStartMultiplex struct { } -func (*awsRestjson1_deserializeOpPurchaseOffering) ID() string { +func (*awsRestjson1_deserializeOpStartMultiplex) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartMultiplex) 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) @@ -8180,9 +14003,9 @@ func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPurchaseOffering(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartMultiplex(response, &metadata) } - output := &PurchaseOfferingOutput{} + output := &StartMultiplexOutput{} out.Result = output var buff [1024]byte @@ -8203,7 +14026,7 @@ func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartMultiplexOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8216,7 +14039,7 @@ func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorPurchaseOffering(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartMultiplex(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)} @@ -8291,7 +14114,7 @@ func awsRestjson1_deserializeOpErrorPurchaseOffering(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartMultiplexOutput(v **StartMultiplexOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8304,17 +14127,94 @@ func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PurchaseOfferingOutput + var sv *StartMultiplexOutput if *v == nil { - sv = &PurchaseOfferingOutput{} + sv = &StartMultiplexOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "reservation": - if err := awsRestjson1_deserializeDocumentReservation(&sv.Reservation, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "availabilityZones": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { + return err + } + + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "multiplexSettings": + if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "pipelinesRunningCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + } + + case "programCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProgramCount = ptr.Int32(int32(i64)) + } + + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) + } + sv.State = types.MultiplexState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } @@ -8327,14 +14227,14 @@ func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferi return nil } -type awsRestjson1_deserializeOpRebootInputDevice struct { +type awsRestjson1_deserializeOpStartUpdateSignalMap struct { } -func (*awsRestjson1_deserializeOpRebootInputDevice) ID() string { +func (*awsRestjson1_deserializeOpStartUpdateSignalMap) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRebootInputDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartUpdateSignalMap) 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) @@ -8348,15 +14248,43 @@ func (m *awsRestjson1_deserializeOpRebootInputDevice) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRebootInputDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartUpdateSignalMap(response, &metadata) } - output := &RebootInputDeviceOutput{} + output := &StartUpdateSignalMapOutput{} 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 = awsRestjson1_deserializeOpDocumentStartUpdateSignalMapOutput(&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_deserializeOpErrorRebootInputDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartUpdateSignalMap(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)} @@ -8397,18 +14325,15 @@ func awsRestjson1_deserializeOpErrorRebootInputDevice(response *smithyhttp.Respo } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -8418,9 +14343,6 @@ func awsRestjson1_deserializeOpErrorRebootInputDevice(response *smithyhttp.Respo case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8431,121 +14353,191 @@ func awsRestjson1_deserializeOpErrorRebootInputDevice(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpRejectInputDeviceTransfer struct { -} - -func (*awsRestjson1_deserializeOpRejectInputDeviceTransfer) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRejectInputDeviceTransfer) 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 +func awsRestjson1_deserializeOpDocumentStartUpdateSignalMapOutput(v **StartUpdateSignalMapOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRejectInputDeviceTransfer(response, &metadata) + var sv *StartUpdateSignalMapOutput + if *v == nil { + sv = &StartUpdateSignalMapOutput{} + } else { + sv = *v } - output := &RejectInputDeviceTransferOutput{} - out.Result = output - return out, metadata, err -} + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveSignalMap to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } -func awsRestjson1_deserializeOpErrorRejectInputDeviceTransfer(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()) + case "cloudWatchAlarmTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.CloudWatchAlarmTemplateGroupIds, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "discoveryEntryPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.DiscoveryEntryPointArn = ptr.String(jtv) + } - errorCode := "UnknownError" - errorMessage := errorCode + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } + case "eventBridgeRuleTemplateGroupIds": + if err := awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(&sv.EventBridgeRuleTemplateGroupIds, value); err != nil { + return err + } - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case "failedMediaResourceMap": + if err := awsRestjson1_deserializeDocumentFailedMediaResourceMap(&sv.FailedMediaResourceMap, value); err != nil { + return err + } - 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 - } + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + case "lastDiscoveredAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastDiscoveredAt = ptr.Time(t) + } - switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + case "lastSuccessfulMonitorDeployment": + if err := awsRestjson1_deserializeDocumentSuccessfulMonitorDeployment(&sv.LastSuccessfulMonitorDeployment, value); err != nil { + return err + } - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case "mediaResourceMap": + if err := awsRestjson1_deserializeDocumentMediaResourceMap(&sv.MediaResourceMap, value); err != nil { + return err + } - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case "monitorChangesPendingDeployment": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected __boolean to be of type *bool, got %T instead", value) + } + sv.MonitorChangesPendingDeployment = ptr.Bool(jtv) + } - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + case "monitorDeployment": + if err := awsRestjson1_deserializeDocumentMonitorDeployment(&sv.MonitorDeployment, value); err != nil { + return err + } - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapStatus(jtv) + } - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpRestartChannelPipelines struct { +type awsRestjson1_deserializeOpStopChannel struct { } -func (*awsRestjson1_deserializeOpRestartChannelPipelines) ID() string { +func (*awsRestjson1_deserializeOpStopChannel) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRestartChannelPipelines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStopChannel) 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) @@ -8559,9 +14551,9 @@ func (m *awsRestjson1_deserializeOpRestartChannelPipelines) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRestartChannelPipelines(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStopChannel(response, &metadata) } - output := &RestartChannelPipelinesOutput{} + output := &StopChannelOutput{} out.Result = output var buff [1024]byte @@ -8582,7 +14574,7 @@ func (m *awsRestjson1_deserializeOpRestartChannelPipelines) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRestartChannelPipelinesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStopChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8595,7 +14587,7 @@ func (m *awsRestjson1_deserializeOpRestartChannelPipelines) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorRestartChannelPipelines(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStopChannel(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)} @@ -8670,7 +14662,7 @@ func awsRestjson1_deserializeOpErrorRestartChannelPipelines(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentRestartChannelPipelinesOutput(v **RestartChannelPipelinesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStopChannelOutput(v **StopChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8683,9 +14675,9 @@ func awsRestjson1_deserializeOpDocumentRestartChannelPipelinesOutput(v **Restart return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RestartChannelPipelinesOutput + var sv *StopChannelOutput if *v == nil { - sv = &RestartChannelPipelinesOutput{} + sv = &StopChannelOutput{} } else { sv = *v } @@ -8763,15 +14755,6 @@ func awsRestjson1_deserializeOpDocumentRestartChannelPipelinesOutput(v **Restart return err } - case "maintenanceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.MaintenanceStatus = ptr.String(jtv) - } - case "name": if value != nil { jtv, ok := value.(string) @@ -8808,42 +14791,146 @@ func awsRestjson1_deserializeOpDocumentRestartChannelPipelinesOutput(v **Restart sv.RoleArn = ptr.String(jtv) } - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) - } - sv.State = types.ChannelState(jtv) - } + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) + } + sv.State = types.ChannelState(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "vpc": + if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStopInputDevice struct { +} + +func (*awsRestjson1_deserializeOpStopInputDevice) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStopInputDevice) 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_deserializeOpErrorStopInputDevice(response, &metadata) + } + output := &StopInputDeviceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStopInputDevice(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("BadGatewayException", errorCode): + return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("GatewayTimeoutException", errorCode): + return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case "vpc": - if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { - return err - } + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - default: - _, _ = key, value + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } + return genericError + } - *v = sv - return nil } -type awsRestjson1_deserializeOpStartChannel struct { +type awsRestjson1_deserializeOpStopMultiplex struct { } -func (*awsRestjson1_deserializeOpStartChannel) ID() string { +func (*awsRestjson1_deserializeOpStopMultiplex) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStopMultiplex) 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) @@ -8857,9 +14944,9 @@ func (m *awsRestjson1_deserializeOpStartChannel) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartChannel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStopMultiplex(response, &metadata) } - output := &StartChannelOutput{} + output := &StopMultiplexOutput{} out.Result = output var buff [1024]byte @@ -8880,7 +14967,7 @@ func (m *awsRestjson1_deserializeOpStartChannel) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartChannelOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStopMultiplexOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8893,7 +14980,7 @@ func (m *awsRestjson1_deserializeOpStartChannel) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStopMultiplex(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)} @@ -8968,7 +15055,7 @@ func awsRestjson1_deserializeOpErrorStartChannel(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStopMultiplexOutput(v **StopMultiplexOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8981,9 +15068,9 @@ func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartChannelOutput + var sv *StopMultiplexOutput if *v == nil { - sv = &StartChannelOutput{} + sv = &StopMultiplexOutput{} } else { sv = *v } @@ -8999,32 +15086,13 @@ func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput sv.Arn = ptr.String(jtv) } - case "cdiInputSpecification": - if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { + case "availabilityZones": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { return err } - case "channelClass": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) - } - sv.ChannelClass = types.ChannelClass(jtv) - } - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { - return err - } - - case "egressEndpoints": - if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { - return err - } - - case "encoderSettings": - if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { + if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { return err } @@ -9037,27 +15105,8 @@ func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput sv.Id = ptr.String(jtv) } - case "inputAttachments": - if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { - return err - } - - case "inputSpecification": - if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { - return err - } - - case "logLevel": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) - } - sv.LogLevel = types.LogLevel(jtv) - } - - case "maintenance": - if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { + case "multiplexSettings": + if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { return err } @@ -9070,11 +15119,6 @@ func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput sv.Name = ptr.String(jtv) } - case "pipelineDetails": - if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { - return err - } - case "pipelinesRunningCount": if value != nil { jtv, ok := value.(json.Number) @@ -9088,22 +15132,26 @@ func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput sv.PipelinesRunningCount = ptr.Int32(int32(i64)) } - case "roleArn": + case "programCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ProgramCount = ptr.Int32(int32(i64)) } case "state": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) + return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) } - sv.State = types.ChannelState(jtv) + sv.State = types.MultiplexState(jtv) } case "tags": @@ -9111,11 +15159,6 @@ func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput return err } - case "vpc": - if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { - return err - } - default: _, _ = key, value @@ -9125,14 +15168,14 @@ func awsRestjson1_deserializeOpDocumentStartChannelOutput(v **StartChannelOutput return nil } -type awsRestjson1_deserializeOpStartInputDevice struct { +type awsRestjson1_deserializeOpTransferInputDevice struct { } -func (*awsRestjson1_deserializeOpStartInputDevice) ID() string { +func (*awsRestjson1_deserializeOpTransferInputDevice) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartInputDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTransferInputDevice) 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) @@ -9146,15 +15189,15 @@ func (m *awsRestjson1_deserializeOpStartInputDevice) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartInputDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTransferInputDevice(response, &metadata) } - output := &StartInputDeviceOutput{} + output := &TransferInputDeviceOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartInputDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTransferInputDevice(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)} @@ -9201,109 +15244,8 @@ func awsRestjson1_deserializeOpErrorStartInputDevice(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpStartInputDeviceMaintenanceWindow struct { -} - -func (*awsRestjson1_deserializeOpStartInputDeviceMaintenanceWindow) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStartInputDeviceMaintenanceWindow) 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_deserializeOpErrorStartInputDeviceMaintenanceWindow(response, &metadata) - } - output := &StartInputDeviceMaintenanceWindowOutput{} - out.Result = output - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStartInputDeviceMaintenanceWindow(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("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -9333,14 +15275,14 @@ func awsRestjson1_deserializeOpErrorStartInputDeviceMaintenanceWindow(response * } } -type awsRestjson1_deserializeOpStartMultiplex struct { +type awsRestjson1_deserializeOpUpdateAccountConfiguration struct { } -func (*awsRestjson1_deserializeOpStartMultiplex) ID() string { +func (*awsRestjson1_deserializeOpUpdateAccountConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartMultiplex) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAccountConfiguration) 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) @@ -9354,9 +15296,9 @@ func (m *awsRestjson1_deserializeOpStartMultiplex) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartMultiplex(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountConfiguration(response, &metadata) } - output := &StartMultiplexOutput{} + output := &UpdateAccountConfigurationOutput{} out.Result = output var buff [1024]byte @@ -9377,7 +15319,7 @@ func (m *awsRestjson1_deserializeOpStartMultiplex) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartMultiplexOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAccountConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9390,7 +15332,7 @@ func (m *awsRestjson1_deserializeOpStartMultiplex) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartMultiplex(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAccountConfiguration(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)} @@ -9437,9 +15379,6 @@ func awsRestjson1_deserializeOpErrorStartMultiplex(response *smithyhttp.Response case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -9449,12 +15388,12 @@ func awsRestjson1_deserializeOpErrorStartMultiplex(response *smithyhttp.Response case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9465,7 +15404,7 @@ func awsRestjson1_deserializeOpErrorStartMultiplex(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentStartMultiplexOutput(v **StartMultiplexOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAccountConfigurationOutput(v **UpdateAccountConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9478,94 +15417,17 @@ func awsRestjson1_deserializeOpDocumentStartMultiplexOutput(v **StartMultiplexOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartMultiplexOutput + var sv *UpdateAccountConfigurationOutput if *v == nil { - sv = &StartMultiplexOutput{} + sv = &UpdateAccountConfigurationOutput{} } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "availabilityZones": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { - return err - } - - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { - return err - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "multiplexSettings": - if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "pipelinesRunningCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) - } - - case "programCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ProgramCount = ptr.Int32(int32(i64)) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) - } - sv.State = types.MultiplexState(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + case "accountConfiguration": + if err := awsRestjson1_deserializeDocumentAccountConfiguration(&sv.AccountConfiguration, value); err != nil { return err } @@ -9578,14 +15440,14 @@ func awsRestjson1_deserializeOpDocumentStartMultiplexOutput(v **StartMultiplexOu return nil } -type awsRestjson1_deserializeOpStopChannel struct { +type awsRestjson1_deserializeOpUpdateChannel struct { } -func (*awsRestjson1_deserializeOpStopChannel) ID() string { +func (*awsRestjson1_deserializeOpUpdateChannel) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateChannel) 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) @@ -9599,9 +15461,9 @@ func (m *awsRestjson1_deserializeOpStopChannel) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopChannel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannel(response, &metadata) } - output := &StopChannelOutput{} + output := &UpdateChannelOutput{} out.Result = output var buff [1024]byte @@ -9622,7 +15484,7 @@ func (m *awsRestjson1_deserializeOpStopChannel) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStopChannelOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateChannelOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9635,7 +15497,7 @@ func (m *awsRestjson1_deserializeOpStopChannel) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsRestjson1_deserializeOpErrorStopChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateChannel(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)} @@ -9694,11 +15556,8 @@ func awsRestjson1_deserializeOpErrorStopChannel(response *smithyhttp.Response, m case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -9710,7 +15569,7 @@ func awsRestjson1_deserializeOpErrorStopChannel(response *smithyhttp.Response, m } } -func awsRestjson1_deserializeOpDocumentStopChannelOutput(v **StopChannelOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9723,138 +15582,17 @@ func awsRestjson1_deserializeOpDocumentStopChannelOutput(v **StopChannelOutput, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StopChannelOutput + var sv *UpdateChannelOutput if *v == nil { - sv = &StopChannelOutput{} - } 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 __string to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "cdiInputSpecification": - if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { - return err - } - - case "channelClass": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) - } - sv.ChannelClass = types.ChannelClass(jtv) - } - - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { - return err - } - - case "egressEndpoints": - if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { - return err - } - - case "encoderSettings": - if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { - return err - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "inputAttachments": - if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { - return err - } - - case "inputSpecification": - if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { - return err - } - - case "logLevel": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) - } - sv.LogLevel = types.LogLevel(jtv) - } - - case "maintenance": - if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { - return err - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "pipelineDetails": - if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { - return err - } - - case "pipelinesRunningCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) - } - - case "roleArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.RoleArn = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) - } - sv.State = types.ChannelState(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } + sv = &UpdateChannelOutput{} + } else { + sv = *v + } - case "vpc": - if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { + for key, value := range shape { + switch key { + case "channel": + if err := awsRestjson1_deserializeDocumentChannel(&sv.Channel, value); err != nil { return err } @@ -9867,14 +15605,14 @@ func awsRestjson1_deserializeOpDocumentStopChannelOutput(v **StopChannelOutput, return nil } -type awsRestjson1_deserializeOpStopInputDevice struct { +type awsRestjson1_deserializeOpUpdateChannelClass struct { } -func (*awsRestjson1_deserializeOpStopInputDevice) ID() string { +func (*awsRestjson1_deserializeOpUpdateChannelClass) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopInputDevice) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateChannelClass) 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) @@ -9888,15 +15626,43 @@ func (m *awsRestjson1_deserializeOpStopInputDevice) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopInputDevice(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannelClass(response, &metadata) } - output := &StopInputDeviceOutput{} + output := &UpdateChannelClassOutput{} 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 = awsRestjson1_deserializeOpDocumentUpdateChannelClassOutput(&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_deserializeOpErrorStopInputDevice(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateChannelClass(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)} @@ -9943,6 +15709,9 @@ func awsRestjson1_deserializeOpErrorStopInputDevice(response *smithyhttp.Respons case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -9971,14 +15740,50 @@ func awsRestjson1_deserializeOpErrorStopInputDevice(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpStopMultiplex struct { +func awsRestjson1_deserializeOpDocumentUpdateChannelClassOutput(v **UpdateChannelClassOutput, 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 *UpdateChannelClassOutput + if *v == nil { + sv = &UpdateChannelClassOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "channel": + if err := awsRestjson1_deserializeDocumentChannel(&sv.Channel, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpStopMultiplex) ID() string { +type awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplate struct { +} + +func (*awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopMultiplex) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplate) 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) @@ -9992,9 +15797,9 @@ func (m *awsRestjson1_deserializeOpStopMultiplex) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopMultiplex(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateCloudWatchAlarmTemplate(response, &metadata) } - output := &StopMultiplexOutput{} + output := &UpdateCloudWatchAlarmTemplateOutput{} out.Result = output var buff [1024]byte @@ -10015,7 +15820,7 @@ func (m *awsRestjson1_deserializeOpStopMultiplex) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStopMultiplexOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateCloudWatchAlarmTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10028,7 +15833,7 @@ func (m *awsRestjson1_deserializeOpStopMultiplex) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorStopMultiplex(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateCloudWatchAlarmTemplate(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)} @@ -10069,9 +15874,6 @@ func awsRestjson1_deserializeOpErrorStopMultiplex(response *smithyhttp.Response, } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -10081,9 +15883,6 @@ func awsRestjson1_deserializeOpErrorStopMultiplex(response *smithyhttp.Response, case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -10103,7 +15902,7 @@ func awsRestjson1_deserializeOpErrorStopMultiplex(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentStopMultiplexOutput(v **StopMultiplexOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateCloudWatchAlarmTemplateOutput(v **UpdateCloudWatchAlarmTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10116,9 +15915,9 @@ func awsRestjson1_deserializeOpDocumentStopMultiplexOutput(v **StopMultiplexOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StopMultiplexOutput + var sv *UpdateCloudWatchAlarmTemplateOutput if *v == nil { - sv = &StopMultiplexOutput{} + sv = &UpdateCloudWatchAlarmTemplateOutput{} } else { sv = *v } @@ -10129,208 +15928,213 @@ func awsRestjson1_deserializeOpDocumentStopMultiplexOutput(v **StopMultiplexOutp 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 __stringPatternArnMedialiveCloudwatchAlarmTemplate to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } - case "availabilityZones": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.AvailabilityZones, value); err != nil { - return err - } - - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(&sv.Destinations, value); err != nil { - return err - } - - case "id": + case "comparisonOperator": 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 CloudWatchAlarmTemplateComparisonOperator to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) - } - - case "multiplexSettings": - if err := awsRestjson1_deserializeDocumentMultiplexSettings(&sv.MultiplexSettings, value); err != nil { - return err + sv.ComparisonOperator = types.CloudWatchAlarmTemplateComparisonOperator(jtv) } - case "name": + case "createdAt": 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 __timestampIso8601 to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "pipelinesRunningCount": + case "datapointsToAlarm": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + sv.DatapointsToAlarm = ptr.Int32(int32(i64)) } - case "programCount": + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "evaluationPeriods": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.ProgramCount = ptr.Int32(int32(i64)) + sv.EvaluationPeriods = ptr.Int32(int32(i64)) } - case "state": + case "groupId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MultiplexState to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) } - sv.State = types.MultiplexState(jtv) + sv.GroupId = ptr.String(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpTransferInputDevice struct { -} - -func (*awsRestjson1_deserializeOpTransferInputDevice) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpTransferInputDevice) 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_deserializeOpErrorTransferInputDevice(response, &metadata) - } - output := &TransferInputDeviceOutput{} - out.Result = output - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorTransferInputDevice(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()) + case "metricName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax64 to be of type string, got %T instead", value) + } + sv.MetricName = ptr.String(jtv) + } - errorCode := "UnknownError" - errorMessage := errorCode + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case "period": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin10Max86400 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Period = ptr.Int32(int32(i64)) + } - 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 - } + case "statistic": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateStatistic to be of type string, got %T instead", value) + } + sv.Statistic = types.CloudWatchAlarmTemplateStatistic(jtv) + } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } - switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) + case "targetResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateTargetResourceType to be of type string, got %T instead", value) + } + sv.TargetResourceType = types.CloudWatchAlarmTemplateTargetResourceType(jtv) + } - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case "threshold": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Threshold = ptr.Float64(f64) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) - case strings.EqualFold("InternalServerErrorException", errorCode): - return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + } + sv.Threshold = ptr.Float64(f64) - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + } + } - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError + case "treatMissingData": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateTreatMissingData to be of type string, got %T instead", value) + } + sv.TreatMissingData = types.CloudWatchAlarmTemplateTreatMissingData(jtv) + } + default: + _, _ = key, value + + } } + *v = sv + return nil } -type awsRestjson1_deserializeOpUpdateAccountConfiguration struct { +type awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplateGroup struct { } -func (*awsRestjson1_deserializeOpUpdateAccountConfiguration) ID() string { +func (*awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAccountConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateCloudWatchAlarmTemplateGroup) 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) @@ -10344,9 +16148,9 @@ func (m *awsRestjson1_deserializeOpUpdateAccountConfiguration) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateCloudWatchAlarmTemplateGroup(response, &metadata) } - output := &UpdateAccountConfigurationOutput{} + output := &UpdateCloudWatchAlarmTemplateGroupOutput{} out.Result = output var buff [1024]byte @@ -10367,7 +16171,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountConfiguration) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAccountConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateCloudWatchAlarmTemplateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10380,7 +16184,7 @@ func (m *awsRestjson1_deserializeOpUpdateAccountConfiguration) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAccountConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateCloudWatchAlarmTemplateGroup(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)} @@ -10421,27 +16225,24 @@ func awsRestjson1_deserializeOpErrorUpdateAccountConfiguration(response *smithyh } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10452,7 +16253,7 @@ func awsRestjson1_deserializeOpErrorUpdateAccountConfiguration(response *smithyh } } -func awsRestjson1_deserializeOpDocumentUpdateAccountConfigurationOutput(v **UpdateAccountConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateCloudWatchAlarmTemplateGroupOutput(v **UpdateCloudWatchAlarmTemplateGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10465,17 +16266,79 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountConfigurationOutput(v **Upda return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAccountConfigurationOutput + var sv *UpdateCloudWatchAlarmTemplateGroupOutput if *v == nil { - sv = &UpdateAccountConfigurationOutput{} + sv = &UpdateCloudWatchAlarmTemplateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "accountConfiguration": - if err := awsRestjson1_deserializeDocumentAccountConfiguration(&sv.AccountConfiguration, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveCloudwatchAlarmTemplateGroup to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -10488,14 +16351,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAccountConfigurationOutput(v **Upda return nil } -type awsRestjson1_deserializeOpUpdateChannel struct { +type awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplate struct { } -func (*awsRestjson1_deserializeOpUpdateChannel) ID() string { +func (*awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplate) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplate) 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) @@ -10509,9 +16372,9 @@ func (m *awsRestjson1_deserializeOpUpdateChannel) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateEventBridgeRuleTemplate(response, &metadata) } - output := &UpdateChannelOutput{} + output := &UpdateEventBridgeRuleTemplateOutput{} out.Result = output var buff [1024]byte @@ -10532,7 +16395,7 @@ func (m *awsRestjson1_deserializeOpUpdateChannel) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateChannelOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateEventBridgeRuleTemplateOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10545,7 +16408,7 @@ func (m *awsRestjson1_deserializeOpUpdateChannel) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateEventBridgeRuleTemplate(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)} @@ -10586,9 +16449,6 @@ func awsRestjson1_deserializeOpErrorUpdateChannel(response *smithyhttp.Response, } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -10598,14 +16458,14 @@ func awsRestjson1_deserializeOpErrorUpdateChannel(response *smithyhttp.Response, case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -10617,7 +16477,7 @@ func awsRestjson1_deserializeOpErrorUpdateChannel(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateEventBridgeRuleTemplateOutput(v **UpdateEventBridgeRuleTemplateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10630,17 +16490,102 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateChannelOutput + var sv *UpdateEventBridgeRuleTemplateOutput if *v == nil { - sv = &UpdateChannelOutput{} + sv = &UpdateEventBridgeRuleTemplateOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "channel": - if err := awsRestjson1_deserializeDocumentChannel(&sv.Channel, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveEventbridgeRuleTemplate to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "eventTargets": + if err := awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateTarget(&sv.EventTargets, value); err != nil { + return err + } + + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventBridgeRuleTemplateEventType to be of type string, got %T instead", value) + } + sv.EventType = types.EventBridgeRuleTemplateEventType(jtv) + } + + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -10653,14 +16598,14 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutp return nil } -type awsRestjson1_deserializeOpUpdateChannelClass struct { +type awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplateGroup struct { } -func (*awsRestjson1_deserializeOpUpdateChannelClass) ID() string { +func (*awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplateGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateChannelClass) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateEventBridgeRuleTemplateGroup) 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) @@ -10674,9 +16619,9 @@ func (m *awsRestjson1_deserializeOpUpdateChannelClass) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannelClass(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateEventBridgeRuleTemplateGroup(response, &metadata) } - output := &UpdateChannelClassOutput{} + output := &UpdateEventBridgeRuleTemplateGroupOutput{} out.Result = output var buff [1024]byte @@ -10697,7 +16642,7 @@ func (m *awsRestjson1_deserializeOpUpdateChannelClass) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateChannelClassOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateEventBridgeRuleTemplateGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10710,7 +16655,7 @@ func (m *awsRestjson1_deserializeOpUpdateChannelClass) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateChannelClass(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateEventBridgeRuleTemplateGroup(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)} @@ -10751,9 +16696,6 @@ func awsRestjson1_deserializeOpErrorUpdateChannelClass(response *smithyhttp.Resp } switch { - case strings.EqualFold("BadGatewayException", errorCode): - return awsRestjson1_deserializeErrorBadGatewayException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -10763,9 +16705,6 @@ func awsRestjson1_deserializeOpErrorUpdateChannelClass(response *smithyhttp.Resp case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("GatewayTimeoutException", errorCode): - return awsRestjson1_deserializeErrorGatewayTimeoutException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -10775,9 +16714,6 @@ func awsRestjson1_deserializeOpErrorUpdateChannelClass(response *smithyhttp.Resp case strings.EqualFold("TooManyRequestsException", errorCode): return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -10788,7 +16724,7 @@ func awsRestjson1_deserializeOpErrorUpdateChannelClass(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentUpdateChannelClassOutput(v **UpdateChannelClassOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateEventBridgeRuleTemplateGroupOutput(v **UpdateEventBridgeRuleTemplateGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10801,17 +16737,79 @@ func awsRestjson1_deserializeOpDocumentUpdateChannelClassOutput(v **UpdateChanne return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateChannelClassOutput + var sv *UpdateEventBridgeRuleTemplateGroupOutput if *v == nil { - sv = &UpdateChannelClassOutput{} + sv = &UpdateEventBridgeRuleTemplateGroupOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "channel": - if err := awsRestjson1_deserializeDocumentChannel(&sv.Channel, value); err != nil { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveEventbridgeRuleTemplateGroup to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -12345,6 +18343,42 @@ func awsRestjson1_deserializeDocument__listOf__string(v *[]string, value interfa return nil } +func awsRestjson1_deserializeDocument__listOf__stringMin7Max11PatternAws097(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 __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfAudioChannelMapping(v *[]types.AudioChannelMapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12719,6 +18753,74 @@ func awsRestjson1_deserializeDocument__listOfChannelSummary(v *[]types.ChannelSu return nil } +func awsRestjson1_deserializeDocument__listOfCloudWatchAlarmTemplateGroupSummary(v *[]types.CloudWatchAlarmTemplateGroupSummary, 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.CloudWatchAlarmTemplateGroupSummary + if *v == nil { + cv = []types.CloudWatchAlarmTemplateGroupSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CloudWatchAlarmTemplateGroupSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentCloudWatchAlarmTemplateGroupSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfCloudWatchAlarmTemplateSummary(v *[]types.CloudWatchAlarmTemplateSummary, 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.CloudWatchAlarmTemplateSummary + if *v == nil { + cv = []types.CloudWatchAlarmTemplateSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CloudWatchAlarmTemplateSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentCloudWatchAlarmTemplateSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfColorCorrection(v *[]types.ColorCorrection, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12802,22 +18904,124 @@ func awsRestjson1_deserializeDocument__listOfDashRoleCaption(v *[]types.DashRole return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.DashRoleCaption + var cv []types.DashRoleCaption + if *v == nil { + cv = []types.DashRoleCaption{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DashRoleCaption + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DashRoleCaption to be of type string, got %T instead", value) + } + col = types.DashRoleCaption(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateGroupSummary(v *[]types.EventBridgeRuleTemplateGroupSummary, 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.EventBridgeRuleTemplateGroupSummary + if *v == nil { + cv = []types.EventBridgeRuleTemplateGroupSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventBridgeRuleTemplateGroupSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentEventBridgeRuleTemplateGroupSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateSummary(v *[]types.EventBridgeRuleTemplateSummary, 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.EventBridgeRuleTemplateSummary + if *v == nil { + cv = []types.EventBridgeRuleTemplateSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EventBridgeRuleTemplateSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentEventBridgeRuleTemplateSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfEventBridgeRuleTemplateTarget(v *[]types.EventBridgeRuleTemplateTarget, 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.EventBridgeRuleTemplateTarget if *v == nil { - cv = []types.DashRoleCaption{} + cv = []types.EventBridgeRuleTemplateTarget{} } else { cv = *v } for _, value := range shape { - var col types.DashRoleCaption - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DashRoleCaption to be of type string, got %T instead", value) - } - col = types.DashRoleCaption(jtv) + var col types.EventBridgeRuleTemplateTarget + destAddr := &col + if err := awsRestjson1_deserializeDocumentEventBridgeRuleTemplateTarget(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -13303,6 +19507,40 @@ func awsRestjson1_deserializeDocument__listOfMediaPackageOutputDestinationSettin return nil } +func awsRestjson1_deserializeDocument__listOfMediaResourceNeighbor(v *[]types.MediaResourceNeighbor, 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.MediaResourceNeighbor + if *v == nil { + cv = []types.MediaResourceNeighbor{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MediaResourceNeighbor + destAddr := &col + if err := awsRestjson1_deserializeDocumentMediaResourceNeighbor(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfMultiplexOutputDestination(v *[]types.MultiplexOutputDestination, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13815,6 +20053,40 @@ func awsRestjson1_deserializeDocument__listOfScte35Descriptor(v *[]types.Scte35D return nil } +func awsRestjson1_deserializeDocument__listOfSignalMapSummary(v *[]types.SignalMapSummary, 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.SignalMapSummary + if *v == nil { + cv = []types.SignalMapSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SignalMapSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentSignalMapSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocument__listOfThumbnail(v *[]types.Thumbnail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -16757,23 +23029,220 @@ func awsRestjson1_deserializeDocumentCaptionSelectorSettings(v **types.CaptionSe return err } - case "embeddedSourceSettings": - if err := awsRestjson1_deserializeDocumentEmbeddedSourceSettings(&sv.EmbeddedSourceSettings, value); err != nil { - return err + case "embeddedSourceSettings": + if err := awsRestjson1_deserializeDocumentEmbeddedSourceSettings(&sv.EmbeddedSourceSettings, value); err != nil { + return err + } + + case "scte20SourceSettings": + if err := awsRestjson1_deserializeDocumentScte20SourceSettings(&sv.Scte20SourceSettings, value); err != nil { + return err + } + + case "scte27SourceSettings": + if err := awsRestjson1_deserializeDocumentScte27SourceSettings(&sv.Scte27SourceSettings, value); err != nil { + return err + } + + case "teletextSourceSettings": + if err := awsRestjson1_deserializeDocumentTeletextSourceSettings(&sv.TeletextSourceSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCdiInputSpecification(v **types.CdiInputSpecification, 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.CdiInputSpecification + if *v == nil { + sv = &types.CdiInputSpecification{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "resolution": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CdiInputResolution to be of type string, got %T instead", value) + } + sv.Resolution = types.CdiInputResolution(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentChannel(v **types.Channel, 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.Channel + if *v == nil { + sv = &types.Channel{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "cdiInputSpecification": + if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { + return err + } + + case "channelClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) + } + sv.ChannelClass = types.ChannelClass(jtv) + } + + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { + return err + } + + case "egressEndpoints": + if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { + return err + } + + case "encoderSettings": + if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "inputAttachments": + if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { + return err + } + + case "inputSpecification": + if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { + return err + } + + case "logLevel": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + } + sv.LogLevel = types.LogLevel(jtv) + } + + case "maintenance": + if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { + return err + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "pipelineDetails": + if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { + return err + } + + case "pipelinesRunningCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) } - case "scte20SourceSettings": - if err := awsRestjson1_deserializeDocumentScte20SourceSettings(&sv.Scte20SourceSettings, value); err != nil { - return err + case "state": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) + } + sv.State = types.ChannelState(jtv) } - case "scte27SourceSettings": - if err := awsRestjson1_deserializeDocumentScte27SourceSettings(&sv.Scte27SourceSettings, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } - case "teletextSourceSettings": - if err := awsRestjson1_deserializeDocumentTeletextSourceSettings(&sv.TeletextSourceSettings, value); err != nil { + case "vpc": + if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { return err } @@ -16786,7 +23255,7 @@ func awsRestjson1_deserializeDocumentCaptionSelectorSettings(v **types.CaptionSe return nil } -func awsRestjson1_deserializeDocumentCdiInputSpecification(v **types.CdiInputSpecification, value interface{}) error { +func awsRestjson1_deserializeDocumentChannelEgressEndpoint(v **types.ChannelEgressEndpoint, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16799,22 +23268,22 @@ func awsRestjson1_deserializeDocumentCdiInputSpecification(v **types.CdiInputSpe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CdiInputSpecification + var sv *types.ChannelEgressEndpoint if *v == nil { - sv = &types.CdiInputSpecification{} + sv = &types.ChannelEgressEndpoint{} } else { sv = *v } for key, value := range shape { switch key { - case "resolution": + case "sourceIp": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CdiInputResolution to be of type string, got %T instead", value) + return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.Resolution = types.CdiInputResolution(jtv) + sv.SourceIp = ptr.String(jtv) } default: @@ -16826,7 +23295,7 @@ func awsRestjson1_deserializeDocumentCdiInputSpecification(v **types.CdiInputSpe return nil } -func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{}) error { +func awsRestjson1_deserializeDocumentChannelSummary(v **types.ChannelSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16839,9 +23308,9 @@ func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Channel + var sv *types.ChannelSummary if *v == nil { - sv = &types.Channel{} + sv = &types.ChannelSummary{} } else { sv = *v } @@ -16881,11 +23350,6 @@ func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{ return err } - case "encoderSettings": - if err := awsRestjson1_deserializeDocumentEncoderSettings(&sv.EncoderSettings, value); err != nil { - return err - } - case "id": if value != nil { jtv, ok := value.(string) @@ -16928,11 +23392,6 @@ func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{ sv.Name = ptr.String(jtv) } - case "pipelineDetails": - if err := awsRestjson1_deserializeDocument__listOfPipelineDetail(&sv.PipelineDetails, value); err != nil { - return err - } - case "pipelinesRunningCount": if value != nil { jtv, ok := value.(json.Number) @@ -16983,7 +23442,7 @@ func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{ return nil } -func awsRestjson1_deserializeDocumentChannelEgressEndpoint(v **types.ChannelEgressEndpoint, value interface{}) error { +func awsRestjson1_deserializeDocumentCloudWatchAlarmTemplateGroupSummary(v **types.CloudWatchAlarmTemplateGroupSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -16996,22 +23455,93 @@ func awsRestjson1_deserializeDocumentChannelEgressEndpoint(v **types.ChannelEgre return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ChannelEgressEndpoint + var sv *types.CloudWatchAlarmTemplateGroupSummary if *v == nil { - sv = &types.ChannelEgressEndpoint{} + sv = &types.CloudWatchAlarmTemplateGroupSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "sourceIp": + case "arn": 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 __stringPatternArnMedialiveCloudwatchAlarmTemplateGroup to be of type string, got %T instead", value) } - sv.SourceIp = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "templateCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TemplateCount = ptr.Int32(int32(i64)) } default: @@ -17023,7 +23553,7 @@ func awsRestjson1_deserializeDocumentChannelEgressEndpoint(v **types.ChannelEgre return nil } -func awsRestjson1_deserializeDocumentChannelSummary(v **types.ChannelSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentCloudWatchAlarmTemplateSummary(v **types.CloudWatchAlarmTemplateSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17036,9 +23566,9 @@ func awsRestjson1_deserializeDocumentChannelSummary(v **types.ChannelSummary, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ChannelSummary + var sv *types.CloudWatchAlarmTemplateSummary if *v == nil { - sv = &types.ChannelSummary{} + sv = &types.CloudWatchAlarmTemplateSummary{} } else { sv = *v } @@ -17049,116 +23579,194 @@ func awsRestjson1_deserializeDocumentChannelSummary(v **types.ChannelSummary, va 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 __stringPatternArnMedialiveCloudwatchAlarmTemplate to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } - case "cdiInputSpecification": - if err := awsRestjson1_deserializeDocumentCdiInputSpecification(&sv.CdiInputSpecification, value); err != nil { - return err + case "comparisonOperator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateComparisonOperator to be of type string, got %T instead", value) + } + sv.ComparisonOperator = types.CloudWatchAlarmTemplateComparisonOperator(jtv) } - case "channelClass": + case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ChannelClass to be of type string, got %T instead", value) + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) } - sv.ChannelClass = types.ChannelClass(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "destinations": - if err := awsRestjson1_deserializeDocument__listOfOutputDestination(&sv.Destinations, value); err != nil { - return err + case "datapointsToAlarm": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DatapointsToAlarm = ptr.Int32(int32(i64)) } - case "egressEndpoints": - if err := awsRestjson1_deserializeDocument__listOfChannelEgressEndpoint(&sv.EgressEndpoints, value); err != nil { - return err + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) } - case "id": + case "evaluationPeriods": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected __integerMin1 to be json.Number, got %T instead", value) } - sv.Id = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EvaluationPeriods = ptr.Int32(int32(i64)) } - case "inputAttachments": - if err := awsRestjson1_deserializeDocument__listOfInputAttachment(&sv.InputAttachments, value); err != nil { - return err + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) } - case "inputSpecification": - if err := awsRestjson1_deserializeDocumentInputSpecification(&sv.InputSpecification, value); err != nil { - return err + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) } - case "logLevel": + case "metricName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LogLevel to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMax64 to be of type string, got %T instead", value) } - sv.LogLevel = types.LogLevel(jtv) + sv.MetricName = ptr.String(jtv) } - case "maintenance": - if err := awsRestjson1_deserializeDocumentMaintenanceStatus(&sv.Maintenance, value); err != nil { - return err + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "pipelinesRunningCount": + case "period": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected __integerMin10Max86400 to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.PipelinesRunningCount = ptr.Int32(int32(i64)) + sv.Period = ptr.Int32(int32(i64)) } - case "roleArn": + case "statistic": 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 CloudWatchAlarmTemplateStatistic to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.Statistic = types.CloudWatchAlarmTemplateStatistic(jtv) } - case "state": + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "targetResourceType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ChannelState to be of type string, got %T instead", value) + return fmt.Errorf("expected CloudWatchAlarmTemplateTargetResourceType to be of type string, got %T instead", value) } - sv.State = types.ChannelState(jtv) + sv.TargetResourceType = types.CloudWatchAlarmTemplateTargetResourceType(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err + case "threshold": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Threshold = ptr.Float64(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) + + } + sv.Threshold = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } } - case "vpc": - if err := awsRestjson1_deserializeDocumentVpcOutputSettingsDescription(&sv.Vpc, value); err != nil { - return err + case "treatMissingData": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CloudWatchAlarmTemplateTreatMissingData to be of type string, got %T instead", value) + } + sv.TreatMissingData = types.CloudWatchAlarmTemplateTreatMissingData(jtv) } default: @@ -18067,7 +24675,259 @@ func awsRestjson1_deserializeDocumentEac3AtmosSettings(v **types.Eac3AtmosSettin return fmt.Errorf("unknown JSON number value: %s", jtv) } - sv.HeightTrim = ptr.Float64(f64) + sv.HeightTrim = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "surroundTrim": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.SurroundTrim = ptr.Float64(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) + + } + sv.SurroundTrim = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEac3Settings(v **types.Eac3Settings, 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.Eac3Settings + if *v == nil { + sv = &types.Eac3Settings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "attenuationControl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3AttenuationControl to be of type string, got %T instead", value) + } + sv.AttenuationControl = types.Eac3AttenuationControl(jtv) + } + + case "bitrate": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Bitrate = ptr.Float64(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) + + } + sv.Bitrate = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "bitstreamMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3BitstreamMode to be of type string, got %T instead", value) + } + sv.BitstreamMode = types.Eac3BitstreamMode(jtv) + } + + case "codingMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3CodingMode to be of type string, got %T instead", value) + } + sv.CodingMode = types.Eac3CodingMode(jtv) + } + + case "dcFilter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3DcFilter to be of type string, got %T instead", value) + } + sv.DcFilter = types.Eac3DcFilter(jtv) + } + + case "dialnorm": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max31 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Dialnorm = ptr.Int32(int32(i64)) + } + + case "drcLine": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3DrcLine to be of type string, got %T instead", value) + } + sv.DrcLine = types.Eac3DrcLine(jtv) + } + + case "drcRf": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3DrcRf to be of type string, got %T instead", value) + } + sv.DrcRf = types.Eac3DrcRf(jtv) + } + + case "lfeControl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3LfeControl to be of type string, got %T instead", value) + } + sv.LfeControl = types.Eac3LfeControl(jtv) + } + + case "lfeFilter": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3LfeFilter to be of type string, got %T instead", value) + } + sv.LfeFilter = types.Eac3LfeFilter(jtv) + } + + case "loRoCenterMixLevel": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LoRoCenterMixLevel = ptr.Float64(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) + + } + sv.LoRoCenterMixLevel = ptr.Float64(f64) + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } + } + + case "loRoSurroundMixLevel": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LoRoSurroundMixLevel = ptr.Float64(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) + + } + sv.LoRoSurroundMixLevel = ptr.Float64(f64) default: return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) @@ -18075,7 +24935,7 @@ func awsRestjson1_deserializeDocumentEac3AtmosSettings(v **types.Eac3AtmosSettin } } - case "surroundTrim": + case "ltRtCenterMixLevel": if value != nil { switch jtv := value.(type) { case json.Number: @@ -18083,7 +24943,7 @@ func awsRestjson1_deserializeDocumentEac3AtmosSettings(v **types.Eac3AtmosSettin if err != nil { return err } - sv.SurroundTrim = ptr.Float64(f64) + sv.LtRtCenterMixLevel = ptr.Float64(f64) case string: var f64 float64 @@ -18101,7 +24961,7 @@ func awsRestjson1_deserializeDocumentEac3AtmosSettings(v **types.Eac3AtmosSettin return fmt.Errorf("unknown JSON number value: %s", jtv) } - sv.SurroundTrim = ptr.Float64(f64) + sv.LtRtCenterMixLevel = ptr.Float64(f64) default: return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) @@ -18109,47 +24969,7 @@ func awsRestjson1_deserializeDocumentEac3AtmosSettings(v **types.Eac3AtmosSettin } } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentEac3Settings(v **types.Eac3Settings, 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.Eac3Settings - if *v == nil { - sv = &types.Eac3Settings{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "attenuationControl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Eac3AttenuationControl to be of type string, got %T instead", value) - } - sv.AttenuationControl = types.Eac3AttenuationControl(jtv) - } - - case "bitrate": + case "ltRtSurroundMixLevel": if value != nil { switch jtv := value.(type) { case json.Number: @@ -18157,7 +24977,7 @@ func awsRestjson1_deserializeDocumentEac3Settings(v **types.Eac3Settings, value if err != nil { return err } - sv.Bitrate = ptr.Float64(f64) + sv.LtRtSurroundMixLevel = ptr.Float64(f64) case string: var f64 float64 @@ -18175,7 +24995,7 @@ func awsRestjson1_deserializeDocumentEac3Settings(v **types.Eac3Settings, value return fmt.Errorf("unknown JSON number value: %s", jtv) } - sv.Bitrate = ptr.Float64(f64) + sv.LtRtSurroundMixLevel = ptr.Float64(f64) default: return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) @@ -18183,270 +25003,363 @@ func awsRestjson1_deserializeDocumentEac3Settings(v **types.Eac3Settings, value } } - case "bitstreamMode": + case "metadataControl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Eac3BitstreamMode to be of type string, got %T instead", value) + return fmt.Errorf("expected Eac3MetadataControl to be of type string, got %T instead", value) } - sv.BitstreamMode = types.Eac3BitstreamMode(jtv) + sv.MetadataControl = types.Eac3MetadataControl(jtv) } - case "codingMode": + case "passthroughControl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Eac3CodingMode to be of type string, got %T instead", value) + return fmt.Errorf("expected Eac3PassthroughControl to be of type string, got %T instead", value) } - sv.CodingMode = types.Eac3CodingMode(jtv) + sv.PassthroughControl = types.Eac3PassthroughControl(jtv) } - case "dcFilter": + case "phaseControl": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Eac3DcFilter to be of type string, got %T instead", value) + return fmt.Errorf("expected Eac3PhaseControl to be of type string, got %T instead", value) } - sv.DcFilter = types.Eac3DcFilter(jtv) + sv.PhaseControl = types.Eac3PhaseControl(jtv) } - case "dialnorm": + case "stereoDownmix": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __integerMin1Max31 to be json.Number, got %T instead", value) + return fmt.Errorf("expected Eac3StereoDownmix to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.StereoDownmix = types.Eac3StereoDownmix(jtv) + } + + case "surroundExMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Eac3SurroundExMode to be of type string, got %T instead", value) } - sv.Dialnorm = ptr.Int32(int32(i64)) + sv.SurroundExMode = types.Eac3SurroundExMode(jtv) } - case "drcLine": + case "surroundMode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Eac3DrcLine to be of type string, got %T instead", value) + return fmt.Errorf("expected Eac3SurroundMode to be of type string, got %T instead", value) } - sv.DrcLine = types.Eac3DrcLine(jtv) + sv.SurroundMode = types.Eac3SurroundMode(jtv) } - case "drcRf": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEbuTtDDestinationSettings(v **types.EbuTtDDestinationSettings, 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.EbuTtDDestinationSettings + if *v == nil { + sv = &types.EbuTtDDestinationSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "copyrightHolder": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Eac3DrcRf to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMax1000 to be of type string, got %T instead", value) } - sv.DrcRf = types.Eac3DrcRf(jtv) + sv.CopyrightHolder = ptr.String(jtv) } - case "lfeControl": + case "fillLineGap": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EbuTtDFillLineGapControl to be of type string, got %T instead", value) + } + sv.FillLineGap = types.EbuTtDFillLineGapControl(jtv) + } + + case "fontFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FontFamily = ptr.String(jtv) + } + + case "styleControl": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EbuTtDDestinationStyleControl to be of type string, got %T instead", value) + } + sv.StyleControl = types.EbuTtDDestinationStyleControl(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmbeddedDestinationSettings(v **types.EmbeddedDestinationSettings, 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.EmbeddedDestinationSettings + if *v == nil { + sv = &types.EmbeddedDestinationSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmbeddedPlusScte20DestinationSettings(v **types.EmbeddedPlusScte20DestinationSettings, 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.EmbeddedPlusScte20DestinationSettings + if *v == nil { + sv = &types.EmbeddedPlusScte20DestinationSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEmbeddedSourceSettings(v **types.EmbeddedSourceSettings, 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.EmbeddedSourceSettings + if *v == nil { + sv = &types.EmbeddedSourceSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "convert608To708": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Eac3LfeControl to be of type string, got %T instead", value) + return fmt.Errorf("expected EmbeddedConvert608To708 to be of type string, got %T instead", value) } - sv.LfeControl = types.Eac3LfeControl(jtv) + sv.Convert608To708 = types.EmbeddedConvert608To708(jtv) } - case "lfeFilter": + case "scte20Detection": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Eac3LfeFilter to be of type string, got %T instead", value) + return fmt.Errorf("expected EmbeddedScte20Detection to be of type string, got %T instead", value) } - sv.LfeFilter = types.Eac3LfeFilter(jtv) + sv.Scte20Detection = types.EmbeddedScte20Detection(jtv) } - case "loRoCenterMixLevel": + case "source608ChannelNumber": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LoRoCenterMixLevel = ptr.Float64(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) - - } - sv.LoRoCenterMixLevel = ptr.Float64(f64) - - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) - + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max4 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err } + sv.Source608ChannelNumber = ptr.Int32(int32(i64)) } - case "loRoSurroundMixLevel": + case "source608TrackNumber": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LoRoSurroundMixLevel = ptr.Float64(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) - - } - sv.LoRoSurroundMixLevel = ptr.Float64(f64) - - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) - + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMin1Max5 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err } + sv.Source608TrackNumber = ptr.Int32(int32(i64)) } - case "ltRtCenterMixLevel": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LtRtCenterMixLevel = ptr.Float64(f64) - - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() - - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + default: + _, _ = key, value - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + } + } + *v = sv + return nil +} - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) +func awsRestjson1_deserializeDocumentEncoderSettings(v **types.EncoderSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - } - sv.LtRtCenterMixLevel = ptr.Float64(f64) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + var sv *types.EncoderSettings + if *v == nil { + sv = &types.EncoderSettings{} + } else { + sv = *v + } - } + for key, value := range shape { + switch key { + case "audioDescriptions": + if err := awsRestjson1_deserializeDocument__listOfAudioDescription(&sv.AudioDescriptions, value); err != nil { + return err } - case "ltRtSurroundMixLevel": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LtRtSurroundMixLevel = ptr.Float64(f64) - - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + case "availBlanking": + if err := awsRestjson1_deserializeDocumentAvailBlanking(&sv.AvailBlanking, value); err != nil { + return err + } - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + case "availConfiguration": + if err := awsRestjson1_deserializeDocumentAvailConfiguration(&sv.AvailConfiguration, value); err != nil { + return err + } - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + case "blackoutSlate": + if err := awsRestjson1_deserializeDocumentBlackoutSlate(&sv.BlackoutSlate, value); err != nil { + return err + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + case "captionDescriptions": + if err := awsRestjson1_deserializeDocument__listOfCaptionDescription(&sv.CaptionDescriptions, value); err != nil { + return err + } - } - sv.LtRtSurroundMixLevel = ptr.Float64(f64) + case "colorCorrectionSettings": + if err := awsRestjson1_deserializeDocumentColorCorrectionSettings(&sv.ColorCorrectionSettings, value); err != nil { + return err + } - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + case "featureActivations": + if err := awsRestjson1_deserializeDocumentFeatureActivations(&sv.FeatureActivations, value); err != nil { + return err + } - } + case "globalConfiguration": + if err := awsRestjson1_deserializeDocumentGlobalConfiguration(&sv.GlobalConfiguration, value); err != nil { + return err } - case "metadataControl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Eac3MetadataControl to be of type string, got %T instead", value) - } - sv.MetadataControl = types.Eac3MetadataControl(jtv) + case "motionGraphicsConfiguration": + if err := awsRestjson1_deserializeDocumentMotionGraphicsConfiguration(&sv.MotionGraphicsConfiguration, value); err != nil { + return err } - case "passthroughControl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Eac3PassthroughControl to be of type string, got %T instead", value) - } - sv.PassthroughControl = types.Eac3PassthroughControl(jtv) + case "nielsenConfiguration": + if err := awsRestjson1_deserializeDocumentNielsenConfiguration(&sv.NielsenConfiguration, value); err != nil { + return err } - case "phaseControl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Eac3PhaseControl to be of type string, got %T instead", value) - } - sv.PhaseControl = types.Eac3PhaseControl(jtv) + case "outputGroups": + if err := awsRestjson1_deserializeDocument__listOfOutputGroup(&sv.OutputGroups, value); err != nil { + return err } - case "stereoDownmix": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Eac3StereoDownmix to be of type string, got %T instead", value) - } - sv.StereoDownmix = types.Eac3StereoDownmix(jtv) + case "thumbnailConfiguration": + if err := awsRestjson1_deserializeDocumentThumbnailConfiguration(&sv.ThumbnailConfiguration, value); err != nil { + return err } - case "surroundExMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Eac3SurroundExMode to be of type string, got %T instead", value) - } - sv.SurroundExMode = types.Eac3SurroundExMode(jtv) + case "timecodeConfig": + if err := awsRestjson1_deserializeDocumentTimecodeConfig(&sv.TimecodeConfig, value); err != nil { + return err } - case "surroundMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Eac3SurroundMode to be of type string, got %T instead", value) - } - sv.SurroundMode = types.Eac3SurroundMode(jtv) + case "videoDescriptions": + if err := awsRestjson1_deserializeDocument__listOfVideoDescription(&sv.VideoDescriptions, value); err != nil { + return err } default: @@ -18458,7 +25371,7 @@ func awsRestjson1_deserializeDocumentEac3Settings(v **types.Eac3Settings, value return nil } -func awsRestjson1_deserializeDocumentEbuTtDDestinationSettings(v **types.EbuTtDDestinationSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentEpochLockingSettings(v **types.EpochLockingSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18471,49 +25384,31 @@ func awsRestjson1_deserializeDocumentEbuTtDDestinationSettings(v **types.EbuTtDD return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EbuTtDDestinationSettings + var sv *types.EpochLockingSettings if *v == nil { - sv = &types.EbuTtDDestinationSettings{} + sv = &types.EpochLockingSettings{} } else { sv = *v } for key, value := range shape { switch key { - case "copyrightHolder": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __stringMax1000 to be of type string, got %T instead", value) - } - sv.CopyrightHolder = ptr.String(jtv) - } - - case "fillLineGap": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EbuTtDFillLineGapControl to be of type string, got %T instead", value) - } - sv.FillLineGap = types.EbuTtDFillLineGapControl(jtv) - } - - case "fontFamily": + case "customEpoch": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.FontFamily = ptr.String(jtv) + sv.CustomEpoch = ptr.String(jtv) } - case "styleControl": + case "jamSyncTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EbuTtDDestinationStyleControl to be of type string, got %T instead", value) + return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.StyleControl = types.EbuTtDDestinationStyleControl(jtv) + sv.JamSyncTime = ptr.String(jtv) } default: @@ -18525,7 +25420,7 @@ func awsRestjson1_deserializeDocumentEbuTtDDestinationSettings(v **types.EbuTtDD return nil } -func awsRestjson1_deserializeDocumentEmbeddedDestinationSettings(v **types.EmbeddedDestinationSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentEsam(v **types.Esam, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18538,46 +25433,73 @@ func awsRestjson1_deserializeDocumentEmbeddedDestinationSettings(v **types.Embed return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EmbeddedDestinationSettings + var sv *types.Esam if *v == nil { - sv = &types.EmbeddedDestinationSettings{} + sv = &types.Esam{} } else { sv = *v } for key, value := range shape { switch key { - default: - _, _ = key, value + case "acquisitionPointId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax256 to be of type string, got %T instead", value) + } + sv.AcquisitionPointId = ptr.String(jtv) + } - } - } - *v = sv - return nil -} + case "adAvailOffset": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMinNegative1000Max1000 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AdAvailOffset = ptr.Int32(int32(i64)) + } -func awsRestjson1_deserializeDocumentEmbeddedPlusScte20DestinationSettings(v **types.EmbeddedPlusScte20DestinationSettings, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "passwordParam": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.PasswordParam = ptr.String(jtv) + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "poisEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax2048 to be of type string, got %T instead", value) + } + sv.PoisEndpoint = ptr.String(jtv) + } - var sv *types.EmbeddedPlusScte20DestinationSettings - if *v == nil { - sv = &types.EmbeddedPlusScte20DestinationSettings{} - } else { - sv = *v - } + case "username": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Username = ptr.String(jtv) + } + + case "zoneIdentity": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMax256 to be of type string, got %T instead", value) + } + sv.ZoneIdentity = ptr.String(jtv) + } - for key, value := range shape { - switch key { default: _, _ = key, value @@ -18587,7 +25509,7 @@ func awsRestjson1_deserializeDocumentEmbeddedPlusScte20DestinationSettings(v **t return nil } -func awsRestjson1_deserializeDocumentEmbeddedSourceSettings(v **types.EmbeddedSourceSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentEventBridgeRuleTemplateGroupSummary(v **types.EventBridgeRuleTemplateGroupSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18600,57 +25522,93 @@ func awsRestjson1_deserializeDocumentEmbeddedSourceSettings(v **types.EmbeddedSo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EmbeddedSourceSettings + var sv *types.EventBridgeRuleTemplateGroupSummary if *v == nil { - sv = &types.EmbeddedSourceSettings{} + sv = &types.EventBridgeRuleTemplateGroupSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "convert608To708": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmbeddedConvert608To708 to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringPatternArnMedialiveEventbridgeRuleTemplateGroup to be of type string, got %T instead", value) } - sv.Convert608To708 = types.EmbeddedConvert608To708(jtv) + sv.Arn = ptr.String(jtv) } - case "scte20Detection": + case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EmbeddedScte20Detection to be of type string, got %T instead", value) + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) } - sv.Scte20Detection = types.EmbeddedScte20Detection(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "source608ChannelNumber": + case "description": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __integerMin1Max4 to be json.Number, got %T instead", value) + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) } - i64, err := jtv.Int64() + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) if err != nil { return err } - sv.Source608ChannelNumber = ptr.Int32(int32(i64)) + sv.ModifiedAt = ptr.Time(t) } - case "source608TrackNumber": + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "templateCount": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected __integerMin1Max5 to be json.Number, got %T instead", value) + return fmt.Errorf("expected __integer to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.Source608TrackNumber = ptr.Int32(int32(i64)) + sv.TemplateCount = ptr.Int32(int32(i64)) } default: @@ -18662,7 +25620,7 @@ func awsRestjson1_deserializeDocumentEmbeddedSourceSettings(v **types.EmbeddedSo return nil } -func awsRestjson1_deserializeDocumentEncoderSettings(v **types.EncoderSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentEventBridgeRuleTemplateSummary(v **types.EventBridgeRuleTemplateSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18675,82 +25633,110 @@ func awsRestjson1_deserializeDocumentEncoderSettings(v **types.EncoderSettings, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EncoderSettings + var sv *types.EventBridgeRuleTemplateSummary if *v == nil { - sv = &types.EncoderSettings{} + sv = &types.EventBridgeRuleTemplateSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "audioDescriptions": - if err := awsRestjson1_deserializeDocument__listOfAudioDescription(&sv.AudioDescriptions, value); err != nil { - return err - } - - case "availBlanking": - if err := awsRestjson1_deserializeDocumentAvailBlanking(&sv.AvailBlanking, value); err != nil { - return err - } - - case "availConfiguration": - if err := awsRestjson1_deserializeDocumentAvailConfiguration(&sv.AvailConfiguration, value); err != nil { - return err - } - - case "blackoutSlate": - if err := awsRestjson1_deserializeDocumentBlackoutSlate(&sv.BlackoutSlate, value); err != nil { - return err - } - - case "captionDescriptions": - if err := awsRestjson1_deserializeDocument__listOfCaptionDescription(&sv.CaptionDescriptions, value); err != nil { - return err + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringPatternArnMedialiveEventbridgeRuleTemplate to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) } - case "colorCorrectionSettings": - if err := awsRestjson1_deserializeDocumentColorCorrectionSettings(&sv.ColorCorrectionSettings, value); err != nil { - return err + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "featureActivations": - if err := awsRestjson1_deserializeDocumentFeatureActivations(&sv.FeatureActivations, value); err != nil { - return err + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) } - case "globalConfiguration": - if err := awsRestjson1_deserializeDocumentGlobalConfiguration(&sv.GlobalConfiguration, value); err != nil { - return err + case "eventTargetCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected __integerMax5 to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.EventTargetCount = ptr.Int32(int32(i64)) } - case "motionGraphicsConfiguration": - if err := awsRestjson1_deserializeDocumentMotionGraphicsConfiguration(&sv.MotionGraphicsConfiguration, value); err != nil { - return err + case "eventType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EventBridgeRuleTemplateEventType to be of type string, got %T instead", value) + } + sv.EventType = types.EventBridgeRuleTemplateEventType(jtv) } - case "nielsenConfiguration": - if err := awsRestjson1_deserializeDocumentNielsenConfiguration(&sv.NielsenConfiguration, value); err != nil { - return err + case "groupId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.GroupId = ptr.String(jtv) } - case "outputGroups": - if err := awsRestjson1_deserializeDocument__listOfOutputGroup(&sv.OutputGroups, value); err != nil { - return err + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) } - case "thumbnailConfiguration": - if err := awsRestjson1_deserializeDocumentThumbnailConfiguration(&sv.ThumbnailConfiguration, value); err != nil { - return err + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) } - case "timecodeConfig": - if err := awsRestjson1_deserializeDocumentTimecodeConfig(&sv.TimecodeConfig, value); err != nil { - return err + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) } - case "videoDescriptions": - if err := awsRestjson1_deserializeDocument__listOfVideoDescription(&sv.VideoDescriptions, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -18763,7 +25749,7 @@ func awsRestjson1_deserializeDocumentEncoderSettings(v **types.EncoderSettings, return nil } -func awsRestjson1_deserializeDocumentEpochLockingSettings(v **types.EpochLockingSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentEventBridgeRuleTemplateTarget(v **types.EventBridgeRuleTemplateTarget, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18776,31 +25762,22 @@ func awsRestjson1_deserializeDocumentEpochLockingSettings(v **types.EpochLocking return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EpochLockingSettings + var sv *types.EventBridgeRuleTemplateTarget if *v == nil { - sv = &types.EpochLockingSettings{} + sv = &types.EventBridgeRuleTemplateTarget{} } else { sv = *v } for key, value := range shape { switch key { - case "customEpoch": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.CustomEpoch = ptr.String(jtv) - } - - case "jamSyncTime": + case "arn": 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 __stringMin1Max2048PatternArn to be of type string, got %T instead", value) } - sv.JamSyncTime = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } default: @@ -18812,7 +25789,7 @@ func awsRestjson1_deserializeDocumentEpochLockingSettings(v **types.EpochLocking return nil } -func awsRestjson1_deserializeDocumentEsam(v **types.Esam, value interface{}) error { +func awsRestjson1_deserializeDocumentFailedMediaResourceMap(v *map[string]types.MediaResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -18825,79 +25802,25 @@ func awsRestjson1_deserializeDocumentEsam(v **types.Esam, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Esam + var mv map[string]types.MediaResource if *v == nil { - sv = &types.Esam{} + mv = map[string]types.MediaResource{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "acquisitionPointId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __stringMax256 to be of type string, got %T instead", value) - } - sv.AcquisitionPointId = ptr.String(jtv) - } - - case "adAvailOffset": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected __integerMinNegative1000Max1000 to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AdAvailOffset = ptr.Int32(int32(i64)) - } - - case "passwordParam": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.PasswordParam = ptr.String(jtv) - } - - case "poisEndpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __stringMax2048 to be of type string, got %T instead", value) - } - sv.PoisEndpoint = ptr.String(jtv) - } - - case "username": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.Username = ptr.String(jtv) - } - - case "zoneIdentity": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __stringMax256 to be of type string, got %T instead", value) - } - sv.ZoneIdentity = ptr.String(jtv) - } - - default: - _, _ = key, value - + var parsedVal types.MediaResource + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentMediaResource(&destAddr, value); err != nil { + return err } + parsedVal = *destAddr + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } @@ -24772,7 +31695,154 @@ func awsRestjson1_deserializeDocumentMaintenanceStatus(v **types.MaintenanceStat return nil } -func awsRestjson1_deserializeDocumentMediaConnectFlow(v **types.MediaConnectFlow, value interface{}) error { +func awsRestjson1_deserializeDocumentMediaConnectFlow(v **types.MediaConnectFlow, 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.MediaConnectFlow + if *v == nil { + sv = &types.MediaConnectFlow{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMediaPackageGroupSettings(v **types.MediaPackageGroupSettings, 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.MediaPackageGroupSettings + if *v == nil { + sv = &types.MediaPackageGroupSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "destination": + if err := awsRestjson1_deserializeDocumentOutputLocationRef(&sv.Destination, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMediaPackageOutputDestinationSettings(v **types.MediaPackageOutputDestinationSettings, 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.MediaPackageOutputDestinationSettings + if *v == nil { + sv = &types.MediaPackageOutputDestinationSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "channelId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1 to be of type string, got %T instead", value) + } + sv.ChannelId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMediaPackageOutputSettings(v **types.MediaPackageOutputSettings, 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.MediaPackageOutputSettings + if *v == nil { + sv = &types.MediaPackageOutputSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMediaResource(v **types.MediaResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24785,22 +31855,32 @@ func awsRestjson1_deserializeDocumentMediaConnectFlow(v **types.MediaConnectFlow return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MediaConnectFlow + var sv *types.MediaResource if *v == nil { - sv = &types.MediaConnectFlow{} + sv = &types.MediaResource{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": + case "destinations": + if err := awsRestjson1_deserializeDocument__listOfMediaResourceNeighbor(&sv.Destinations, value); err != nil { + return err + } + + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMin1Max256 to be of type string, got %T instead", value) } - sv.FlowArn = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "sources": + if err := awsRestjson1_deserializeDocument__listOfMediaResourceNeighbor(&sv.Sources, value); err != nil { + return err } default: @@ -24812,7 +31892,7 @@ func awsRestjson1_deserializeDocumentMediaConnectFlow(v **types.MediaConnectFlow return nil } -func awsRestjson1_deserializeDocumentMediaPackageGroupSettings(v **types.MediaPackageGroupSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentMediaResourceMap(v *map[string]types.MediaResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24825,30 +31905,29 @@ func awsRestjson1_deserializeDocumentMediaPackageGroupSettings(v **types.MediaPa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MediaPackageGroupSettings + var mv map[string]types.MediaResource if *v == nil { - sv = &types.MediaPackageGroupSettings{} + mv = map[string]types.MediaResource{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "destination": - if err := awsRestjson1_deserializeDocumentOutputLocationRef(&sv.Destination, value); err != nil { - return err - } - - default: - _, _ = key, value - + var parsedVal types.MediaResource + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentMediaResource(&destAddr, value); err != nil { + return err } + parsedVal = *destAddr + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } -func awsRestjson1_deserializeDocumentMediaPackageOutputDestinationSettings(v **types.MediaPackageOutputDestinationSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentMediaResourceNeighbor(v **types.MediaResourceNeighbor, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24861,22 +31940,31 @@ func awsRestjson1_deserializeDocumentMediaPackageOutputDestinationSettings(v **t return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MediaPackageOutputDestinationSettings + var sv *types.MediaResourceNeighbor if *v == nil { - sv = &types.MediaPackageOutputDestinationSettings{} + sv = &types.MediaResourceNeighbor{} } else { sv = *v } for key, value := range shape { switch key { - case "channelId": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __stringMin1 to be of type string, got %T instead", value) + return fmt.Errorf("expected __stringMin1Max2048PatternArn to be of type string, got %T instead", value) } - sv.ChannelId = ptr.String(jtv) + sv.Arn = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max256 to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) } default: @@ -24888,7 +31976,7 @@ func awsRestjson1_deserializeDocumentMediaPackageOutputDestinationSettings(v **t return nil } -func awsRestjson1_deserializeDocumentMediaPackageOutputSettings(v **types.MediaPackageOutputSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentMonitorDeployment(v **types.MonitorDeployment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -24901,15 +31989,42 @@ func awsRestjson1_deserializeDocumentMediaPackageOutputSettings(v **types.MediaP return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.MediaPackageOutputSettings + var sv *types.MonitorDeployment if *v == nil { - sv = &types.MediaPackageOutputSettings{} + sv = &types.MonitorDeployment{} } else { sv = *v } for key, value := range shape { switch key { + case "detailsUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.DetailsUri = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapMonitorDeploymentStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapMonitorDeploymentStatus(jtv) + } + default: _, _ = key, value @@ -29768,6 +36883,122 @@ func awsRestjson1_deserializeDocumentScte35TimeSignalScheduleActionSettings(v ** return nil } +func awsRestjson1_deserializeDocumentSignalMapSummary(v **types.SignalMapSummary, 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.SignalMapSummary + if *v == nil { + sv = &types.SignalMapSummary{} + } 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 __stringPatternArnMedialiveSignalMap to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin0Max1024 to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin7Max11PatternAws097 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __timestampIso8601 to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "monitorDeploymentStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapMonitorDeploymentStatus to be of type string, got %T instead", value) + } + sv.MonitorDeploymentStatus = types.SignalMapMonitorDeploymentStatus(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max255PatternS to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentSmpteTtDestinationSettings(v **types.SmpteTtDestinationSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -30408,6 +37639,91 @@ func awsRestjson1_deserializeDocumentStopTimecode(v **types.StopTimecode, value return nil } +func awsRestjson1_deserializeDocumentSuccessfulMonitorDeployment(v **types.SuccessfulMonitorDeployment, 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.SuccessfulMonitorDeployment + if *v == nil { + sv = &types.SuccessfulMonitorDeployment{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "detailsUri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __stringMin1Max2048 to be of type string, got %T instead", value) + } + sv.DetailsUri = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SignalMapMonitorDeploymentStatus to be of type string, got %T instead", value) + } + sv.Status = types.SignalMapMonitorDeploymentStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentTags(v *map[string]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/medialive/generated.json b/service/medialive/generated.json index 44b827fa9bc..452fa8a3d88 100644 --- a/service/medialive/generated.json +++ b/service/medialive/generated.json @@ -17,19 +17,29 @@ "api_op_CancelInputDeviceTransfer.go", "api_op_ClaimDevice.go", "api_op_CreateChannel.go", + "api_op_CreateCloudWatchAlarmTemplate.go", + "api_op_CreateCloudWatchAlarmTemplateGroup.go", + "api_op_CreateEventBridgeRuleTemplate.go", + "api_op_CreateEventBridgeRuleTemplateGroup.go", "api_op_CreateInput.go", "api_op_CreateInputSecurityGroup.go", "api_op_CreateMultiplex.go", "api_op_CreateMultiplexProgram.go", "api_op_CreatePartnerInput.go", + "api_op_CreateSignalMap.go", "api_op_CreateTags.go", "api_op_DeleteChannel.go", + "api_op_DeleteCloudWatchAlarmTemplate.go", + "api_op_DeleteCloudWatchAlarmTemplateGroup.go", + "api_op_DeleteEventBridgeRuleTemplate.go", + "api_op_DeleteEventBridgeRuleTemplateGroup.go", "api_op_DeleteInput.go", "api_op_DeleteInputSecurityGroup.go", "api_op_DeleteMultiplex.go", "api_op_DeleteMultiplexProgram.go", "api_op_DeleteReservation.go", "api_op_DeleteSchedule.go", + "api_op_DeleteSignalMap.go", "api_op_DeleteTags.go", "api_op_DescribeAccountConfiguration.go", "api_op_DescribeChannel.go", @@ -43,7 +53,16 @@ "api_op_DescribeReservation.go", "api_op_DescribeSchedule.go", "api_op_DescribeThumbnails.go", + "api_op_GetCloudWatchAlarmTemplate.go", + "api_op_GetCloudWatchAlarmTemplateGroup.go", + "api_op_GetEventBridgeRuleTemplate.go", + "api_op_GetEventBridgeRuleTemplateGroup.go", + "api_op_GetSignalMap.go", "api_op_ListChannels.go", + "api_op_ListCloudWatchAlarmTemplateGroups.go", + "api_op_ListCloudWatchAlarmTemplates.go", + "api_op_ListEventBridgeRuleTemplateGroups.go", + "api_op_ListEventBridgeRuleTemplates.go", "api_op_ListInputDeviceTransfers.go", "api_op_ListInputDevices.go", "api_op_ListInputSecurityGroups.go", @@ -52,15 +71,19 @@ "api_op_ListMultiplexes.go", "api_op_ListOfferings.go", "api_op_ListReservations.go", + "api_op_ListSignalMaps.go", "api_op_ListTagsForResource.go", "api_op_PurchaseOffering.go", "api_op_RebootInputDevice.go", "api_op_RejectInputDeviceTransfer.go", "api_op_RestartChannelPipelines.go", "api_op_StartChannel.go", + "api_op_StartDeleteMonitorDeployment.go", "api_op_StartInputDevice.go", "api_op_StartInputDeviceMaintenanceWindow.go", + "api_op_StartMonitorDeployment.go", "api_op_StartMultiplex.go", + "api_op_StartUpdateSignalMap.go", "api_op_StopChannel.go", "api_op_StopInputDevice.go", "api_op_StopMultiplex.go", @@ -68,6 +91,10 @@ "api_op_UpdateAccountConfiguration.go", "api_op_UpdateChannel.go", "api_op_UpdateChannelClass.go", + "api_op_UpdateCloudWatchAlarmTemplate.go", + "api_op_UpdateCloudWatchAlarmTemplateGroup.go", + "api_op_UpdateEventBridgeRuleTemplate.go", + "api_op_UpdateEventBridgeRuleTemplateGroup.go", "api_op_UpdateInput.go", "api_op_UpdateInputDevice.go", "api_op_UpdateInputSecurityGroup.go", diff --git a/service/medialive/serializers.go b/service/medialive/serializers.go index a0e645ce901..312868e8ae6 100644 --- a/service/medialive/serializers.go +++ b/service/medialive/serializers.go @@ -739,14 +739,14 @@ func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, v return nil } -type awsRestjson1_serializeOpCreateInput struct { +type awsRestjson1_serializeOpCreateCloudWatchAlarmTemplate struct { } -func (*awsRestjson1_serializeOpCreateInput) ID() string { +func (*awsRestjson1_serializeOpCreateCloudWatchAlarmTemplate) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateInput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateCloudWatchAlarmTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -754,13 +754,13 @@ func (m *awsRestjson1_serializeOpCreateInput) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateInputInput) + input, ok := in.Parameters.(*CreateCloudWatchAlarmTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputs") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-templates") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -779,7 +779,7 @@ func (m *awsRestjson1_serializeOpCreateInput) HandleSerialize(ctx context.Contex restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateInputInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateCloudWatchAlarmTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -794,7 +794,7 @@ func (m *awsRestjson1_serializeOpCreateInput) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateInputInput(v *CreateInputInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateCloudWatchAlarmTemplateInput(v *CreateCloudWatchAlarmTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -802,36 +802,38 @@ func awsRestjson1_serializeOpHttpBindingsCreateInputInput(v *CreateInputInput, e return nil } -func awsRestjson1_serializeOpDocumentCreateInputInput(v *CreateInputInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateCloudWatchAlarmTemplateInput(v *CreateCloudWatchAlarmTemplateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Destinations != nil { - ok := object.Key("destinations") - if err := awsRestjson1_serializeDocument__listOfInputDestinationRequest(v.Destinations, ok); err != nil { - return err - } + if len(v.ComparisonOperator) > 0 { + ok := object.Key("comparisonOperator") + ok.String(string(v.ComparisonOperator)) } - if v.InputDevices != nil { - ok := object.Key("inputDevices") - if err := awsRestjson1_serializeDocument__listOfInputDeviceSettings(v.InputDevices, ok); err != nil { - return err - } + if v.DatapointsToAlarm != nil { + ok := object.Key("datapointsToAlarm") + ok.Integer(*v.DatapointsToAlarm) } - if v.InputSecurityGroups != nil { - ok := object.Key("inputSecurityGroups") - if err := awsRestjson1_serializeDocument__listOf__string(v.InputSecurityGroups, ok); err != nil { - return err - } + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) } - if v.MediaConnectFlows != nil { - ok := object.Key("mediaConnectFlows") - if err := awsRestjson1_serializeDocument__listOfMediaConnectFlowRequest(v.MediaConnectFlows, ok); err != nil { - return err - } + if v.EvaluationPeriods != nil { + ok := object.Key("evaluationPeriods") + ok.Integer(*v.EvaluationPeriods) + } + + if v.GroupIdentifier != nil { + ok := object.Key("groupIdentifier") + ok.String(*v.GroupIdentifier) + } + + if v.MetricName != nil { + ok := object.Key("metricName") + ok.String(*v.MetricName) } if v.Name != nil { @@ -839,53 +841,62 @@ func awsRestjson1_serializeOpDocumentCreateInputInput(v *CreateInputInput, value ok.String(*v.Name) } - if v.RequestId != nil { - ok := object.Key("requestId") - ok.String(*v.RequestId) - } - - if v.RoleArn != nil { - ok := object.Key("roleArn") - ok.String(*v.RoleArn) + if v.Period != nil { + ok := object.Key("period") + ok.Integer(*v.Period) } - if v.Sources != nil { - ok := object.Key("sources") - if err := awsRestjson1_serializeDocument__listOfInputSourceRequest(v.Sources, ok); err != nil { - return err - } + if len(v.Statistic) > 0 { + ok := object.Key("statistic") + ok.String(string(v.Statistic)) } if v.Tags != nil { ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { return err } } - if len(v.Type) > 0 { - ok := object.Key("type") - ok.String(string(v.Type)) + if len(v.TargetResourceType) > 0 { + ok := object.Key("targetResourceType") + ok.String(string(v.TargetResourceType)) } - if v.Vpc != nil { - ok := object.Key("vpc") - if err := awsRestjson1_serializeDocumentInputVpcRequest(v.Vpc, ok); err != nil { - return err + if v.Threshold != nil { + ok := object.Key("threshold") + switch { + case math.IsNaN(*v.Threshold): + ok.String("NaN") + + case math.IsInf(*v.Threshold, 1): + ok.String("Infinity") + + case math.IsInf(*v.Threshold, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Threshold) + } } + if len(v.TreatMissingData) > 0 { + ok := object.Key("treatMissingData") + ok.String(string(v.TreatMissingData)) + } + return nil } -type awsRestjson1_serializeOpCreateInputSecurityGroup struct { +type awsRestjson1_serializeOpCreateCloudWatchAlarmTemplateGroup struct { } -func (*awsRestjson1_serializeOpCreateInputSecurityGroup) ID() string { +func (*awsRestjson1_serializeOpCreateCloudWatchAlarmTemplateGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateInputSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateCloudWatchAlarmTemplateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -893,13 +904,13 @@ func (m *awsRestjson1_serializeOpCreateInputSecurityGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateInputSecurityGroupInput) + input, ok := in.Parameters.(*CreateCloudWatchAlarmTemplateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-template-groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -918,7 +929,7 @@ func (m *awsRestjson1_serializeOpCreateInputSecurityGroup) HandleSerialize(ctx c restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateInputSecurityGroupInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateCloudWatchAlarmTemplateGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -933,7 +944,7 @@ func (m *awsRestjson1_serializeOpCreateInputSecurityGroup) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateInputSecurityGroupInput(v *CreateInputSecurityGroupInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateCloudWatchAlarmTemplateGroupInput(v *CreateCloudWatchAlarmTemplateGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -941,20 +952,23 @@ func awsRestjson1_serializeOpHttpBindingsCreateInputSecurityGroupInput(v *Create return nil } -func awsRestjson1_serializeOpDocumentCreateInputSecurityGroupInput(v *CreateInputSecurityGroupInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateCloudWatchAlarmTemplateGroupInput(v *CreateCloudWatchAlarmTemplateGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) } - if v.WhitelistRules != nil { - ok := object.Key("whitelistRules") - if err := awsRestjson1_serializeDocument__listOfInputWhitelistRuleCidr(v.WhitelistRules, ok); err != nil { + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { return err } } @@ -962,14 +976,14 @@ func awsRestjson1_serializeOpDocumentCreateInputSecurityGroupInput(v *CreateInpu return nil } -type awsRestjson1_serializeOpCreateMultiplex struct { +type awsRestjson1_serializeOpCreateEventBridgeRuleTemplate struct { } -func (*awsRestjson1_serializeOpCreateMultiplex) ID() string { +func (*awsRestjson1_serializeOpCreateEventBridgeRuleTemplate) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateMultiplex) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateEventBridgeRuleTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -977,13 +991,13 @@ func (m *awsRestjson1_serializeOpCreateMultiplex) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateMultiplexInput) + input, ok := in.Parameters.(*CreateEventBridgeRuleTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-templates") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1002,7 +1016,7 @@ func (m *awsRestjson1_serializeOpCreateMultiplex) HandleSerialize(ctx context.Co restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateMultiplexInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateEventBridgeRuleTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1017,7 +1031,7 @@ func (m *awsRestjson1_serializeOpCreateMultiplex) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateMultiplexInput(v *CreateMultiplexInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateEventBridgeRuleTemplateInput(v *CreateEventBridgeRuleTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1025,37 +1039,40 @@ func awsRestjson1_serializeOpHttpBindingsCreateMultiplexInput(v *CreateMultiplex return nil } -func awsRestjson1_serializeOpDocumentCreateMultiplexInput(v *CreateMultiplexInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateEventBridgeRuleTemplateInput(v *CreateEventBridgeRuleTemplateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AvailabilityZones != nil { - ok := object.Key("availabilityZones") - if err := awsRestjson1_serializeDocument__listOf__string(v.AvailabilityZones, ok); err != nil { - return err - } + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) } - if v.MultiplexSettings != nil { - ok := object.Key("multiplexSettings") - if err := awsRestjson1_serializeDocumentMultiplexSettings(v.MultiplexSettings, ok); err != nil { + if v.EventTargets != nil { + ok := object.Key("eventTargets") + if err := awsRestjson1_serializeDocument__listOfEventBridgeRuleTemplateTarget(v.EventTargets, ok); err != nil { return err } } + if len(v.EventType) > 0 { + ok := object.Key("eventType") + ok.String(string(v.EventType)) + } + + if v.GroupIdentifier != nil { + ok := object.Key("groupIdentifier") + ok.String(*v.GroupIdentifier) + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } - if v.RequestId != nil { - ok := object.Key("requestId") - ok.String(*v.RequestId) - } - if v.Tags != nil { ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { return err } } @@ -1063,14 +1080,14 @@ func awsRestjson1_serializeOpDocumentCreateMultiplexInput(v *CreateMultiplexInpu return nil } -type awsRestjson1_serializeOpCreateMultiplexProgram struct { +type awsRestjson1_serializeOpCreateEventBridgeRuleTemplateGroup struct { } -func (*awsRestjson1_serializeOpCreateMultiplexProgram) ID() string { +func (*awsRestjson1_serializeOpCreateEventBridgeRuleTemplateGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateMultiplexProgram) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateEventBridgeRuleTemplateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1078,13 +1095,13 @@ func (m *awsRestjson1_serializeOpCreateMultiplexProgram) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateMultiplexProgramInput) + input, ok := in.Parameters.(*CreateEventBridgeRuleTemplateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-template-groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1100,14 +1117,10 @@ func (m *awsRestjson1_serializeOpCreateMultiplexProgram) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateMultiplexProgramInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateMultiplexProgramInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateEventBridgeRuleTemplateGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1122,55 +1135,46 @@ func (m *awsRestjson1_serializeOpCreateMultiplexProgram) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateMultiplexProgramInput(v *CreateMultiplexProgramInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateEventBridgeRuleTemplateGroupInput(v *CreateEventBridgeRuleTemplateGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} - } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { - return err - } - } - return nil } -func awsRestjson1_serializeOpDocumentCreateMultiplexProgramInput(v *CreateMultiplexProgramInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateEventBridgeRuleTemplateGroupInput(v *CreateEventBridgeRuleTemplateGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.MultiplexProgramSettings != nil { - ok := object.Key("multiplexProgramSettings") - if err := awsRestjson1_serializeDocumentMultiplexProgramSettings(v.MultiplexProgramSettings, ok); err != nil { - return err - } + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) } - if v.ProgramName != nil { - ok := object.Key("programName") - ok.String(*v.ProgramName) + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) } - if v.RequestId != nil { - ok := object.Key("requestId") - ok.String(*v.RequestId) + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpCreatePartnerInput struct { +type awsRestjson1_serializeOpCreateInput struct { } -func (*awsRestjson1_serializeOpCreatePartnerInput) ID() string { +func (*awsRestjson1_serializeOpCreateInput) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreatePartnerInput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateInput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1178,13 +1182,13 @@ func (m *awsRestjson1_serializeOpCreatePartnerInput) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreatePartnerInputInput) + input, ok := in.Parameters.(*CreateInputInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputs/{InputId}/partners") + opPath, opQuery := httpbinding.SplitURI("/prod/inputs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1200,14 +1204,10 @@ func (m *awsRestjson1_serializeOpCreatePartnerInput) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreatePartnerInputInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreatePartnerInputInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateInputInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1222,32 +1222,68 @@ func (m *awsRestjson1_serializeOpCreatePartnerInput) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreatePartnerInputInput(v *CreatePartnerInputInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateInputInput(v *CreateInputInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputId == nil || len(*v.InputId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputId must not be empty")} + return nil +} + +func awsRestjson1_serializeOpDocumentCreateInputInput(v *CreateInputInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destinations != nil { + ok := object.Key("destinations") + if err := awsRestjson1_serializeDocument__listOfInputDestinationRequest(v.Destinations, ok); err != nil { + return err + } } - if v.InputId != nil { - if err := encoder.SetURI("InputId").String(*v.InputId); err != nil { + + if v.InputDevices != nil { + ok := object.Key("inputDevices") + if err := awsRestjson1_serializeDocument__listOfInputDeviceSettings(v.InputDevices, ok); err != nil { return err } } - return nil -} + if v.InputSecurityGroups != nil { + ok := object.Key("inputSecurityGroups") + if err := awsRestjson1_serializeDocument__listOf__string(v.InputSecurityGroups, ok); err != nil { + return err + } + } -func awsRestjson1_serializeOpDocumentCreatePartnerInputInput(v *CreatePartnerInputInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() + if v.MediaConnectFlows != nil { + ok := object.Key("mediaConnectFlows") + if err := awsRestjson1_serializeDocument__listOfMediaConnectFlowRequest(v.MediaConnectFlows, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } if v.RequestId != nil { ok := object.Key("requestId") ok.String(*v.RequestId) } + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + + if v.Sources != nil { + ok := object.Key("sources") + if err := awsRestjson1_serializeDocument__listOfInputSourceRequest(v.Sources, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { @@ -1255,17 +1291,29 @@ func awsRestjson1_serializeOpDocumentCreatePartnerInputInput(v *CreatePartnerInp } } + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + if v.Vpc != nil { + ok := object.Key("vpc") + if err := awsRestjson1_serializeDocumentInputVpcRequest(v.Vpc, ok); err != nil { + return err + } + } + return nil } -type awsRestjson1_serializeOpCreateTags struct { +type awsRestjson1_serializeOpCreateInputSecurityGroup struct { } -func (*awsRestjson1_serializeOpCreateTags) ID() string { +func (*awsRestjson1_serializeOpCreateInputSecurityGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateInputSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1273,13 +1321,13 @@ func (m *awsRestjson1_serializeOpCreateTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateTagsInput) + input, ok := in.Parameters.(*CreateInputSecurityGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1295,14 +1343,10 @@ func (m *awsRestjson1_serializeOpCreateTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateTagsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateTagsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateInputSecurityGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1317,16 +1361,28 @@ func (m *awsRestjson1_serializeOpCreateTags) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateTagsInput(v *CreateTagsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateInputSecurityGroupInput(v *CreateInputSecurityGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + return nil +} + +func awsRestjson1_serializeOpDocumentCreateInputSecurityGroupInput(v *CreateInputSecurityGroupInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + + if v.WhitelistRules != nil { + ok := object.Key("whitelistRules") + if err := awsRestjson1_serializeDocument__listOfInputWhitelistRuleCidr(v.WhitelistRules, ok); err != nil { return err } } @@ -1334,10 +1390,97 @@ func awsRestjson1_serializeOpHttpBindingsCreateTagsInput(v *CreateTagsInput, enc return nil } -func awsRestjson1_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value smithyjson.Value) error { +type awsRestjson1_serializeOpCreateMultiplex struct { +} + +func (*awsRestjson1_serializeOpCreateMultiplex) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateMultiplex) 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.(*CreateMultiplexInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateMultiplexInput(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_serializeOpHttpBindingsCreateMultiplexInput(v *CreateMultiplexInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateMultiplexInput(v *CreateMultiplexInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.AvailabilityZones != nil { + ok := object.Key("availabilityZones") + if err := awsRestjson1_serializeDocument__listOf__string(v.AvailabilityZones, ok); err != nil { + return err + } + } + + if v.MultiplexSettings != nil { + ok := object.Key("multiplexSettings") + if err := awsRestjson1_serializeDocumentMultiplexSettings(v.MultiplexSettings, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.RequestId != nil { + ok := object.Key("requestId") + ok.String(*v.RequestId) + } + if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { @@ -1348,14 +1491,14 @@ func awsRestjson1_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value s return nil } -type awsRestjson1_serializeOpDeleteChannel struct { +type awsRestjson1_serializeOpCreateMultiplexProgram struct { } -func (*awsRestjson1_serializeOpDeleteChannel) ID() string { +func (*awsRestjson1_serializeOpCreateMultiplexProgram) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateMultiplexProgram) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1363,16 +1506,16 @@ func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteChannelInput) + input, ok := in.Parameters.(*CreateMultiplexProgramInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}") + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1385,7 +1528,18 @@ func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateMultiplexProgramInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateMultiplexProgramInput(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} } @@ -1396,16 +1550,16 @@ func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(v *DeleteChannelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateMultiplexProgramInput(v *CreateMultiplexProgramInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { return err } } @@ -1413,14 +1567,38 @@ func awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(v *DeleteChannelInpu return nil } -type awsRestjson1_serializeOpDeleteInput struct { +func awsRestjson1_serializeOpDocumentCreateMultiplexProgramInput(v *CreateMultiplexProgramInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MultiplexProgramSettings != nil { + ok := object.Key("multiplexProgramSettings") + if err := awsRestjson1_serializeDocumentMultiplexProgramSettings(v.MultiplexProgramSettings, ok); err != nil { + return err + } + } + + if v.ProgramName != nil { + ok := object.Key("programName") + ok.String(*v.ProgramName) + } + + if v.RequestId != nil { + ok := object.Key("requestId") + ok.String(*v.RequestId) + } + + return nil } -func (*awsRestjson1_serializeOpDeleteInput) ID() string { +type awsRestjson1_serializeOpCreatePartnerInput struct { +} + +func (*awsRestjson1_serializeOpCreatePartnerInput) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteInput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreatePartnerInput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1428,16 +1606,16 @@ func (m *awsRestjson1_serializeOpDeleteInput) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteInputInput) + input, ok := in.Parameters.(*CreatePartnerInputInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputs/{InputId}") + opPath, opQuery := httpbinding.SplitURI("/prod/inputs/{InputId}/partners") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1450,7 +1628,18 @@ func (m *awsRestjson1_serializeOpDeleteInput) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteInputInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreatePartnerInputInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreatePartnerInputInput(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} } @@ -1461,7 +1650,7 @@ func (m *awsRestjson1_serializeOpDeleteInput) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteInputInput(v *DeleteInputInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreatePartnerInputInput(v *CreatePartnerInputInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1478,14 +1667,1813 @@ func awsRestjson1_serializeOpHttpBindingsDeleteInputInput(v *DeleteInputInput, e return nil } -type awsRestjson1_serializeOpDeleteInputSecurityGroup struct { +func awsRestjson1_serializeOpDocumentCreatePartnerInputInput(v *CreatePartnerInputInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RequestId != nil { + ok := object.Key("requestId") + ok.String(*v.RequestId) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateSignalMap struct { +} + +func (*awsRestjson1_serializeOpCreateSignalMap) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateSignalMap) 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.(*CreateSignalMapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/signal-maps") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateSignalMapInput(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_serializeOpHttpBindingsCreateSignalMapInput(v *CreateSignalMapInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateSignalMapInput(v *CreateSignalMapInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CloudWatchAlarmTemplateGroupIdentifiers != nil { + ok := object.Key("cloudWatchAlarmTemplateGroupIdentifiers") + if err := awsRestjson1_serializeDocument__listOf__stringPatternS(v.CloudWatchAlarmTemplateGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.DiscoveryEntryPointArn != nil { + ok := object.Key("discoveryEntryPointArn") + ok.String(*v.DiscoveryEntryPointArn) + } + + if v.EventBridgeRuleTemplateGroupIdentifiers != nil { + ok := object.Key("eventBridgeRuleTemplateGroupIdentifiers") + if err := awsRestjson1_serializeDocument__listOf__stringPatternS(v.EventBridgeRuleTemplateGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateTags struct { +} + +func (*awsRestjson1_serializeOpCreateTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateTags) 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.(*CreateTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateTagsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateTagsInput(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_serializeOpHttpBindingsCreateTagsInput(v *CreateTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteChannel struct { +} + +func (*awsRestjson1_serializeOpDeleteChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteChannel) 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.(*DeleteChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(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_serializeOpHttpBindingsDeleteChannelInput(v *DeleteChannelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + } + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplate struct { +} + +func (*awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplate) 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.(*DeleteCloudWatchAlarmTemplateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-templates/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteCloudWatchAlarmTemplateInput(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_serializeOpHttpBindingsDeleteCloudWatchAlarmTemplateInput(v *DeleteCloudWatchAlarmTemplateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplateGroup struct { +} + +func (*awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplateGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteCloudWatchAlarmTemplateGroup) 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.(*DeleteCloudWatchAlarmTemplateGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-template-groups/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteCloudWatchAlarmTemplateGroupInput(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_serializeOpHttpBindingsDeleteCloudWatchAlarmTemplateGroupInput(v *DeleteCloudWatchAlarmTemplateGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteEventBridgeRuleTemplate struct { +} + +func (*awsRestjson1_serializeOpDeleteEventBridgeRuleTemplate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteEventBridgeRuleTemplate) 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.(*DeleteEventBridgeRuleTemplateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-templates/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteEventBridgeRuleTemplateInput(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_serializeOpHttpBindingsDeleteEventBridgeRuleTemplateInput(v *DeleteEventBridgeRuleTemplateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteEventBridgeRuleTemplateGroup struct { +} + +func (*awsRestjson1_serializeOpDeleteEventBridgeRuleTemplateGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteEventBridgeRuleTemplateGroup) 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.(*DeleteEventBridgeRuleTemplateGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-template-groups/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteEventBridgeRuleTemplateGroupInput(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_serializeOpHttpBindingsDeleteEventBridgeRuleTemplateGroupInput(v *DeleteEventBridgeRuleTemplateGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteInput struct { +} + +func (*awsRestjson1_serializeOpDeleteInput) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteInput) 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.(*DeleteInputInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/inputs/{InputId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteInputInput(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_serializeOpHttpBindingsDeleteInputInput(v *DeleteInputInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InputId == nil || len(*v.InputId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputId must not be empty")} + } + if v.InputId != nil { + if err := encoder.SetURI("InputId").String(*v.InputId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteInputSecurityGroup struct { +} + +func (*awsRestjson1_serializeOpDeleteInputSecurityGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteInputSecurityGroup) 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.(*DeleteInputSecurityGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups/{InputSecurityGroupId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteInputSecurityGroupInput(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_serializeOpHttpBindingsDeleteInputSecurityGroupInput(v *DeleteInputSecurityGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InputSecurityGroupId == nil || len(*v.InputSecurityGroupId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputSecurityGroupId must not be empty")} + } + if v.InputSecurityGroupId != nil { + if err := encoder.SetURI("InputSecurityGroupId").String(*v.InputSecurityGroupId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteMultiplex struct { +} + +func (*awsRestjson1_serializeOpDeleteMultiplex) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteMultiplex) 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.(*DeleteMultiplexInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteMultiplexInput(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_serializeOpHttpBindingsDeleteMultiplexInput(v *DeleteMultiplexInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + } + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteMultiplexProgram struct { +} + +func (*awsRestjson1_serializeOpDeleteMultiplexProgram) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteMultiplexProgram) 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.(*DeleteMultiplexProgramInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs/{ProgramName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteMultiplexProgramInput(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_serializeOpHttpBindingsDeleteMultiplexProgramInput(v *DeleteMultiplexProgramInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + } + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + return err + } + } + + if v.ProgramName == nil || len(*v.ProgramName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ProgramName must not be empty")} + } + if v.ProgramName != nil { + if err := encoder.SetURI("ProgramName").String(*v.ProgramName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteReservation struct { +} + +func (*awsRestjson1_serializeOpDeleteReservation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteReservation) 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.(*DeleteReservationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/reservations/{ReservationId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteReservationInput(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_serializeOpHttpBindingsDeleteReservationInput(v *DeleteReservationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ReservationId == nil || len(*v.ReservationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ReservationId must not be empty")} + } + if v.ReservationId != nil { + if err := encoder.SetURI("ReservationId").String(*v.ReservationId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteSchedule struct { +} + +func (*awsRestjson1_serializeOpDeleteSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteSchedule) 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.(*DeleteScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/schedule") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteScheduleInput(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_serializeOpHttpBindingsDeleteScheduleInput(v *DeleteScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + } + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteSignalMap struct { +} + +func (*awsRestjson1_serializeOpDeleteSignalMap) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteSignalMap) 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.(*DeleteSignalMapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/signal-maps/{Identifier}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteSignalMapInput(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_serializeOpHttpBindingsDeleteSignalMapInput(v *DeleteSignalMapInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteTags struct { +} + +func (*awsRestjson1_serializeOpDeleteTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteTags) 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.(*DeleteTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/tags/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteTagsInput(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_serializeOpHttpBindingsDeleteTagsInput(v *DeleteTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeAccountConfiguration struct { +} + +func (*awsRestjson1_serializeOpDescribeAccountConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAccountConfiguration) 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.(*DescribeAccountConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/accountConfiguration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if 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_serializeOpHttpBindingsDescribeAccountConfigurationInput(v *DescribeAccountConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeChannel struct { +} + +func (*awsRestjson1_serializeOpDescribeChannel) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeChannel) 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.(*DescribeChannelInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(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_serializeOpHttpBindingsDescribeChannelInput(v *DescribeChannelInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + } + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeInput struct { +} + +func (*awsRestjson1_serializeOpDescribeInput) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeInput) 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.(*DescribeInputInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/inputs/{InputId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeInputInput(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_serializeOpHttpBindingsDescribeInputInput(v *DescribeInputInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InputId == nil || len(*v.InputId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputId must not be empty")} + } + if v.InputId != nil { + if err := encoder.SetURI("InputId").String(*v.InputId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeInputDevice struct { +} + +func (*awsRestjson1_serializeOpDescribeInputDevice) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeInputDevice) 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.(*DescribeInputDeviceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeInputDeviceInput(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_serializeOpHttpBindingsDescribeInputDeviceInput(v *DescribeInputDeviceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + } + if v.InputDeviceId != nil { + if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeInputDeviceThumbnail struct { +} + +func (*awsRestjson1_serializeOpDescribeInputDeviceThumbnail) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeInputDeviceThumbnail) 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.(*DescribeInputDeviceThumbnailInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/thumbnailData") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeInputDeviceThumbnailInput(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_serializeOpHttpBindingsDescribeInputDeviceThumbnailInput(v *DescribeInputDeviceThumbnailInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.Accept) > 0 { + locationName := "Accept" + encoder.SetHeader(locationName).String(string(v.Accept)) + } + + if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + } + if v.InputDeviceId != nil { + if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeInputSecurityGroup struct { +} + +func (*awsRestjson1_serializeOpDescribeInputSecurityGroup) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeInputSecurityGroup) 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.(*DescribeInputSecurityGroupInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups/{InputSecurityGroupId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeInputSecurityGroupInput(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_serializeOpHttpBindingsDescribeInputSecurityGroupInput(v *DescribeInputSecurityGroupInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.InputSecurityGroupId == nil || len(*v.InputSecurityGroupId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputSecurityGroupId must not be empty")} + } + if v.InputSecurityGroupId != nil { + if err := encoder.SetURI("InputSecurityGroupId").String(*v.InputSecurityGroupId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeMultiplex struct { +} + +func (*awsRestjson1_serializeOpDescribeMultiplex) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeMultiplex) 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.(*DescribeMultiplexInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeMultiplexInput(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_serializeOpHttpBindingsDescribeMultiplexInput(v *DescribeMultiplexInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + } + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeMultiplexProgram struct { +} + +func (*awsRestjson1_serializeOpDescribeMultiplexProgram) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeMultiplexProgram) 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.(*DescribeMultiplexProgramInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs/{ProgramName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeMultiplexProgramInput(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_serializeOpHttpBindingsDescribeMultiplexProgramInput(v *DescribeMultiplexProgramInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + } + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + return err + } + } + + if v.ProgramName == nil || len(*v.ProgramName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ProgramName must not be empty")} + } + if v.ProgramName != nil { + if err := encoder.SetURI("ProgramName").String(*v.ProgramName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeOffering struct { +} + +func (*awsRestjson1_serializeOpDescribeOffering) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeOffering) 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.(*DescribeOfferingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/offerings/{OfferingId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(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_serializeOpHttpBindingsDescribeOfferingInput(v *DescribeOfferingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.OfferingId == nil || len(*v.OfferingId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingId must not be empty")} + } + if v.OfferingId != nil { + if err := encoder.SetURI("OfferingId").String(*v.OfferingId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeReservation struct { +} + +func (*awsRestjson1_serializeOpDescribeReservation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeReservation) 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.(*DescribeReservationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/reservations/{ReservationId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeReservationInput(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_serializeOpHttpBindingsDescribeReservationInput(v *DescribeReservationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ReservationId == nil || len(*v.ReservationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ReservationId must not be empty")} + } + if v.ReservationId != nil { + if err := encoder.SetURI("ReservationId").String(*v.ReservationId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeSchedule struct { +} + +func (*awsRestjson1_serializeOpDescribeSchedule) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeSchedule) 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.(*DescribeScheduleInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/schedule") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeScheduleInput(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_serializeOpHttpBindingsDescribeScheduleInput(v *DescribeScheduleInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + } + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeThumbnails struct { } -func (*awsRestjson1_serializeOpDeleteInputSecurityGroup) ID() string { +func (*awsRestjson1_serializeOpDescribeThumbnails) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteInputSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeThumbnails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1493,16 +3481,16 @@ func (m *awsRestjson1_serializeOpDeleteInputSecurityGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteInputSecurityGroupInput) + input, ok := in.Parameters.(*DescribeThumbnailsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups/{InputSecurityGroupId}") + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/thumbnails") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1515,7 +3503,7 @@ func (m *awsRestjson1_serializeOpDeleteInputSecurityGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteInputSecurityGroupInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeThumbnailsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1526,31 +3514,39 @@ func (m *awsRestjson1_serializeOpDeleteInputSecurityGroup) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteInputSecurityGroupInput(v *DeleteInputSecurityGroupInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeThumbnailsInput(v *DescribeThumbnailsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputSecurityGroupId == nil || len(*v.InputSecurityGroupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputSecurityGroupId must not be empty")} + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} } - if v.InputSecurityGroupId != nil { - if err := encoder.SetURI("InputSecurityGroupId").String(*v.InputSecurityGroupId); err != nil { + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { return err } } + if v.PipelineId != nil { + encoder.SetQuery("pipelineId").String(*v.PipelineId) + } + + if v.ThumbnailType != nil { + encoder.SetQuery("thumbnailType").String(*v.ThumbnailType) + } + return nil } -type awsRestjson1_serializeOpDeleteMultiplex struct { +type awsRestjson1_serializeOpGetCloudWatchAlarmTemplate struct { } -func (*awsRestjson1_serializeOpDeleteMultiplex) ID() string { +func (*awsRestjson1_serializeOpGetCloudWatchAlarmTemplate) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteMultiplex) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetCloudWatchAlarmTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1558,16 +3554,16 @@ func (m *awsRestjson1_serializeOpDeleteMultiplex) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteMultiplexInput) + input, ok := in.Parameters.(*GetCloudWatchAlarmTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-templates/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1580,7 +3576,7 @@ func (m *awsRestjson1_serializeOpDeleteMultiplex) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteMultiplexInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetCloudWatchAlarmTemplateInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1591,16 +3587,16 @@ func (m *awsRestjson1_serializeOpDeleteMultiplex) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteMultiplexInput(v *DeleteMultiplexInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetCloudWatchAlarmTemplateInput(v *GetCloudWatchAlarmTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -1608,14 +3604,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteMultiplexInput(v *DeleteMultiplex return nil } -type awsRestjson1_serializeOpDeleteMultiplexProgram struct { +type awsRestjson1_serializeOpGetCloudWatchAlarmTemplateGroup struct { } -func (*awsRestjson1_serializeOpDeleteMultiplexProgram) ID() string { +func (*awsRestjson1_serializeOpGetCloudWatchAlarmTemplateGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteMultiplexProgram) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetCloudWatchAlarmTemplateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1623,16 +3619,16 @@ func (m *awsRestjson1_serializeOpDeleteMultiplexProgram) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteMultiplexProgramInput) + input, ok := in.Parameters.(*GetCloudWatchAlarmTemplateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs/{ProgramName}") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-template-groups/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1645,7 +3641,7 @@ func (m *awsRestjson1_serializeOpDeleteMultiplexProgram) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteMultiplexProgramInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetCloudWatchAlarmTemplateGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1656,25 +3652,16 @@ func (m *awsRestjson1_serializeOpDeleteMultiplexProgram) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteMultiplexProgramInput(v *DeleteMultiplexProgramInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetCloudWatchAlarmTemplateGroupInput(v *GetCloudWatchAlarmTemplateGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} - } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { - return err - } - } - - if v.ProgramName == nil || len(*v.ProgramName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ProgramName must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.ProgramName != nil { - if err := encoder.SetURI("ProgramName").String(*v.ProgramName); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -1682,14 +3669,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteMultiplexProgramInput(v *DeleteMu return nil } -type awsRestjson1_serializeOpDeleteReservation struct { +type awsRestjson1_serializeOpGetEventBridgeRuleTemplate struct { } -func (*awsRestjson1_serializeOpDeleteReservation) ID() string { +func (*awsRestjson1_serializeOpGetEventBridgeRuleTemplate) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetEventBridgeRuleTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1697,16 +3684,16 @@ func (m *awsRestjson1_serializeOpDeleteReservation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteReservationInput) + input, ok := in.Parameters.(*GetEventBridgeRuleTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/reservations/{ReservationId}") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-templates/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1719,7 +3706,7 @@ func (m *awsRestjson1_serializeOpDeleteReservation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteReservationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetEventBridgeRuleTemplateInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1730,16 +3717,16 @@ func (m *awsRestjson1_serializeOpDeleteReservation) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteReservationInput(v *DeleteReservationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetEventBridgeRuleTemplateInput(v *GetEventBridgeRuleTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ReservationId == nil || len(*v.ReservationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ReservationId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.ReservationId != nil { - if err := encoder.SetURI("ReservationId").String(*v.ReservationId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -1747,14 +3734,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteReservationInput(v *DeleteReserva return nil } -type awsRestjson1_serializeOpDeleteSchedule struct { +type awsRestjson1_serializeOpGetEventBridgeRuleTemplateGroup struct { } -func (*awsRestjson1_serializeOpDeleteSchedule) ID() string { +func (*awsRestjson1_serializeOpGetEventBridgeRuleTemplateGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetEventBridgeRuleTemplateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1762,16 +3749,16 @@ func (m *awsRestjson1_serializeOpDeleteSchedule) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteScheduleInput) + input, ok := in.Parameters.(*GetEventBridgeRuleTemplateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/schedule") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-template-groups/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1784,7 +3771,7 @@ func (m *awsRestjson1_serializeOpDeleteSchedule) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteScheduleInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetEventBridgeRuleTemplateGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1795,16 +3782,16 @@ func (m *awsRestjson1_serializeOpDeleteSchedule) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteScheduleInput(v *DeleteScheduleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetEventBridgeRuleTemplateGroupInput(v *GetEventBridgeRuleTemplateGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -1812,14 +3799,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteScheduleInput(v *DeleteScheduleIn return nil } -type awsRestjson1_serializeOpDeleteTags struct { +type awsRestjson1_serializeOpGetSignalMap struct { } -func (*awsRestjson1_serializeOpDeleteTags) ID() string { +func (*awsRestjson1_serializeOpGetSignalMap) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetSignalMap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1827,16 +3814,16 @@ func (m *awsRestjson1_serializeOpDeleteTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteTagsInput) + input, ok := in.Parameters.(*GetSignalMapInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/prod/signal-maps/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1849,7 +3836,7 @@ func (m *awsRestjson1_serializeOpDeleteTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteTagsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetSignalMapInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1860,37 +3847,31 @@ func (m *awsRestjson1_serializeOpDeleteTags) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteTagsInput(v *DeleteTagsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetSignalMapInput(v *GetSignalMapInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("tagKeys").String(v.TagKeys[i]) - } - } - return nil } -type awsRestjson1_serializeOpDescribeAccountConfiguration struct { +type awsRestjson1_serializeOpListChannels struct { } -func (*awsRestjson1_serializeOpDescribeAccountConfiguration) ID() string { +func (*awsRestjson1_serializeOpListChannels) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeAccountConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1898,13 +3879,13 @@ func (m *awsRestjson1_serializeOpDescribeAccountConfiguration) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeAccountConfigurationInput) + input, ok := in.Parameters.(*ListChannelsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/accountConfiguration") + opPath, opQuery := httpbinding.SplitURI("/prod/channels") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1920,6 +3901,10 @@ func (m *awsRestjson1_serializeOpDescribeAccountConfiguration) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsListChannelsInput(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} } @@ -1927,22 +3912,30 @@ func (m *awsRestjson1_serializeOpDescribeAccountConfiguration) HandleSerialize(c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeAccountConfigurationInput(v *DescribeAccountConfigurationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListChannelsInput(v *ListChannelsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpDescribeChannel struct { +type awsRestjson1_serializeOpListCloudWatchAlarmTemplateGroups struct { } -func (*awsRestjson1_serializeOpDescribeChannel) ID() string { +func (*awsRestjson1_serializeOpListCloudWatchAlarmTemplateGroups) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListCloudWatchAlarmTemplateGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1950,13 +3943,13 @@ func (m *awsRestjson1_serializeOpDescribeChannel) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeChannelInput) + input, ok := in.Parameters.(*ListCloudWatchAlarmTemplateGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-template-groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1972,7 +3965,7 @@ func (m *awsRestjson1_serializeOpDescribeChannel) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListCloudWatchAlarmTemplateGroupsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1983,31 +3976,38 @@ func (m *awsRestjson1_serializeOpDescribeChannel) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(v *DescribeChannelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListCloudWatchAlarmTemplateGroupsInput(v *ListCloudWatchAlarmTemplateGroupsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Scope != nil { + encoder.SetQuery("scope").String(*v.Scope) + } + + if v.SignalMapIdentifier != nil { + encoder.SetQuery("signalMapIdentifier").String(*v.SignalMapIdentifier) } return nil } -type awsRestjson1_serializeOpDescribeInput struct { +type awsRestjson1_serializeOpListCloudWatchAlarmTemplates struct { } -func (*awsRestjson1_serializeOpDescribeInput) ID() string { +func (*awsRestjson1_serializeOpListCloudWatchAlarmTemplates) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeInput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListCloudWatchAlarmTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2015,13 +4015,13 @@ func (m *awsRestjson1_serializeOpDescribeInput) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeInputInput) + input, ok := in.Parameters.(*ListCloudWatchAlarmTemplatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputs/{InputId}") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-templates") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2037,7 +4037,7 @@ func (m *awsRestjson1_serializeOpDescribeInput) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeInputInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListCloudWatchAlarmTemplatesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2048,31 +4048,42 @@ func (m *awsRestjson1_serializeOpDescribeInput) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeInputInput(v *DescribeInputInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListCloudWatchAlarmTemplatesInput(v *ListCloudWatchAlarmTemplatesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputId == nil || len(*v.InputId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputId must not be empty")} + if v.GroupIdentifier != nil { + encoder.SetQuery("groupIdentifier").String(*v.GroupIdentifier) } - if v.InputId != nil { - if err := encoder.SetURI("InputId").String(*v.InputId); err != nil { - return err - } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Scope != nil { + encoder.SetQuery("scope").String(*v.Scope) + } + + if v.SignalMapIdentifier != nil { + encoder.SetQuery("signalMapIdentifier").String(*v.SignalMapIdentifier) } return nil } -type awsRestjson1_serializeOpDescribeInputDevice struct { +type awsRestjson1_serializeOpListEventBridgeRuleTemplateGroups struct { } -func (*awsRestjson1_serializeOpDescribeInputDevice) ID() string { +func (*awsRestjson1_serializeOpListEventBridgeRuleTemplateGroups) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListEventBridgeRuleTemplateGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2080,13 +4091,13 @@ func (m *awsRestjson1_serializeOpDescribeInputDevice) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeInputDeviceInput) + input, ok := in.Parameters.(*ListEventBridgeRuleTemplateGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-template-groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2102,7 +4113,7 @@ func (m *awsRestjson1_serializeOpDescribeInputDevice) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeInputDeviceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListEventBridgeRuleTemplateGroupsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2113,31 +4124,34 @@ func (m *awsRestjson1_serializeOpDescribeInputDevice) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeInputDeviceInput(v *DescribeInputDeviceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListEventBridgeRuleTemplateGroupsInput(v *ListEventBridgeRuleTemplateGroupsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.InputDeviceId != nil { - if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.SignalMapIdentifier != nil { + encoder.SetQuery("signalMapIdentifier").String(*v.SignalMapIdentifier) } return nil } -type awsRestjson1_serializeOpDescribeInputDeviceThumbnail struct { +type awsRestjson1_serializeOpListEventBridgeRuleTemplates struct { } -func (*awsRestjson1_serializeOpDescribeInputDeviceThumbnail) ID() string { +func (*awsRestjson1_serializeOpListEventBridgeRuleTemplates) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeInputDeviceThumbnail) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListEventBridgeRuleTemplates) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2145,13 +4159,13 @@ func (m *awsRestjson1_serializeOpDescribeInputDeviceThumbnail) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeInputDeviceThumbnailInput) + input, ok := in.Parameters.(*ListEventBridgeRuleTemplatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/thumbnailData") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-templates") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2167,7 +4181,7 @@ func (m *awsRestjson1_serializeOpDescribeInputDeviceThumbnail) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeInputDeviceThumbnailInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListEventBridgeRuleTemplatesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2178,36 +4192,38 @@ func (m *awsRestjson1_serializeOpDescribeInputDeviceThumbnail) HandleSerialize(c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeInputDeviceThumbnailInput(v *DescribeInputDeviceThumbnailInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListEventBridgeRuleTemplatesInput(v *ListEventBridgeRuleTemplatesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if len(v.Accept) > 0 { - locationName := "Accept" - encoder.SetHeader(locationName).String(string(v.Accept)) + if v.GroupIdentifier != nil { + encoder.SetQuery("groupIdentifier").String(*v.GroupIdentifier) } - if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.InputDeviceId != nil { - if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.SignalMapIdentifier != nil { + encoder.SetQuery("signalMapIdentifier").String(*v.SignalMapIdentifier) } return nil } -type awsRestjson1_serializeOpDescribeInputSecurityGroup struct { +type awsRestjson1_serializeOpListInputDevices struct { } -func (*awsRestjson1_serializeOpDescribeInputSecurityGroup) ID() string { +func (*awsRestjson1_serializeOpListInputDevices) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeInputSecurityGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListInputDevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2215,13 +4231,13 @@ func (m *awsRestjson1_serializeOpDescribeInputSecurityGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeInputSecurityGroupInput) + input, ok := in.Parameters.(*ListInputDevicesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups/{InputSecurityGroupId}") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2237,7 +4253,7 @@ func (m *awsRestjson1_serializeOpDescribeInputSecurityGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeInputSecurityGroupInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListInputDevicesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2248,31 +4264,30 @@ func (m *awsRestjson1_serializeOpDescribeInputSecurityGroup) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeInputSecurityGroupInput(v *DescribeInputSecurityGroupInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListInputDevicesInput(v *ListInputDevicesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputSecurityGroupId == nil || len(*v.InputSecurityGroupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputSecurityGroupId must not be empty")} - } - if v.InputSecurityGroupId != nil { - if err := encoder.SetURI("InputSecurityGroupId").String(*v.InputSecurityGroupId); err != nil { - return err - } + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpDescribeMultiplex struct { +type awsRestjson1_serializeOpListInputDeviceTransfers struct { } -func (*awsRestjson1_serializeOpDescribeMultiplex) ID() string { +func (*awsRestjson1_serializeOpListInputDeviceTransfers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeMultiplex) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListInputDeviceTransfers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2280,13 +4295,13 @@ func (m *awsRestjson1_serializeOpDescribeMultiplex) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeMultiplexInput) + input, ok := in.Parameters.(*ListInputDeviceTransfersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDeviceTransfers") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2302,7 +4317,7 @@ func (m *awsRestjson1_serializeOpDescribeMultiplex) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeMultiplexInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListInputDeviceTransfersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2313,31 +4328,34 @@ func (m *awsRestjson1_serializeOpDescribeMultiplex) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeMultiplexInput(v *DescribeMultiplexInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListInputDeviceTransfersInput(v *ListInputDeviceTransfersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.TransferType != nil { + encoder.SetQuery("transferType").String(*v.TransferType) } return nil } -type awsRestjson1_serializeOpDescribeMultiplexProgram struct { +type awsRestjson1_serializeOpListInputs struct { } -func (*awsRestjson1_serializeOpDescribeMultiplexProgram) ID() string { +func (*awsRestjson1_serializeOpListInputs) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeMultiplexProgram) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListInputs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2345,13 +4363,13 @@ func (m *awsRestjson1_serializeOpDescribeMultiplexProgram) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeMultiplexProgramInput) + input, ok := in.Parameters.(*ListInputsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs/{ProgramName}") + opPath, opQuery := httpbinding.SplitURI("/prod/inputs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2367,7 +4385,7 @@ func (m *awsRestjson1_serializeOpDescribeMultiplexProgram) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeMultiplexProgramInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListInputsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2378,40 +4396,30 @@ func (m *awsRestjson1_serializeOpDescribeMultiplexProgram) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeMultiplexProgramInput(v *DescribeMultiplexProgramInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListInputsInput(v *ListInputsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} - } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { - return err - } + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.ProgramName == nil || len(*v.ProgramName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ProgramName must not be empty")} - } - if v.ProgramName != nil { - if err := encoder.SetURI("ProgramName").String(*v.ProgramName); err != nil { - return err - } + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpDescribeOffering struct { +type awsRestjson1_serializeOpListInputSecurityGroups struct { } -func (*awsRestjson1_serializeOpDescribeOffering) ID() string { +func (*awsRestjson1_serializeOpListInputSecurityGroups) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListInputSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2419,13 +4427,13 @@ func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeOfferingInput) + input, ok := in.Parameters.(*ListInputSecurityGroupsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/offerings/{OfferingId}") + opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2441,7 +4449,7 @@ func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListInputSecurityGroupsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2452,31 +4460,30 @@ func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(v *DescribeOfferingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListInputSecurityGroupsInput(v *ListInputSecurityGroupsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.OfferingId == nil || len(*v.OfferingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.OfferingId != nil { - if err := encoder.SetURI("OfferingId").String(*v.OfferingId); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpDescribeReservation struct { +type awsRestjson1_serializeOpListMultiplexes struct { } -func (*awsRestjson1_serializeOpDescribeReservation) ID() string { +func (*awsRestjson1_serializeOpListMultiplexes) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListMultiplexes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2484,13 +4491,13 @@ func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeReservationInput) + input, ok := in.Parameters.(*ListMultiplexesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/reservations/{ReservationId}") + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2506,7 +4513,7 @@ func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeReservationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListMultiplexesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2517,31 +4524,30 @@ func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeReservationInput(v *DescribeReservationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListMultiplexesInput(v *ListMultiplexesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ReservationId == nil || len(*v.ReservationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ReservationId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.ReservationId != nil { - if err := encoder.SetURI("ReservationId").String(*v.ReservationId); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpDescribeSchedule struct { +type awsRestjson1_serializeOpListMultiplexPrograms struct { } -func (*awsRestjson1_serializeOpDescribeSchedule) ID() string { +func (*awsRestjson1_serializeOpListMultiplexPrograms) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeSchedule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListMultiplexPrograms) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2549,13 +4555,13 @@ func (m *awsRestjson1_serializeOpDescribeSchedule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeScheduleInput) + input, ok := in.Parameters.(*ListMultiplexProgramsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/schedule") + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2571,7 +4577,7 @@ func (m *awsRestjson1_serializeOpDescribeSchedule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeScheduleInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListMultiplexProgramsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2582,24 +4588,24 @@ func (m *awsRestjson1_serializeOpDescribeSchedule) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeScheduleInput(v *DescribeScheduleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListMultiplexProgramsInput(v *ListMultiplexProgramsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + } + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { return err } } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - if v.NextToken != nil { encoder.SetQuery("nextToken").String(*v.NextToken) } @@ -2607,14 +4613,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeScheduleInput(v *DescribeSchedu return nil } -type awsRestjson1_serializeOpDescribeThumbnails struct { +type awsRestjson1_serializeOpListOfferings struct { } -func (*awsRestjson1_serializeOpDescribeThumbnails) ID() string { +func (*awsRestjson1_serializeOpListOfferings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeThumbnails) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2622,13 +4628,13 @@ func (m *awsRestjson1_serializeOpDescribeThumbnails) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeThumbnailsInput) + input, ok := in.Parameters.(*ListOfferingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/thumbnails") + opPath, opQuery := httpbinding.SplitURI("/prod/offerings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2644,7 +4650,7 @@ func (m *awsRestjson1_serializeOpDescribeThumbnails) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeThumbnailsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListOfferingsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2655,39 +4661,70 @@ func (m *awsRestjson1_serializeOpDescribeThumbnails) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeThumbnailsInput(v *DescribeThumbnailsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListOfferingsInput(v *ListOfferingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.ChannelClass != nil { + encoder.SetQuery("channelClass").String(*v.ChannelClass) } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { - return err - } + + if v.ChannelConfiguration != nil { + encoder.SetQuery("channelConfiguration").String(*v.ChannelConfiguration) } - if v.PipelineId != nil { - encoder.SetQuery("pipelineId").String(*v.PipelineId) + if v.Codec != nil { + encoder.SetQuery("codec").String(*v.Codec) } - if v.ThumbnailType != nil { - encoder.SetQuery("thumbnailType").String(*v.ThumbnailType) + if v.Duration != nil { + encoder.SetQuery("duration").String(*v.Duration) + } + + if v.MaximumBitrate != nil { + encoder.SetQuery("maximumBitrate").String(*v.MaximumBitrate) + } + + if v.MaximumFramerate != nil { + encoder.SetQuery("maximumFramerate").String(*v.MaximumFramerate) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Resolution != nil { + encoder.SetQuery("resolution").String(*v.Resolution) + } + + if v.ResourceType != nil { + encoder.SetQuery("resourceType").String(*v.ResourceType) + } + + if v.SpecialFeature != nil { + encoder.SetQuery("specialFeature").String(*v.SpecialFeature) + } + + if v.VideoQuality != nil { + encoder.SetQuery("videoQuality").String(*v.VideoQuality) } return nil } -type awsRestjson1_serializeOpListChannels struct { +type awsRestjson1_serializeOpListReservations struct { } -func (*awsRestjson1_serializeOpListChannels) ID() string { +func (*awsRestjson1_serializeOpListReservations) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2695,13 +4732,13 @@ func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListChannelsInput) + input, ok := in.Parameters.(*ListReservationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels") + opPath, opQuery := httpbinding.SplitURI("/prod/reservations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2717,7 +4754,7 @@ func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListChannelsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListReservationsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2728,30 +4765,62 @@ func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListChannelsInput(v *ListChannelsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListReservationsInput(v *ListReservationsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.ChannelClass != nil { + encoder.SetQuery("channelClass").String(*v.ChannelClass) + } + + if v.Codec != nil { + encoder.SetQuery("codec").String(*v.Codec) + } + + if v.MaximumBitrate != nil { + encoder.SetQuery("maximumBitrate").String(*v.MaximumBitrate) + } + + if v.MaximumFramerate != nil { + encoder.SetQuery("maximumFramerate").String(*v.MaximumFramerate) + } + if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + if v.Resolution != nil { + encoder.SetQuery("resolution").String(*v.Resolution) + } + + if v.ResourceType != nil { + encoder.SetQuery("resourceType").String(*v.ResourceType) + } + + if v.SpecialFeature != nil { + encoder.SetQuery("specialFeature").String(*v.SpecialFeature) + } + + if v.VideoQuality != nil { + encoder.SetQuery("videoQuality").String(*v.VideoQuality) } return nil } -type awsRestjson1_serializeOpListInputDevices struct { +type awsRestjson1_serializeOpListSignalMaps struct { } -func (*awsRestjson1_serializeOpListInputDevices) ID() string { +func (*awsRestjson1_serializeOpListSignalMaps) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListInputDevices) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListSignalMaps) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2759,13 +4828,13 @@ func (m *awsRestjson1_serializeOpListInputDevices) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListInputDevicesInput) + input, ok := in.Parameters.(*ListSignalMapsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices") + opPath, opQuery := httpbinding.SplitURI("/prod/signal-maps") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2781,7 +4850,7 @@ func (m *awsRestjson1_serializeOpListInputDevices) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListInputDevicesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListSignalMapsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2792,11 +4861,19 @@ func (m *awsRestjson1_serializeOpListInputDevices) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListInputDevicesInput(v *ListInputDevicesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListSignalMapsInput(v *ListSignalMapsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.CloudWatchAlarmTemplateGroupIdentifier != nil { + encoder.SetQuery("cloudWatchAlarmTemplateGroupIdentifier").String(*v.CloudWatchAlarmTemplateGroupIdentifier) + } + + if v.EventBridgeRuleTemplateGroupIdentifier != nil { + encoder.SetQuery("eventBridgeRuleTemplateGroupIdentifier").String(*v.EventBridgeRuleTemplateGroupIdentifier) + } + if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } @@ -2808,14 +4885,14 @@ func awsRestjson1_serializeOpHttpBindingsListInputDevicesInput(v *ListInputDevic return nil } -type awsRestjson1_serializeOpListInputDeviceTransfers struct { +type awsRestjson1_serializeOpListTagsForResource struct { } -func (*awsRestjson1_serializeOpListInputDeviceTransfers) ID() string { +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListInputDeviceTransfers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2823,13 +4900,13 @@ func (m *awsRestjson1_serializeOpListInputDeviceTransfers) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListInputDeviceTransfersInput) + input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDeviceTransfers") + opPath, opQuery := httpbinding.SplitURI("/prod/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -2845,7 +4922,7 @@ func (m *awsRestjson1_serializeOpListInputDeviceTransfers) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListInputDeviceTransfersInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2856,34 +4933,31 @@ func (m *awsRestjson1_serializeOpListInputDeviceTransfers) HandleSerialize(ctx c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListInputDeviceTransfersInput(v *ListInputDeviceTransfersInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } - - if v.TransferType != nil { - encoder.SetQuery("transferType").String(*v.TransferType) + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListInputs struct { +type awsRestjson1_serializeOpPurchaseOffering struct { } -func (*awsRestjson1_serializeOpListInputs) ID() string { +func (*awsRestjson1_serializeOpPurchaseOffering) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListInputs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2891,16 +4965,16 @@ func (m *awsRestjson1_serializeOpListInputs) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListInputsInput) + input, ok := in.Parameters.(*PurchaseOfferingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputs") + opPath, opQuery := httpbinding.SplitURI("/prod/offerings/{OfferingId}/purchase") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2913,7 +4987,18 @@ func (m *awsRestjson1_serializeOpListInputs) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListInputsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPurchaseOfferingInput(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} } @@ -2924,30 +5009,72 @@ func (m *awsRestjson1_serializeOpListInputs) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListInputsInput(v *ListInputsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(v *PurchaseOfferingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) + if v.OfferingId == nil || len(*v.OfferingId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingId must not be empty")} + } + if v.OfferingId != nil { + if err := encoder.SetURI("OfferingId").String(*v.OfferingId); err != nil { + return err + } } - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + return nil +} + +func awsRestjson1_serializeOpDocumentPurchaseOfferingInput(v *PurchaseOfferingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Count != nil { + ok := object.Key("count") + ok.Integer(*v.Count) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.RenewalSettings != nil { + ok := object.Key("renewalSettings") + if err := awsRestjson1_serializeDocumentRenewalSettings(v.RenewalSettings, ok); err != nil { + return err + } + } + + if v.RequestId != nil { + ok := object.Key("requestId") + ok.String(*v.RequestId) + } + + if v.Start != nil { + ok := object.Key("start") + ok.String(*v.Start) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListInputSecurityGroups struct { +type awsRestjson1_serializeOpRebootInputDevice struct { } -func (*awsRestjson1_serializeOpListInputSecurityGroups) ID() string { +func (*awsRestjson1_serializeOpRebootInputDevice) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListInputSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRebootInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2955,16 +5082,16 @@ func (m *awsRestjson1_serializeOpListInputSecurityGroups) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListInputSecurityGroupsInput) + input, ok := in.Parameters.(*RebootInputDeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputSecurityGroups") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/reboot") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2977,7 +5104,18 @@ func (m *awsRestjson1_serializeOpListInputSecurityGroups) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListInputSecurityGroupsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRebootInputDeviceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRebootInputDeviceInput(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} } @@ -2988,30 +5126,43 @@ func (m *awsRestjson1_serializeOpListInputSecurityGroups) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListInputSecurityGroupsInput(v *ListInputSecurityGroupsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRebootInputDeviceInput(v *RebootInputDeviceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) + if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + } + if v.InputDeviceId != nil { + if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + return err + } } - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + return nil +} + +func awsRestjson1_serializeOpDocumentRebootInputDeviceInput(v *RebootInputDeviceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Force) > 0 { + ok := object.Key("force") + ok.String(string(v.Force)) } return nil } -type awsRestjson1_serializeOpListMultiplexes struct { +type awsRestjson1_serializeOpRejectInputDeviceTransfer struct { } -func (*awsRestjson1_serializeOpListMultiplexes) ID() string { +func (*awsRestjson1_serializeOpRejectInputDeviceTransfer) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListMultiplexes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRejectInputDeviceTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3019,16 +5170,16 @@ func (m *awsRestjson1_serializeOpListMultiplexes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMultiplexesInput) + input, ok := in.Parameters.(*RejectInputDeviceTransferInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/reject") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3041,7 +5192,7 @@ func (m *awsRestjson1_serializeOpListMultiplexes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListMultiplexesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRejectInputDeviceTransferInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3052,30 +5203,31 @@ func (m *awsRestjson1_serializeOpListMultiplexes) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListMultiplexesInput(v *ListMultiplexesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRejectInputDeviceTransferInput(v *RejectInputDeviceTransferInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) + if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.InputDeviceId != nil { + if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListMultiplexPrograms struct { +type awsRestjson1_serializeOpRestartChannelPipelines struct { } -func (*awsRestjson1_serializeOpListMultiplexPrograms) ID() string { +func (*awsRestjson1_serializeOpRestartChannelPipelines) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListMultiplexPrograms) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRestartChannelPipelines) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3083,16 +5235,16 @@ func (m *awsRestjson1_serializeOpListMultiplexPrograms) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListMultiplexProgramsInput) + input, ok := in.Parameters.(*RestartChannelPipelinesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/programs") + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/restartChannelPipelines") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3105,7 +5257,18 @@ func (m *awsRestjson1_serializeOpListMultiplexPrograms) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListMultiplexProgramsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRestartChannelPipelinesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRestartChannelPipelinesInput(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} } @@ -3116,39 +5279,45 @@ func (m *awsRestjson1_serializeOpListMultiplexPrograms) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListMultiplexProgramsInput(v *ListMultiplexProgramsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRestartChannelPipelinesInput(v *RestartChannelPipelinesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { return err } } - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + return nil +} + +func awsRestjson1_serializeOpDocumentRestartChannelPipelinesInput(v *RestartChannelPipelinesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PipelineIds != nil { + ok := object.Key("pipelineIds") + if err := awsRestjson1_serializeDocument__listOfChannelPipelineIdToRestart(v.PipelineIds, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListOfferings struct { +type awsRestjson1_serializeOpStartChannel struct { } -func (*awsRestjson1_serializeOpListOfferings) ID() string { +func (*awsRestjson1_serializeOpStartChannel) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3156,16 +5325,16 @@ func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListOfferingsInput) + input, ok := in.Parameters.(*StartChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/offerings") + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/start") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3178,7 +5347,7 @@ func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListOfferingsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStartChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3189,70 +5358,31 @@ func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListOfferingsInput(v *ListOfferingsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartChannelInput(v *StartChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelClass != nil { - encoder.SetQuery("channelClass").String(*v.ChannelClass) - } - - if v.ChannelConfiguration != nil { - encoder.SetQuery("channelConfiguration").String(*v.ChannelConfiguration) - } - - if v.Codec != nil { - encoder.SetQuery("codec").String(*v.Codec) - } - - if v.Duration != nil { - encoder.SetQuery("duration").String(*v.Duration) - } - - if v.MaximumBitrate != nil { - encoder.SetQuery("maximumBitrate").String(*v.MaximumBitrate) - } - - if v.MaximumFramerate != nil { - encoder.SetQuery("maximumFramerate").String(*v.MaximumFramerate) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.Resolution != nil { - encoder.SetQuery("resolution").String(*v.Resolution) - } - - if v.ResourceType != nil { - encoder.SetQuery("resourceType").String(*v.ResourceType) - } - - if v.SpecialFeature != nil { - encoder.SetQuery("specialFeature").String(*v.SpecialFeature) + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} } - - if v.VideoQuality != nil { - encoder.SetQuery("videoQuality").String(*v.VideoQuality) + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListReservations struct { +type awsRestjson1_serializeOpStartDeleteMonitorDeployment struct { } -func (*awsRestjson1_serializeOpListReservations) ID() string { +func (*awsRestjson1_serializeOpStartDeleteMonitorDeployment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartDeleteMonitorDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3260,16 +5390,16 @@ func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListReservationsInput) + input, ok := in.Parameters.(*StartDeleteMonitorDeploymentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/reservations") + opPath, opQuery := httpbinding.SplitURI("/prod/signal-maps/{Identifier}/monitor-deployment") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "DELETE" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3282,7 +5412,7 @@ func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListReservationsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStartDeleteMonitorDeploymentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3293,62 +5423,31 @@ func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListReservationsInput(v *ListReservationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartDeleteMonitorDeploymentInput(v *StartDeleteMonitorDeploymentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelClass != nil { - encoder.SetQuery("channelClass").String(*v.ChannelClass) - } - - if v.Codec != nil { - encoder.SetQuery("codec").String(*v.Codec) - } - - if v.MaximumBitrate != nil { - encoder.SetQuery("maximumBitrate").String(*v.MaximumBitrate) - } - - if v.MaximumFramerate != nil { - encoder.SetQuery("maximumFramerate").String(*v.MaximumFramerate) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxResults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) - } - - if v.Resolution != nil { - encoder.SetQuery("resolution").String(*v.Resolution) - } - - if v.ResourceType != nil { - encoder.SetQuery("resourceType").String(*v.ResourceType) - } - - if v.SpecialFeature != nil { - encoder.SetQuery("specialFeature").String(*v.SpecialFeature) + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - - if v.VideoQuality != nil { - encoder.SetQuery("videoQuality").String(*v.VideoQuality) + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListTagsForResource struct { +type awsRestjson1_serializeOpStartInputDevice struct { } -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { +func (*awsRestjson1_serializeOpStartInputDevice) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3356,16 +5455,16 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*StartInputDeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/start") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3378,7 +5477,7 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStartInputDeviceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3389,16 +5488,16 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartInputDeviceInput(v *StartInputDeviceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.InputDeviceId != nil { + if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { return err } } @@ -3406,14 +5505,14 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } -type awsRestjson1_serializeOpPurchaseOffering struct { +type awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow struct { } -func (*awsRestjson1_serializeOpPurchaseOffering) ID() string { +func (*awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3421,13 +5520,13 @@ func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*PurchaseOfferingInput) + input, ok := in.Parameters.(*StartInputDeviceMaintenanceWindowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/offerings/{OfferingId}/purchase") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/startInputDeviceMaintenanceWindow") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3443,18 +5542,7 @@ func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPurchaseOfferingInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStartInputDeviceMaintenanceWindowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3465,57 +5553,16 @@ func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(v *PurchaseOfferingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartInputDeviceMaintenanceWindowInput(v *StartInputDeviceMaintenanceWindowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.OfferingId == nil || len(*v.OfferingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingId must not be empty")} - } - if v.OfferingId != nil { - if err := encoder.SetURI("OfferingId").String(*v.OfferingId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPurchaseOfferingInput(v *PurchaseOfferingInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Count != nil { - ok := object.Key("count") - ok.Integer(*v.Count) - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.RenewalSettings != nil { - ok := object.Key("renewalSettings") - if err := awsRestjson1_serializeDocumentRenewalSettings(v.RenewalSettings, ok); err != nil { - return err - } - } - - if v.RequestId != nil { - ok := object.Key("requestId") - ok.String(*v.RequestId) - } - - if v.Start != nil { - ok := object.Key("start") - ok.String(*v.Start) + if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + if v.InputDeviceId != nil { + if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { return err } } @@ -3523,14 +5570,14 @@ func awsRestjson1_serializeOpDocumentPurchaseOfferingInput(v *PurchaseOfferingIn return nil } -type awsRestjson1_serializeOpRebootInputDevice struct { +type awsRestjson1_serializeOpStartMonitorDeployment struct { } -func (*awsRestjson1_serializeOpRebootInputDevice) ID() string { +func (*awsRestjson1_serializeOpStartMonitorDeployment) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRebootInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartMonitorDeployment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3538,13 +5585,13 @@ func (m *awsRestjson1_serializeOpRebootInputDevice) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RebootInputDeviceInput) + input, ok := in.Parameters.(*StartMonitorDeploymentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/reboot") + opPath, opQuery := httpbinding.SplitURI("/prod/signal-maps/{Identifier}/monitor-deployment") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3560,14 +5607,14 @@ func (m *awsRestjson1_serializeOpRebootInputDevice) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRebootInputDeviceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStartMonitorDeploymentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRebootInputDeviceInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentStartMonitorDeploymentInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3582,16 +5629,16 @@ func (m *awsRestjson1_serializeOpRebootInputDevice) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRebootInputDeviceInput(v *RebootInputDeviceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartMonitorDeploymentInput(v *StartMonitorDeploymentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.InputDeviceId != nil { - if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -3599,26 +5646,26 @@ func awsRestjson1_serializeOpHttpBindingsRebootInputDeviceInput(v *RebootInputDe return nil } -func awsRestjson1_serializeOpDocumentRebootInputDeviceInput(v *RebootInputDeviceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentStartMonitorDeploymentInput(v *StartMonitorDeploymentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.Force) > 0 { - ok := object.Key("force") - ok.String(string(v.Force)) + if v.DryRun != nil { + ok := object.Key("dryRun") + ok.Boolean(*v.DryRun) } return nil } -type awsRestjson1_serializeOpRejectInputDeviceTransfer struct { +type awsRestjson1_serializeOpStartMultiplex struct { } -func (*awsRestjson1_serializeOpRejectInputDeviceTransfer) ID() string { +func (*awsRestjson1_serializeOpStartMultiplex) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRejectInputDeviceTransfer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartMultiplex) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3626,13 +5673,13 @@ func (m *awsRestjson1_serializeOpRejectInputDeviceTransfer) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RejectInputDeviceTransferInput) + input, ok := in.Parameters.(*StartMultiplexInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/reject") + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/start") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3648,7 +5695,7 @@ func (m *awsRestjson1_serializeOpRejectInputDeviceTransfer) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRejectInputDeviceTransferInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStartMultiplexInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3659,16 +5706,16 @@ func (m *awsRestjson1_serializeOpRejectInputDeviceTransfer) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRejectInputDeviceTransferInput(v *RejectInputDeviceTransferInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartMultiplexInput(v *StartMultiplexInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} } - if v.InputDeviceId != nil { - if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { return err } } @@ -3676,14 +5723,14 @@ func awsRestjson1_serializeOpHttpBindingsRejectInputDeviceTransferInput(v *Rejec return nil } -type awsRestjson1_serializeOpRestartChannelPipelines struct { +type awsRestjson1_serializeOpStartUpdateSignalMap struct { } -func (*awsRestjson1_serializeOpRestartChannelPipelines) ID() string { +func (*awsRestjson1_serializeOpStartUpdateSignalMap) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRestartChannelPipelines) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStartUpdateSignalMap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3691,16 +5738,16 @@ func (m *awsRestjson1_serializeOpRestartChannelPipelines) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RestartChannelPipelinesInput) + input, ok := in.Parameters.(*StartUpdateSignalMapInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/restartChannelPipelines") + opPath, opQuery := httpbinding.SplitURI("/prod/signal-maps/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PATCH" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3713,14 +5760,14 @@ func (m *awsRestjson1_serializeOpRestartChannelPipelines) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRestartChannelPipelinesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStartUpdateSignalMapInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRestartChannelPipelinesInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentStartUpdateSignalMapInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3735,16 +5782,16 @@ func (m *awsRestjson1_serializeOpRestartChannelPipelines) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRestartChannelPipelinesInput(v *RestartChannelPipelinesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStartUpdateSignalMapInput(v *StartUpdateSignalMapInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -3752,28 +5799,55 @@ func awsRestjson1_serializeOpHttpBindingsRestartChannelPipelinesInput(v *Restart return nil } -func awsRestjson1_serializeOpDocumentRestartChannelPipelinesInput(v *RestartChannelPipelinesInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentStartUpdateSignalMapInput(v *StartUpdateSignalMapInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.PipelineIds != nil { - ok := object.Key("pipelineIds") - if err := awsRestjson1_serializeDocument__listOfChannelPipelineIdToRestart(v.PipelineIds, ok); err != nil { + if v.CloudWatchAlarmTemplateGroupIdentifiers != nil { + ok := object.Key("cloudWatchAlarmTemplateGroupIdentifiers") + if err := awsRestjson1_serializeDocument__listOf__stringPatternS(v.CloudWatchAlarmTemplateGroupIdentifiers, ok); err != nil { + return err + } + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.DiscoveryEntryPointArn != nil { + ok := object.Key("discoveryEntryPointArn") + ok.String(*v.DiscoveryEntryPointArn) + } + + if v.EventBridgeRuleTemplateGroupIdentifiers != nil { + ok := object.Key("eventBridgeRuleTemplateGroupIdentifiers") + if err := awsRestjson1_serializeDocument__listOf__stringPatternS(v.EventBridgeRuleTemplateGroupIdentifiers, ok); err != nil { return err } } + if v.ForceRediscovery != nil { + ok := object.Key("forceRediscovery") + ok.Boolean(*v.ForceRediscovery) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + return nil } -type awsRestjson1_serializeOpStartChannel struct { +type awsRestjson1_serializeOpStopChannel struct { } -func (*awsRestjson1_serializeOpStartChannel) ID() string { +func (*awsRestjson1_serializeOpStopChannel) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStopChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3781,13 +5855,13 @@ func (m *awsRestjson1_serializeOpStartChannel) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartChannelInput) + input, ok := in.Parameters.(*StopChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/start") + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/stop") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3803,7 +5877,7 @@ func (m *awsRestjson1_serializeOpStartChannel) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartChannelInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStopChannelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3814,7 +5888,7 @@ func (m *awsRestjson1_serializeOpStartChannel) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartChannelInput(v *StartChannelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStopChannelInput(v *StopChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3831,14 +5905,14 @@ func awsRestjson1_serializeOpHttpBindingsStartChannelInput(v *StartChannelInput, return nil } -type awsRestjson1_serializeOpStartInputDevice struct { +type awsRestjson1_serializeOpStopInputDevice struct { } -func (*awsRestjson1_serializeOpStartInputDevice) ID() string { +func (*awsRestjson1_serializeOpStopInputDevice) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStopInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3846,13 +5920,13 @@ func (m *awsRestjson1_serializeOpStartInputDevice) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartInputDeviceInput) + input, ok := in.Parameters.(*StopInputDeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/start") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/stop") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3868,7 +5942,7 @@ func (m *awsRestjson1_serializeOpStartInputDevice) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartInputDeviceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStopInputDeviceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3879,7 +5953,7 @@ func (m *awsRestjson1_serializeOpStartInputDevice) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartInputDeviceInput(v *StartInputDeviceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStopInputDeviceInput(v *StopInputDeviceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3896,14 +5970,14 @@ func awsRestjson1_serializeOpHttpBindingsStartInputDeviceInput(v *StartInputDevi return nil } -type awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow struct { +type awsRestjson1_serializeOpStopMultiplex struct { } -func (*awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow) ID() string { +func (*awsRestjson1_serializeOpStopMultiplex) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStopMultiplex) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3911,13 +5985,13 @@ func (m *awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartInputDeviceMaintenanceWindowInput) + input, ok := in.Parameters.(*StopMultiplexInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/startInputDeviceMaintenanceWindow") + opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/stop") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3933,7 +6007,7 @@ func (m *awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow) HandleSerial return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartInputDeviceMaintenanceWindowInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStopMultiplexInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3944,16 +6018,16 @@ func (m *awsRestjson1_serializeOpStartInputDeviceMaintenanceWindow) HandleSerial return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartInputDeviceMaintenanceWindowInput(v *StartInputDeviceMaintenanceWindowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStopMultiplexInput(v *StopMultiplexInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} } - if v.InputDeviceId != nil { - if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + if v.MultiplexId != nil { + if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { return err } } @@ -3961,14 +6035,14 @@ func awsRestjson1_serializeOpHttpBindingsStartInputDeviceMaintenanceWindowInput( return nil } -type awsRestjson1_serializeOpStartMultiplex struct { +type awsRestjson1_serializeOpTransferInputDevice struct { } -func (*awsRestjson1_serializeOpStartMultiplex) ID() string { +func (*awsRestjson1_serializeOpTransferInputDevice) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartMultiplex) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpTransferInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3976,13 +6050,13 @@ func (m *awsRestjson1_serializeOpStartMultiplex) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartMultiplexInput) + input, ok := in.Parameters.(*TransferInputDeviceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/start") + opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/transfer") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3998,7 +6072,18 @@ func (m *awsRestjson1_serializeOpStartMultiplex) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartMultiplexInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsTransferInputDeviceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTransferInputDeviceInput(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} } @@ -4009,16 +6094,16 @@ func (m *awsRestjson1_serializeOpStartMultiplex) HandleSerialize(ctx context.Con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartMultiplexInput(v *StartMultiplexInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsTransferInputDeviceInput(v *TransferInputDeviceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + if v.InputDeviceId != nil { + if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { return err } } @@ -4026,14 +6111,36 @@ func awsRestjson1_serializeOpHttpBindingsStartMultiplexInput(v *StartMultiplexIn return nil } -type awsRestjson1_serializeOpStopChannel struct { +func awsRestjson1_serializeOpDocumentTransferInputDeviceInput(v *TransferInputDeviceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TargetCustomerId != nil { + ok := object.Key("targetCustomerId") + ok.String(*v.TargetCustomerId) + } + + if v.TargetRegion != nil { + ok := object.Key("targetRegion") + ok.String(*v.TargetRegion) + } + + if v.TransferMessage != nil { + ok := object.Key("transferMessage") + ok.String(*v.TransferMessage) + } + + return nil } -func (*awsRestjson1_serializeOpStopChannel) ID() string { +type awsRestjson1_serializeOpUpdateAccountConfiguration struct { +} + +func (*awsRestjson1_serializeOpUpdateAccountConfiguration) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStopChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateAccountConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4041,16 +6148,16 @@ func (m *awsRestjson1_serializeOpStopChannel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StopChannelInput) + input, ok := in.Parameters.(*UpdateAccountConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/stop") + opPath, opQuery := httpbinding.SplitURI("/prod/accountConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4063,7 +6170,14 @@ func (m *awsRestjson1_serializeOpStopChannel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStopChannelInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAccountConfigurationInput(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} } @@ -4074,16 +6188,21 @@ func (m *awsRestjson1_serializeOpStopChannel) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStopChannelInput(v *StopChannelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateAccountConfigurationInput(v *UpdateAccountConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} - } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAccountConfigurationInput(v *UpdateAccountConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountConfiguration != nil { + ok := object.Key("accountConfiguration") + if err := awsRestjson1_serializeDocumentAccountConfiguration(v.AccountConfiguration, ok); err != nil { return err } } @@ -4091,14 +6210,14 @@ func awsRestjson1_serializeOpHttpBindingsStopChannelInput(v *StopChannelInput, e return nil } -type awsRestjson1_serializeOpStopInputDevice struct { +type awsRestjson1_serializeOpUpdateChannel struct { } -func (*awsRestjson1_serializeOpStopInputDevice) ID() string { +func (*awsRestjson1_serializeOpUpdateChannel) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStopInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4106,16 +6225,16 @@ func (m *awsRestjson1_serializeOpStopInputDevice) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StopInputDeviceInput) + input, ok := in.Parameters.(*UpdateChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/stop") + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4128,7 +6247,18 @@ func (m *awsRestjson1_serializeOpStopInputDevice) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStopInputDeviceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateChannelInput(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} } @@ -4139,31 +6269,95 @@ func (m *awsRestjson1_serializeOpStopInputDevice) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStopInputDeviceInput(v *StopInputDeviceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(v *UpdateChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} } - if v.InputDeviceId != nil { - if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CdiInputSpecification != nil { + ok := object.Key("cdiInputSpecification") + if err := awsRestjson1_serializeDocumentCdiInputSpecification(v.CdiInputSpecification, ok); err != nil { + return err + } + } + + if v.Destinations != nil { + ok := object.Key("destinations") + if err := awsRestjson1_serializeDocument__listOfOutputDestination(v.Destinations, ok); err != nil { + return err + } + } + + if v.EncoderSettings != nil { + ok := object.Key("encoderSettings") + if err := awsRestjson1_serializeDocumentEncoderSettings(v.EncoderSettings, ok); err != nil { + return err + } + } + + if v.InputAttachments != nil { + ok := object.Key("inputAttachments") + if err := awsRestjson1_serializeDocument__listOfInputAttachment(v.InputAttachments, ok); err != nil { + return err + } + } + + if v.InputSpecification != nil { + ok := object.Key("inputSpecification") + if err := awsRestjson1_serializeDocumentInputSpecification(v.InputSpecification, ok); err != nil { + return err + } + } + + if len(v.LogLevel) > 0 { + ok := object.Key("logLevel") + ok.String(string(v.LogLevel)) + } + + if v.Maintenance != nil { + ok := object.Key("maintenance") + if err := awsRestjson1_serializeDocumentMaintenanceUpdateSettings(v.Maintenance, ok); err != nil { return err } } + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.RoleArn != nil { + ok := object.Key("roleArn") + ok.String(*v.RoleArn) + } + return nil } -type awsRestjson1_serializeOpStopMultiplex struct { +type awsRestjson1_serializeOpUpdateChannelClass struct { } -func (*awsRestjson1_serializeOpStopMultiplex) ID() string { +func (*awsRestjson1_serializeOpUpdateChannelClass) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStopMultiplex) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateChannelClass) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4171,16 +6365,16 @@ func (m *awsRestjson1_serializeOpStopMultiplex) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StopMultiplexInput) + input, ok := in.Parameters.(*UpdateChannelClassInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/multiplexes/{MultiplexId}/stop") + opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/channelClass") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4193,7 +6387,18 @@ func (m *awsRestjson1_serializeOpStopMultiplex) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStopMultiplexInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelClassInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateChannelClassInput(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} } @@ -4204,16 +6409,16 @@ func (m *awsRestjson1_serializeOpStopMultiplex) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStopMultiplexInput(v *StopMultiplexInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateChannelClassInput(v *UpdateChannelClassInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MultiplexId == nil || len(*v.MultiplexId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MultiplexId must not be empty")} + if v.ChannelId == nil || len(*v.ChannelId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} } - if v.MultiplexId != nil { - if err := encoder.SetURI("MultiplexId").String(*v.MultiplexId); err != nil { + if v.ChannelId != nil { + if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { return err } } @@ -4221,14 +6426,33 @@ func awsRestjson1_serializeOpHttpBindingsStopMultiplexInput(v *StopMultiplexInpu return nil } -type awsRestjson1_serializeOpTransferInputDevice struct { +func awsRestjson1_serializeOpDocumentUpdateChannelClassInput(v *UpdateChannelClassInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ChannelClass) > 0 { + ok := object.Key("channelClass") + ok.String(string(v.ChannelClass)) + } + + if v.Destinations != nil { + ok := object.Key("destinations") + if err := awsRestjson1_serializeDocument__listOfOutputDestination(v.Destinations, ok); err != nil { + return err + } + } + + return nil } -func (*awsRestjson1_serializeOpTransferInputDevice) ID() string { +type awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplate struct { +} + +func (*awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplate) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpTransferInputDevice) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4236,16 +6460,16 @@ func (m *awsRestjson1_serializeOpTransferInputDevice) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*TransferInputDeviceInput) + input, ok := in.Parameters.(*UpdateCloudWatchAlarmTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/inputDevices/{InputDeviceId}/transfer") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-templates/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PATCH" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4258,14 +6482,14 @@ func (m *awsRestjson1_serializeOpTransferInputDevice) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsTransferInputDeviceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateCloudWatchAlarmTemplateInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTransferInputDeviceInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateCloudWatchAlarmTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4280,16 +6504,16 @@ func (m *awsRestjson1_serializeOpTransferInputDevice) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsTransferInputDeviceInput(v *TransferInputDeviceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateCloudWatchAlarmTemplateInput(v *UpdateCloudWatchAlarmTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.InputDeviceId == nil || len(*v.InputDeviceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member InputDeviceId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.InputDeviceId != nil { - if err := encoder.SetURI("InputDeviceId").String(*v.InputDeviceId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -4297,36 +6521,94 @@ func awsRestjson1_serializeOpHttpBindingsTransferInputDeviceInput(v *TransferInp return nil } -func awsRestjson1_serializeOpDocumentTransferInputDeviceInput(v *TransferInputDeviceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateCloudWatchAlarmTemplateInput(v *UpdateCloudWatchAlarmTemplateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.TargetCustomerId != nil { - ok := object.Key("targetCustomerId") - ok.String(*v.TargetCustomerId) + if len(v.ComparisonOperator) > 0 { + ok := object.Key("comparisonOperator") + ok.String(string(v.ComparisonOperator)) } - if v.TargetRegion != nil { - ok := object.Key("targetRegion") - ok.String(*v.TargetRegion) + if v.DatapointsToAlarm != nil { + ok := object.Key("datapointsToAlarm") + ok.Integer(*v.DatapointsToAlarm) } - if v.TransferMessage != nil { - ok := object.Key("transferMessage") - ok.String(*v.TransferMessage) + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.EvaluationPeriods != nil { + ok := object.Key("evaluationPeriods") + ok.Integer(*v.EvaluationPeriods) + } + + if v.GroupIdentifier != nil { + ok := object.Key("groupIdentifier") + ok.String(*v.GroupIdentifier) + } + + if v.MetricName != nil { + ok := object.Key("metricName") + ok.String(*v.MetricName) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Period != nil { + ok := object.Key("period") + ok.Integer(*v.Period) + } + + if len(v.Statistic) > 0 { + ok := object.Key("statistic") + ok.String(string(v.Statistic)) + } + + if len(v.TargetResourceType) > 0 { + ok := object.Key("targetResourceType") + ok.String(string(v.TargetResourceType)) + } + + if v.Threshold != nil { + ok := object.Key("threshold") + switch { + case math.IsNaN(*v.Threshold): + ok.String("NaN") + + case math.IsInf(*v.Threshold, 1): + ok.String("Infinity") + + case math.IsInf(*v.Threshold, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.Threshold) + + } + } + + if len(v.TreatMissingData) > 0 { + ok := object.Key("treatMissingData") + ok.String(string(v.TreatMissingData)) } return nil } -type awsRestjson1_serializeOpUpdateAccountConfiguration struct { +type awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplateGroup struct { } -func (*awsRestjson1_serializeOpUpdateAccountConfiguration) ID() string { +func (*awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplateGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateAccountConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateCloudWatchAlarmTemplateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4334,16 +6616,16 @@ func (m *awsRestjson1_serializeOpUpdateAccountConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateAccountConfigurationInput) + input, ok := in.Parameters.(*UpdateCloudWatchAlarmTemplateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/accountConfiguration") + opPath, opQuery := httpbinding.SplitURI("/prod/cloudwatch-alarm-template-groups/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "PATCH" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4356,10 +6638,14 @@ func (m *awsRestjson1_serializeOpUpdateAccountConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsUpdateCloudWatchAlarmTemplateGroupInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAccountConfigurationInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateCloudWatchAlarmTemplateGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4374,36 +6660,43 @@ func (m *awsRestjson1_serializeOpUpdateAccountConfiguration) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateAccountConfigurationInput(v *UpdateAccountConfigurationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateCloudWatchAlarmTemplateGroupInput(v *UpdateCloudWatchAlarmTemplateGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} + } + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentUpdateAccountConfigurationInput(v *UpdateAccountConfigurationInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateCloudWatchAlarmTemplateGroupInput(v *UpdateCloudWatchAlarmTemplateGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AccountConfiguration != nil { - ok := object.Key("accountConfiguration") - if err := awsRestjson1_serializeDocumentAccountConfiguration(v.AccountConfiguration, ok); err != nil { - return err - } + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) } return nil } -type awsRestjson1_serializeOpUpdateChannel struct { +type awsRestjson1_serializeOpUpdateEventBridgeRuleTemplate struct { } -func (*awsRestjson1_serializeOpUpdateChannel) ID() string { +func (*awsRestjson1_serializeOpUpdateEventBridgeRuleTemplate) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateEventBridgeRuleTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4411,16 +6704,16 @@ func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateChannelInput) + input, ok := in.Parameters.(*UpdateEventBridgeRuleTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-templates/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "PATCH" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4433,14 +6726,14 @@ func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateEventBridgeRuleTemplateInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateChannelInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateEventBridgeRuleTemplateInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4455,16 +6748,16 @@ func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(v *UpdateChannelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateEventBridgeRuleTemplateInput(v *UpdateEventBridgeRuleTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -4472,55 +6765,30 @@ func awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(v *UpdateChannelInpu return nil } -func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateEventBridgeRuleTemplateInput(v *UpdateEventBridgeRuleTemplateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.CdiInputSpecification != nil { - ok := object.Key("cdiInputSpecification") - if err := awsRestjson1_serializeDocumentCdiInputSpecification(v.CdiInputSpecification, ok); err != nil { - return err - } - } - - if v.Destinations != nil { - ok := object.Key("destinations") - if err := awsRestjson1_serializeDocument__listOfOutputDestination(v.Destinations, ok); err != nil { - return err - } - } - - if v.EncoderSettings != nil { - ok := object.Key("encoderSettings") - if err := awsRestjson1_serializeDocumentEncoderSettings(v.EncoderSettings, ok); err != nil { - return err - } - } - - if v.InputAttachments != nil { - ok := object.Key("inputAttachments") - if err := awsRestjson1_serializeDocument__listOfInputAttachment(v.InputAttachments, ok); err != nil { - return err - } + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) } - if v.InputSpecification != nil { - ok := object.Key("inputSpecification") - if err := awsRestjson1_serializeDocumentInputSpecification(v.InputSpecification, ok); err != nil { + if v.EventTargets != nil { + ok := object.Key("eventTargets") + if err := awsRestjson1_serializeDocument__listOfEventBridgeRuleTemplateTarget(v.EventTargets, ok); err != nil { return err } } - if len(v.LogLevel) > 0 { - ok := object.Key("logLevel") - ok.String(string(v.LogLevel)) + if len(v.EventType) > 0 { + ok := object.Key("eventType") + ok.String(string(v.EventType)) } - if v.Maintenance != nil { - ok := object.Key("maintenance") - if err := awsRestjson1_serializeDocumentMaintenanceUpdateSettings(v.Maintenance, ok); err != nil { - return err - } + if v.GroupIdentifier != nil { + ok := object.Key("groupIdentifier") + ok.String(*v.GroupIdentifier) } if v.Name != nil { @@ -4528,22 +6796,17 @@ func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, v ok.String(*v.Name) } - if v.RoleArn != nil { - ok := object.Key("roleArn") - ok.String(*v.RoleArn) - } - return nil } -type awsRestjson1_serializeOpUpdateChannelClass struct { +type awsRestjson1_serializeOpUpdateEventBridgeRuleTemplateGroup struct { } -func (*awsRestjson1_serializeOpUpdateChannelClass) ID() string { +func (*awsRestjson1_serializeOpUpdateEventBridgeRuleTemplateGroup) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUpdateChannelClass) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateEventBridgeRuleTemplateGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4551,16 +6814,16 @@ func (m *awsRestjson1_serializeOpUpdateChannelClass) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UpdateChannelClassInput) + input, ok := in.Parameters.(*UpdateEventBridgeRuleTemplateGroupInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/prod/channels/{ChannelId}/channelClass") + opPath, opQuery := httpbinding.SplitURI("/prod/eventbridge-rule-template-groups/{Identifier}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "PATCH" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4573,14 +6836,14 @@ func (m *awsRestjson1_serializeOpUpdateChannelClass) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelClassInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateEventBridgeRuleTemplateGroupInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateChannelClassInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentUpdateEventBridgeRuleTemplateGroupInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4595,16 +6858,16 @@ func (m *awsRestjson1_serializeOpUpdateChannelClass) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUpdateChannelClassInput(v *UpdateChannelClassInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateEventBridgeRuleTemplateGroupInput(v *UpdateEventBridgeRuleTemplateGroupInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelId == nil || len(*v.ChannelId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelId must not be empty")} + if v.Identifier == nil || len(*v.Identifier) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member Identifier must not be empty")} } - if v.ChannelId != nil { - if err := encoder.SetURI("ChannelId").String(*v.ChannelId); err != nil { + if v.Identifier != nil { + if err := encoder.SetURI("Identifier").String(*v.Identifier); err != nil { return err } } @@ -4612,20 +6875,13 @@ func awsRestjson1_serializeOpHttpBindingsUpdateChannelClassInput(v *UpdateChanne return nil } -func awsRestjson1_serializeOpDocumentUpdateChannelClassInput(v *UpdateChannelClassInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateEventBridgeRuleTemplateGroupInput(v *UpdateEventBridgeRuleTemplateGroupInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.ChannelClass) > 0 { - ok := object.Key("channelClass") - ok.String(string(v.ChannelClass)) - } - - if v.Destinations != nil { - ok := object.Key("destinations") - if err := awsRestjson1_serializeDocument__listOfOutputDestination(v.Destinations, ok); err != nil { - return err - } + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) } return nil @@ -5263,6 +7519,17 @@ func awsRestjson1_serializeDocument__listOf__string(v []string, value smithyjson return nil } +func awsRestjson1_serializeDocument__listOf__stringPatternS(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_serializeDocument__listOfAudioChannelMapping(v []types.AudioChannelMapping, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -5400,6 +7667,19 @@ func awsRestjson1_serializeDocument__listOfDashRoleCaption(v []types.DashRoleCap return nil } +func awsRestjson1_serializeDocument__listOfEventBridgeRuleTemplateTarget(v []types.EventBridgeRuleTemplateTarget, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentEventBridgeRuleTemplateTarget(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocument__listOfFailoverCondition(v []types.FailoverCondition, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -7682,6 +9962,18 @@ func awsRestjson1_serializeDocumentEsam(v *types.Esam, value smithyjson.Value) e return nil } +func awsRestjson1_serializeDocumentEventBridgeRuleTemplateTarget(v *types.EventBridgeRuleTemplateTarget, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arn != nil { + ok := object.Key("arn") + ok.String(*v.Arn) + } + + return nil +} + func awsRestjson1_serializeDocumentFailoverCondition(v *types.FailoverCondition, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -11825,6 +14117,17 @@ func awsRestjson1_serializeDocumentStopTimecode(v *types.StopTimecode, value smi return nil } +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + func awsRestjson1_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/medialive/snapshot_test.go b/service/medialive/snapshot_test.go index 2fd8112b6a6..9481471c6a9 100644 --- a/service/medialive/snapshot_test.go +++ b/service/medialive/snapshot_test.go @@ -158,6 +158,54 @@ func TestCheckSnapshot_CreateChannel(t *testing.T) { } } +func TestCheckSnapshot_CreateCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_CreateEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateInput(t *testing.T) { svc := New(Options{}) _, err := svc.CreateInput(context.Background(), nil, func(o *Options) { @@ -218,6 +266,18 @@ func TestCheckSnapshot_CreatePartnerInput(t *testing.T) { } } +func TestCheckSnapshot_CreateSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateTags(t *testing.T) { svc := New(Options{}) _, err := svc.CreateTags(context.Background(), nil, func(o *Options) { @@ -242,6 +302,54 @@ func TestCheckSnapshot_DeleteChannel(t *testing.T) { } } +func TestCheckSnapshot_DeleteCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_DeleteEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteInput(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteInput(context.Background(), nil, func(o *Options) { @@ -314,6 +422,18 @@ func TestCheckSnapshot_DeleteSchedule(t *testing.T) { } } +func TestCheckSnapshot_DeleteSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteTags(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteTags(context.Background(), nil, func(o *Options) { @@ -470,6 +590,66 @@ func TestCheckSnapshot_DescribeThumbnails(t *testing.T) { } } +func TestCheckSnapshot_GetCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_GetSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "GetSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListChannels(t *testing.T) { svc := New(Options{}) _, err := svc.ListChannels(context.Background(), nil, func(o *Options) { @@ -482,6 +662,54 @@ func TestCheckSnapshot_ListChannels(t *testing.T) { } } +func TestCheckSnapshot_ListCloudWatchAlarmTemplateGroups(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCloudWatchAlarmTemplateGroups(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListCloudWatchAlarmTemplateGroups") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListCloudWatchAlarmTemplates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCloudWatchAlarmTemplates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListCloudWatchAlarmTemplates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEventBridgeRuleTemplateGroups(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEventBridgeRuleTemplateGroups(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEventBridgeRuleTemplateGroups") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_ListEventBridgeRuleTemplates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEventBridgeRuleTemplates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListEventBridgeRuleTemplates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListInputDevices(t *testing.T) { svc := New(Options{}) _, err := svc.ListInputDevices(context.Background(), nil, func(o *Options) { @@ -578,6 +806,18 @@ func TestCheckSnapshot_ListReservations(t *testing.T) { } } +func TestCheckSnapshot_ListSignalMaps(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSignalMaps(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListSignalMaps") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { @@ -650,6 +890,18 @@ func TestCheckSnapshot_StartChannel(t *testing.T) { } } +func TestCheckSnapshot_StartDeleteMonitorDeployment(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartDeleteMonitorDeployment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartDeleteMonitorDeployment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartInputDevice(t *testing.T) { svc := New(Options{}) _, err := svc.StartInputDevice(context.Background(), nil, func(o *Options) { @@ -674,6 +926,18 @@ func TestCheckSnapshot_StartInputDeviceMaintenanceWindow(t *testing.T) { } } +func TestCheckSnapshot_StartMonitorDeployment(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartMonitorDeployment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartMonitorDeployment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StartMultiplex(t *testing.T) { svc := New(Options{}) _, err := svc.StartMultiplex(context.Background(), nil, func(o *Options) { @@ -686,6 +950,18 @@ func TestCheckSnapshot_StartMultiplex(t *testing.T) { } } +func TestCheckSnapshot_StartUpdateSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartUpdateSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartUpdateSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_StopChannel(t *testing.T) { svc := New(Options{}) _, err := svc.StopChannel(context.Background(), nil, func(o *Options) { @@ -770,6 +1046,54 @@ func TestCheckSnapshot_UpdateChannelClass(t *testing.T) { } } +func TestCheckSnapshot_UpdateCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_UpdateEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateInput(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateInput(context.Background(), nil, func(o *Options) { @@ -937,6 +1261,54 @@ func TestUpdateSnapshot_CreateChannel(t *testing.T) { } } +func TestUpdateSnapshot_CreateCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_CreateEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateInput(t *testing.T) { svc := New(Options{}) _, err := svc.CreateInput(context.Background(), nil, func(o *Options) { @@ -997,6 +1369,18 @@ func TestUpdateSnapshot_CreatePartnerInput(t *testing.T) { } } +func TestUpdateSnapshot_CreateSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateTags(t *testing.T) { svc := New(Options{}) _, err := svc.CreateTags(context.Background(), nil, func(o *Options) { @@ -1021,6 +1405,54 @@ func TestUpdateSnapshot_DeleteChannel(t *testing.T) { } } +func TestUpdateSnapshot_DeleteCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_DeleteEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteInput(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteInput(context.Background(), nil, func(o *Options) { @@ -1093,6 +1525,18 @@ func TestUpdateSnapshot_DeleteSchedule(t *testing.T) { } } +func TestUpdateSnapshot_DeleteSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteTags(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteTags(context.Background(), nil, func(o *Options) { @@ -1249,6 +1693,66 @@ func TestUpdateSnapshot_DescribeThumbnails(t *testing.T) { } } +func TestUpdateSnapshot_GetCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_GetSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.GetSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "GetSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListChannels(t *testing.T) { svc := New(Options{}) _, err := svc.ListChannels(context.Background(), nil, func(o *Options) { @@ -1261,6 +1765,54 @@ func TestUpdateSnapshot_ListChannels(t *testing.T) { } } +func TestUpdateSnapshot_ListCloudWatchAlarmTemplateGroups(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCloudWatchAlarmTemplateGroups(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListCloudWatchAlarmTemplateGroups") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListCloudWatchAlarmTemplates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListCloudWatchAlarmTemplates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListCloudWatchAlarmTemplates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEventBridgeRuleTemplateGroups(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEventBridgeRuleTemplateGroups(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEventBridgeRuleTemplateGroups") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_ListEventBridgeRuleTemplates(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListEventBridgeRuleTemplates(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListEventBridgeRuleTemplates") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListInputDevices(t *testing.T) { svc := New(Options{}) _, err := svc.ListInputDevices(context.Background(), nil, func(o *Options) { @@ -1357,6 +1909,18 @@ func TestUpdateSnapshot_ListReservations(t *testing.T) { } } +func TestUpdateSnapshot_ListSignalMaps(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListSignalMaps(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListSignalMaps") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { svc := New(Options{}) _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { @@ -1429,6 +1993,18 @@ func TestUpdateSnapshot_StartChannel(t *testing.T) { } } +func TestUpdateSnapshot_StartDeleteMonitorDeployment(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartDeleteMonitorDeployment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartDeleteMonitorDeployment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartInputDevice(t *testing.T) { svc := New(Options{}) _, err := svc.StartInputDevice(context.Background(), nil, func(o *Options) { @@ -1453,6 +2029,18 @@ func TestUpdateSnapshot_StartInputDeviceMaintenanceWindow(t *testing.T) { } } +func TestUpdateSnapshot_StartMonitorDeployment(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartMonitorDeployment(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartMonitorDeployment") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StartMultiplex(t *testing.T) { svc := New(Options{}) _, err := svc.StartMultiplex(context.Background(), nil, func(o *Options) { @@ -1465,6 +2053,18 @@ func TestUpdateSnapshot_StartMultiplex(t *testing.T) { } } +func TestUpdateSnapshot_StartUpdateSignalMap(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartUpdateSignalMap(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartUpdateSignalMap") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_StopChannel(t *testing.T) { svc := New(Options{}) _, err := svc.StopChannel(context.Background(), nil, func(o *Options) { @@ -1549,6 +2149,54 @@ func TestUpdateSnapshot_UpdateChannelClass(t *testing.T) { } } +func TestUpdateSnapshot_UpdateCloudWatchAlarmTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCloudWatchAlarmTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateCloudWatchAlarmTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateCloudWatchAlarmTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateCloudWatchAlarmTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateCloudWatchAlarmTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateEventBridgeRuleTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateEventBridgeRuleTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateEventBridgeRuleTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_UpdateEventBridgeRuleTemplateGroup(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateEventBridgeRuleTemplateGroup(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateEventBridgeRuleTemplateGroup") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateInput(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateInput(context.Background(), nil, func(o *Options) { diff --git a/service/medialive/types/enums.go b/service/medialive/types/enums.go index 783af06de3d..34f502d525a 100644 --- a/service/medialive/types/enums.go +++ b/service/medialive/types/enums.go @@ -769,6 +769,108 @@ func (ChannelState) Values() []ChannelState { } } +type CloudWatchAlarmTemplateComparisonOperator string + +// Enum values for CloudWatchAlarmTemplateComparisonOperator +const ( + CloudWatchAlarmTemplateComparisonOperatorGreaterThanOrEqualToThreshold CloudWatchAlarmTemplateComparisonOperator = "GreaterThanOrEqualToThreshold" + CloudWatchAlarmTemplateComparisonOperatorGreaterThanThreshold CloudWatchAlarmTemplateComparisonOperator = "GreaterThanThreshold" + CloudWatchAlarmTemplateComparisonOperatorLessThanThreshold CloudWatchAlarmTemplateComparisonOperator = "LessThanThreshold" + CloudWatchAlarmTemplateComparisonOperatorLessThanOrEqualToThreshold CloudWatchAlarmTemplateComparisonOperator = "LessThanOrEqualToThreshold" +) + +// Values returns all known values for CloudWatchAlarmTemplateComparisonOperator. +// 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 (CloudWatchAlarmTemplateComparisonOperator) Values() []CloudWatchAlarmTemplateComparisonOperator { + return []CloudWatchAlarmTemplateComparisonOperator{ + "GreaterThanOrEqualToThreshold", + "GreaterThanThreshold", + "LessThanThreshold", + "LessThanOrEqualToThreshold", + } +} + +type CloudWatchAlarmTemplateStatistic string + +// Enum values for CloudWatchAlarmTemplateStatistic +const ( + CloudWatchAlarmTemplateStatisticSampleCount CloudWatchAlarmTemplateStatistic = "SampleCount" + CloudWatchAlarmTemplateStatisticAverage CloudWatchAlarmTemplateStatistic = "Average" + CloudWatchAlarmTemplateStatisticSum CloudWatchAlarmTemplateStatistic = "Sum" + CloudWatchAlarmTemplateStatisticMinimum CloudWatchAlarmTemplateStatistic = "Minimum" + CloudWatchAlarmTemplateStatisticMaximum CloudWatchAlarmTemplateStatistic = "Maximum" +) + +// Values returns all known values for CloudWatchAlarmTemplateStatistic. 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 (CloudWatchAlarmTemplateStatistic) Values() []CloudWatchAlarmTemplateStatistic { + return []CloudWatchAlarmTemplateStatistic{ + "SampleCount", + "Average", + "Sum", + "Minimum", + "Maximum", + } +} + +type CloudWatchAlarmTemplateTargetResourceType string + +// Enum values for CloudWatchAlarmTemplateTargetResourceType +const ( + CloudWatchAlarmTemplateTargetResourceTypeCloudfrontDistribution CloudWatchAlarmTemplateTargetResourceType = "CLOUDFRONT_DISTRIBUTION" + CloudWatchAlarmTemplateTargetResourceTypeMedialiveMultiplex CloudWatchAlarmTemplateTargetResourceType = "MEDIALIVE_MULTIPLEX" + CloudWatchAlarmTemplateTargetResourceTypeMedialiveChannel CloudWatchAlarmTemplateTargetResourceType = "MEDIALIVE_CHANNEL" + CloudWatchAlarmTemplateTargetResourceTypeMedialiveInputDevice CloudWatchAlarmTemplateTargetResourceType = "MEDIALIVE_INPUT_DEVICE" + CloudWatchAlarmTemplateTargetResourceTypeMediapackageChannel CloudWatchAlarmTemplateTargetResourceType = "MEDIAPACKAGE_CHANNEL" + CloudWatchAlarmTemplateTargetResourceTypeMediapackageOriginEndpoint CloudWatchAlarmTemplateTargetResourceType = "MEDIAPACKAGE_ORIGIN_ENDPOINT" + CloudWatchAlarmTemplateTargetResourceTypeMediaconnectFlow CloudWatchAlarmTemplateTargetResourceType = "MEDIACONNECT_FLOW" + CloudWatchAlarmTemplateTargetResourceTypeS3Bucket CloudWatchAlarmTemplateTargetResourceType = "S3_BUCKET" +) + +// Values returns all known values for CloudWatchAlarmTemplateTargetResourceType. +// 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 (CloudWatchAlarmTemplateTargetResourceType) Values() []CloudWatchAlarmTemplateTargetResourceType { + return []CloudWatchAlarmTemplateTargetResourceType{ + "CLOUDFRONT_DISTRIBUTION", + "MEDIALIVE_MULTIPLEX", + "MEDIALIVE_CHANNEL", + "MEDIALIVE_INPUT_DEVICE", + "MEDIAPACKAGE_CHANNEL", + "MEDIAPACKAGE_ORIGIN_ENDPOINT", + "MEDIACONNECT_FLOW", + "S3_BUCKET", + } +} + +type CloudWatchAlarmTemplateTreatMissingData string + +// Enum values for CloudWatchAlarmTemplateTreatMissingData +const ( + CloudWatchAlarmTemplateTreatMissingDataNotBreaching CloudWatchAlarmTemplateTreatMissingData = "notBreaching" + CloudWatchAlarmTemplateTreatMissingDataBreaching CloudWatchAlarmTemplateTreatMissingData = "breaching" + CloudWatchAlarmTemplateTreatMissingDataIgnore CloudWatchAlarmTemplateTreatMissingData = "ignore" + CloudWatchAlarmTemplateTreatMissingDataMissing CloudWatchAlarmTemplateTreatMissingData = "missing" +) + +// Values returns all known values for CloudWatchAlarmTemplateTreatMissingData. +// 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 (CloudWatchAlarmTemplateTreatMissingData) Values() []CloudWatchAlarmTemplateTreatMissingData { + return []CloudWatchAlarmTemplateTreatMissingData{ + "notBreaching", + "breaching", + "ignore", + "missing", + } +} + type CmafIngestSegmentLengthUnits string // Enum values for CmafIngestSegmentLengthUnits @@ -1625,6 +1727,47 @@ func (EmbeddedScte20Detection) Values() []EmbeddedScte20Detection { } } +type EventBridgeRuleTemplateEventType string + +// Enum values for EventBridgeRuleTemplateEventType +const ( + EventBridgeRuleTemplateEventTypeMedialiveMultiplexAlert EventBridgeRuleTemplateEventType = "MEDIALIVE_MULTIPLEX_ALERT" + EventBridgeRuleTemplateEventTypeMedialiveMultiplexStateChange EventBridgeRuleTemplateEventType = "MEDIALIVE_MULTIPLEX_STATE_CHANGE" + EventBridgeRuleTemplateEventTypeMedialiveChannelAlert EventBridgeRuleTemplateEventType = "MEDIALIVE_CHANNEL_ALERT" + EventBridgeRuleTemplateEventTypeMedialiveChannelInputChange EventBridgeRuleTemplateEventType = "MEDIALIVE_CHANNEL_INPUT_CHANGE" + EventBridgeRuleTemplateEventTypeMedialiveChannelStateChange EventBridgeRuleTemplateEventType = "MEDIALIVE_CHANNEL_STATE_CHANGE" + EventBridgeRuleTemplateEventTypeMediapackageInputNotification EventBridgeRuleTemplateEventType = "MEDIAPACKAGE_INPUT_NOTIFICATION" + EventBridgeRuleTemplateEventTypeMediapackageKeyProviderNotification EventBridgeRuleTemplateEventType = "MEDIAPACKAGE_KEY_PROVIDER_NOTIFICATION" + EventBridgeRuleTemplateEventTypeMediapackageHarvestJobNotification EventBridgeRuleTemplateEventType = "MEDIAPACKAGE_HARVEST_JOB_NOTIFICATION" + EventBridgeRuleTemplateEventTypeSignalMapActiveAlarm EventBridgeRuleTemplateEventType = "SIGNAL_MAP_ACTIVE_ALARM" + EventBridgeRuleTemplateEventTypeMediaconnectAlert EventBridgeRuleTemplateEventType = "MEDIACONNECT_ALERT" + EventBridgeRuleTemplateEventTypeMediaconnectSourceHealth EventBridgeRuleTemplateEventType = "MEDIACONNECT_SOURCE_HEALTH" + EventBridgeRuleTemplateEventTypeMediaconnectOutputHealth EventBridgeRuleTemplateEventType = "MEDIACONNECT_OUTPUT_HEALTH" + EventBridgeRuleTemplateEventTypeMediaconnectFlowStatusChange EventBridgeRuleTemplateEventType = "MEDIACONNECT_FLOW_STATUS_CHANGE" +) + +// Values returns all known values for EventBridgeRuleTemplateEventType. 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 (EventBridgeRuleTemplateEventType) Values() []EventBridgeRuleTemplateEventType { + return []EventBridgeRuleTemplateEventType{ + "MEDIALIVE_MULTIPLEX_ALERT", + "MEDIALIVE_MULTIPLEX_STATE_CHANGE", + "MEDIALIVE_CHANNEL_ALERT", + "MEDIALIVE_CHANNEL_INPUT_CHANGE", + "MEDIALIVE_CHANNEL_STATE_CHANGE", + "MEDIAPACKAGE_INPUT_NOTIFICATION", + "MEDIAPACKAGE_KEY_PROVIDER_NOTIFICATION", + "MEDIAPACKAGE_HARVEST_JOB_NOTIFICATION", + "SIGNAL_MAP_ACTIVE_ALARM", + "MEDIACONNECT_ALERT", + "MEDIACONNECT_SOURCE_HEALTH", + "MEDIACONNECT_OUTPUT_HEALTH", + "MEDIACONNECT_FLOW_STATUS_CHANGE", + } +} + type FeatureActivationsInputPrepareScheduleActions string // Enum values for FeatureActivationsInputPrepareScheduleActions @@ -5282,6 +5425,73 @@ func (Scte35WebDeliveryAllowedFlag) Values() []Scte35WebDeliveryAllowedFlag { } } +type SignalMapMonitorDeploymentStatus string + +// Enum values for SignalMapMonitorDeploymentStatus +const ( + SignalMapMonitorDeploymentStatusNotDeployed SignalMapMonitorDeploymentStatus = "NOT_DEPLOYED" + SignalMapMonitorDeploymentStatusDryRunDeploymentComplete SignalMapMonitorDeploymentStatus = "DRY_RUN_DEPLOYMENT_COMPLETE" + SignalMapMonitorDeploymentStatusDryRunDeploymentFailed SignalMapMonitorDeploymentStatus = "DRY_RUN_DEPLOYMENT_FAILED" + SignalMapMonitorDeploymentStatusDryRunDeploymentInProgress SignalMapMonitorDeploymentStatus = "DRY_RUN_DEPLOYMENT_IN_PROGRESS" + SignalMapMonitorDeploymentStatusDeploymentComplete SignalMapMonitorDeploymentStatus = "DEPLOYMENT_COMPLETE" + SignalMapMonitorDeploymentStatusDeploymentFailed SignalMapMonitorDeploymentStatus = "DEPLOYMENT_FAILED" + SignalMapMonitorDeploymentStatusDeploymentInProgress SignalMapMonitorDeploymentStatus = "DEPLOYMENT_IN_PROGRESS" + SignalMapMonitorDeploymentStatusDeleteComplete SignalMapMonitorDeploymentStatus = "DELETE_COMPLETE" + SignalMapMonitorDeploymentStatusDeleteFailed SignalMapMonitorDeploymentStatus = "DELETE_FAILED" + SignalMapMonitorDeploymentStatusDeleteInProgress SignalMapMonitorDeploymentStatus = "DELETE_IN_PROGRESS" +) + +// Values returns all known values for SignalMapMonitorDeploymentStatus. 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 (SignalMapMonitorDeploymentStatus) Values() []SignalMapMonitorDeploymentStatus { + return []SignalMapMonitorDeploymentStatus{ + "NOT_DEPLOYED", + "DRY_RUN_DEPLOYMENT_COMPLETE", + "DRY_RUN_DEPLOYMENT_FAILED", + "DRY_RUN_DEPLOYMENT_IN_PROGRESS", + "DEPLOYMENT_COMPLETE", + "DEPLOYMENT_FAILED", + "DEPLOYMENT_IN_PROGRESS", + "DELETE_COMPLETE", + "DELETE_FAILED", + "DELETE_IN_PROGRESS", + } +} + +type SignalMapStatus string + +// Enum values for SignalMapStatus +const ( + SignalMapStatusCreateInProgress SignalMapStatus = "CREATE_IN_PROGRESS" + SignalMapStatusCreateComplete SignalMapStatus = "CREATE_COMPLETE" + SignalMapStatusCreateFailed SignalMapStatus = "CREATE_FAILED" + SignalMapStatusUpdateInProgress SignalMapStatus = "UPDATE_IN_PROGRESS" + SignalMapStatusUpdateComplete SignalMapStatus = "UPDATE_COMPLETE" + SignalMapStatusUpdateReverted SignalMapStatus = "UPDATE_REVERTED" + SignalMapStatusUpdateFailed SignalMapStatus = "UPDATE_FAILED" + SignalMapStatusReady SignalMapStatus = "READY" + SignalMapStatusNotReady SignalMapStatus = "NOT_READY" +) + +// Values returns all known values for SignalMapStatus. 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 (SignalMapStatus) Values() []SignalMapStatus { + return []SignalMapStatus{ + "CREATE_IN_PROGRESS", + "CREATE_COMPLETE", + "CREATE_FAILED", + "UPDATE_IN_PROGRESS", + "UPDATE_COMPLETE", + "UPDATE_REVERTED", + "UPDATE_FAILED", + "READY", + "NOT_READY", + } +} + type SmoothGroupAudioOnlyTimecodeControl string // Enum values for SmoothGroupAudioOnlyTimecodeControl diff --git a/service/medialive/types/types.go b/service/medialive/types/types.go index f7586a5f88e..326f52de187 100644 --- a/service/medialive/types/types.go +++ b/service/medialive/types/types.go @@ -1128,6 +1128,139 @@ type ChannelSummary struct { noSmithyDocumentSerde } +// Placeholder documentation for CloudWatchAlarmTemplateGroupSummary +type CloudWatchAlarmTemplateGroupSummary struct { + + // A cloudwatch alarm template group's ARN (Amazon Resource Name) + // + // This member is required. + Arn *string + + // Placeholder documentation for __timestampIso8601 + // + // This member is required. + CreatedAt *time.Time + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + // + // This member is required. + Id *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // The number of templates in a group. + // + // This member is required. + TemplateCount *int32 + + // A resource's optional description. + Description *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Placeholder documentation for CloudWatchAlarmTemplateSummary +type CloudWatchAlarmTemplateSummary struct { + + // A cloudwatch alarm template's ARN (Amazon Resource Name) + // + // This member is required. + Arn *string + + // The comparison operator used to compare the specified statistic and the + // threshold. + // + // This member is required. + ComparisonOperator CloudWatchAlarmTemplateComparisonOperator + + // Placeholder documentation for __timestampIso8601 + // + // This member is required. + CreatedAt *time.Time + + // The number of periods over which data is compared to the specified threshold. + // + // This member is required. + EvaluationPeriods *int32 + + // A cloudwatch alarm template group's id. AWS provided template groups have ids + // that start with aws- + // + // This member is required. + GroupId *string + + // A cloudwatch alarm template's id. AWS provided templates have ids that start + // with aws- + // + // This member is required. + Id *string + + // The name of the metric associated with the alarm. Must be compatible with + // targetResourceType. + // + // This member is required. + MetricName *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // The period, in seconds, over which the specified statistic is applied. + // + // This member is required. + Period *int32 + + // The statistic to apply to the alarm's metric data. + // + // This member is required. + Statistic CloudWatchAlarmTemplateStatistic + + // The resource type this template should dynamically generate cloudwatch metric + // alarms for. + // + // This member is required. + TargetResourceType CloudWatchAlarmTemplateTargetResourceType + + // The threshold value to compare with the specified statistic. + // + // This member is required. + Threshold *float64 + + // Specifies how missing data points are treated when evaluating the alarm's + // condition. + // + // This member is required. + TreatMissingData CloudWatchAlarmTemplateTreatMissingData + + // The number of datapoints within the evaluation period that must be breaching to + // trigger the alarm. + DatapointsToAlarm *int32 + + // A resource's optional description. + Description *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + // Cmaf Ingest Group Settings type CmafIngestGroupSettings struct { @@ -1693,6 +1826,112 @@ type Esam struct { noSmithyDocumentSerde } +// Placeholder documentation for EventBridgeRuleTemplateGroupSummary +type EventBridgeRuleTemplateGroupSummary struct { + + // An eventbridge rule template group's ARN (Amazon Resource Name) + // + // This member is required. + Arn *string + + // Placeholder documentation for __timestampIso8601 + // + // This member is required. + CreatedAt *time.Time + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + // + // This member is required. + Id *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // The number of templates in a group. + // + // This member is required. + TemplateCount *int32 + + // A resource's optional description. + Description *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// Placeholder documentation for EventBridgeRuleTemplateSummary +type EventBridgeRuleTemplateSummary struct { + + // An eventbridge rule template's ARN (Amazon Resource Name) + // + // This member is required. + Arn *string + + // Placeholder documentation for __timestampIso8601 + // + // This member is required. + CreatedAt *time.Time + + // The number of targets configured to send matching events. + // + // This member is required. + EventTargetCount *int32 + + // The type of event to match with the rule. + // + // This member is required. + EventType EventBridgeRuleTemplateEventType + + // An eventbridge rule template group's id. AWS provided template groups have ids + // that start with aws- + // + // This member is required. + GroupId *string + + // An eventbridge rule template's id. AWS provided templates have ids that start + // with aws- + // + // This member is required. + Id *string + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // A resource's optional description. + Description *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + +// The target to which to send matching events. +type EventBridgeRuleTemplateTarget struct { + + // Target ARNs must be either an SNS topic or CloudWatch log group. + // + // This member is required. + Arn *string + + noSmithyDocumentSerde +} + // Failover Condition settings. There can be multiple failover conditions inside // AutomaticInputFailoverSettings. type FailoverCondition struct { @@ -4029,6 +4268,52 @@ type MediaPackageOutputSettings struct { noSmithyDocumentSerde } +// An AWS resource used in media workflows. +type MediaResource struct { + + // Placeholder documentation for __listOfMediaResourceNeighbor + Destinations []MediaResourceNeighbor + + // The logical name of an AWS media resource. + Name *string + + // Placeholder documentation for __listOfMediaResourceNeighbor + Sources []MediaResourceNeighbor + + noSmithyDocumentSerde +} + +// A direct source or destination neighbor to an AWS media resource. +type MediaResourceNeighbor struct { + + // The ARN of a resource used in AWS media workflows. + // + // This member is required. + Arn *string + + // The logical name of an AWS media resource. + Name *string + + noSmithyDocumentSerde +} + +// Represents the latest monitor deployment of a signal map. +type MonitorDeployment struct { + + // A signal map's monitor deployment status. + // + // This member is required. + Status SignalMapMonitorDeploymentStatus + + // URI associated with a signal map's monitor deployment. + DetailsUri *string + + // Error message associated with a failed monitor deployment of a signal map. + ErrorMessage *string + + noSmithyDocumentSerde +} + // Settings to specify the rendering of motion graphics into the video stream. type MotionGraphicsActivateScheduleActionSettings struct { @@ -5544,6 +5829,53 @@ type Scte35TimeSignalScheduleActionSettings struct { noSmithyDocumentSerde } +// Placeholder documentation for SignalMapSummary +type SignalMapSummary struct { + + // A signal map's ARN (Amazon Resource Name) + // + // This member is required. + Arn *string + + // Placeholder documentation for __timestampIso8601 + // + // This member is required. + CreatedAt *time.Time + + // A signal map's id. + // + // This member is required. + Id *string + + // A signal map's monitor deployment status. + // + // This member is required. + MonitorDeploymentStatus SignalMapMonitorDeploymentStatus + + // A resource's name. Names must be unique within the scope of a resource type in + // a specific region. + // + // This member is required. + Name *string + + // A signal map's current status which is dependent on its lifecycle actions or + // associated jobs. + // + // This member is required. + Status SignalMapStatus + + // A resource's optional description. + Description *string + + // Placeholder documentation for __timestampIso8601 + ModifiedAt *time.Time + + // Represents the tags associated with a resource. + Tags map[string]string + + noSmithyDocumentSerde +} + // Smpte Tt Destination Settings type SmpteTtDestinationSettings struct { noSmithyDocumentSerde @@ -5755,6 +6087,22 @@ type StopTimecode struct { noSmithyDocumentSerde } +// Represents the latest successful monitor deployment of a signal map. +type SuccessfulMonitorDeployment struct { + + // URI associated with a signal map's monitor deployment. + // + // This member is required. + DetailsUri *string + + // A signal map's monitor deployment status. + // + // This member is required. + Status SignalMapMonitorDeploymentStatus + + noSmithyDocumentSerde +} + // Teletext Destination Settings type TeletextDestinationSettings struct { noSmithyDocumentSerde diff --git a/service/medialive/validators.go b/service/medialive/validators.go index 9371b90d0e6..ba6a49cedbe 100644 --- a/service/medialive/validators.go +++ b/service/medialive/validators.go @@ -90,6 +90,86 @@ func (m *validateOpCreateChannel) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpCreateCloudWatchAlarmTemplateGroup struct { +} + +func (*validateOpCreateCloudWatchAlarmTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCloudWatchAlarmTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCloudWatchAlarmTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCloudWatchAlarmTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateCloudWatchAlarmTemplate struct { +} + +func (*validateOpCreateCloudWatchAlarmTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateCloudWatchAlarmTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateCloudWatchAlarmTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateCloudWatchAlarmTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateEventBridgeRuleTemplateGroup struct { +} + +func (*validateOpCreateEventBridgeRuleTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEventBridgeRuleTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEventBridgeRuleTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEventBridgeRuleTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateEventBridgeRuleTemplate struct { +} + +func (*validateOpCreateEventBridgeRuleTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateEventBridgeRuleTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateEventBridgeRuleTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateEventBridgeRuleTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateInput struct { } @@ -170,6 +250,26 @@ func (m *validateOpCreatePartnerInput) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpCreateSignalMap struct { +} + +func (*validateOpCreateSignalMap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateSignalMap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateSignalMapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateSignalMapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateTags struct { } @@ -210,6 +310,86 @@ func (m *validateOpDeleteChannel) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpDeleteCloudWatchAlarmTemplateGroup struct { +} + +func (*validateOpDeleteCloudWatchAlarmTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCloudWatchAlarmTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCloudWatchAlarmTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCloudWatchAlarmTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteCloudWatchAlarmTemplate struct { +} + +func (*validateOpDeleteCloudWatchAlarmTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteCloudWatchAlarmTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteCloudWatchAlarmTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteCloudWatchAlarmTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteEventBridgeRuleTemplateGroup struct { +} + +func (*validateOpDeleteEventBridgeRuleTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteEventBridgeRuleTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteEventBridgeRuleTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteEventBridgeRuleTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteEventBridgeRuleTemplate struct { +} + +func (*validateOpDeleteEventBridgeRuleTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteEventBridgeRuleTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteEventBridgeRuleTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteEventBridgeRuleTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteInput struct { } @@ -330,6 +510,26 @@ func (m *validateOpDeleteSchedule) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpDeleteSignalMap struct { +} + +func (*validateOpDeleteSignalMap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSignalMap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSignalMapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSignalMapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteTags struct { } @@ -570,6 +770,106 @@ func (m *validateOpDescribeThumbnails) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetCloudWatchAlarmTemplateGroup struct { +} + +func (*validateOpGetCloudWatchAlarmTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCloudWatchAlarmTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCloudWatchAlarmTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCloudWatchAlarmTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetCloudWatchAlarmTemplate struct { +} + +func (*validateOpGetCloudWatchAlarmTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetCloudWatchAlarmTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetCloudWatchAlarmTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetCloudWatchAlarmTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetEventBridgeRuleTemplateGroup struct { +} + +func (*validateOpGetEventBridgeRuleTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetEventBridgeRuleTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetEventBridgeRuleTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetEventBridgeRuleTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetEventBridgeRuleTemplate struct { +} + +func (*validateOpGetEventBridgeRuleTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetEventBridgeRuleTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetEventBridgeRuleTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetEventBridgeRuleTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpGetSignalMap struct { +} + +func (*validateOpGetSignalMap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSignalMap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSignalMapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSignalMapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListInputDeviceTransfers struct { } @@ -730,6 +1030,26 @@ func (m *validateOpStartChannel) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpStartDeleteMonitorDeployment struct { +} + +func (*validateOpStartDeleteMonitorDeployment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartDeleteMonitorDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartDeleteMonitorDeploymentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartDeleteMonitorDeploymentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartInputDevice struct { } @@ -770,6 +1090,26 @@ func (m *validateOpStartInputDeviceMaintenanceWindow) HandleInitialize(ctx conte return next.HandleInitialize(ctx, in) } +type validateOpStartMonitorDeployment struct { +} + +func (*validateOpStartMonitorDeployment) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartMonitorDeployment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartMonitorDeploymentInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartMonitorDeploymentInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartMultiplex struct { } @@ -790,6 +1130,26 @@ func (m *validateOpStartMultiplex) HandleInitialize(ctx context.Context, in midd return next.HandleInitialize(ctx, in) } +type validateOpStartUpdateSignalMap struct { +} + +func (*validateOpStartUpdateSignalMap) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartUpdateSignalMap) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartUpdateSignalMapInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartUpdateSignalMapInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStopChannel struct { } @@ -910,6 +1270,86 @@ func (m *validateOpUpdateChannel) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateCloudWatchAlarmTemplateGroup struct { +} + +func (*validateOpUpdateCloudWatchAlarmTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCloudWatchAlarmTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCloudWatchAlarmTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCloudWatchAlarmTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateCloudWatchAlarmTemplate struct { +} + +func (*validateOpUpdateCloudWatchAlarmTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateCloudWatchAlarmTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateCloudWatchAlarmTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateCloudWatchAlarmTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateEventBridgeRuleTemplateGroup struct { +} + +func (*validateOpUpdateEventBridgeRuleTemplateGroup) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateEventBridgeRuleTemplateGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateEventBridgeRuleTemplateGroupInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateEventBridgeRuleTemplateGroupInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateEventBridgeRuleTemplate struct { +} + +func (*validateOpUpdateEventBridgeRuleTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateEventBridgeRuleTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateEventBridgeRuleTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateEventBridgeRuleTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateInputDevice struct { } @@ -1046,6 +1486,22 @@ func addOpCreateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateChannel{}, middleware.After) } +func addOpCreateCloudWatchAlarmTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCloudWatchAlarmTemplateGroup{}, middleware.After) +} + +func addOpCreateCloudWatchAlarmTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateCloudWatchAlarmTemplate{}, middleware.After) +} + +func addOpCreateEventBridgeRuleTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEventBridgeRuleTemplateGroup{}, middleware.After) +} + +func addOpCreateEventBridgeRuleTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateEventBridgeRuleTemplate{}, middleware.After) +} + func addOpCreateInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateInput{}, middleware.After) } @@ -1062,6 +1518,10 @@ func addOpCreatePartnerInputValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpCreatePartnerInput{}, middleware.After) } +func addOpCreateSignalMapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateSignalMap{}, middleware.After) +} + func addOpCreateTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTags{}, middleware.After) } @@ -1070,6 +1530,22 @@ func addOpDeleteChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteChannel{}, middleware.After) } +func addOpDeleteCloudWatchAlarmTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCloudWatchAlarmTemplateGroup{}, middleware.After) +} + +func addOpDeleteCloudWatchAlarmTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteCloudWatchAlarmTemplate{}, middleware.After) +} + +func addOpDeleteEventBridgeRuleTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEventBridgeRuleTemplateGroup{}, middleware.After) +} + +func addOpDeleteEventBridgeRuleTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEventBridgeRuleTemplate{}, middleware.After) +} + func addOpDeleteInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteInput{}, middleware.After) } @@ -1094,6 +1570,10 @@ func addOpDeleteScheduleValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSchedule{}, middleware.After) } +func addOpDeleteSignalMapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSignalMap{}, middleware.After) +} + func addOpDeleteTagsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteTags{}, middleware.After) } @@ -1142,6 +1622,26 @@ func addOpDescribeThumbnailsValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDescribeThumbnails{}, middleware.After) } +func addOpGetCloudWatchAlarmTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCloudWatchAlarmTemplateGroup{}, middleware.After) +} + +func addOpGetCloudWatchAlarmTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetCloudWatchAlarmTemplate{}, middleware.After) +} + +func addOpGetEventBridgeRuleTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEventBridgeRuleTemplateGroup{}, middleware.After) +} + +func addOpGetEventBridgeRuleTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEventBridgeRuleTemplate{}, middleware.After) +} + +func addOpGetSignalMapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSignalMap{}, middleware.After) +} + func addOpListInputDeviceTransfersValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListInputDeviceTransfers{}, middleware.After) } @@ -1174,6 +1674,10 @@ func addOpStartChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartChannel{}, middleware.After) } +func addOpStartDeleteMonitorDeploymentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartDeleteMonitorDeployment{}, middleware.After) +} + func addOpStartInputDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartInputDevice{}, middleware.After) } @@ -1182,10 +1686,18 @@ func addOpStartInputDeviceMaintenanceWindowValidationMiddleware(stack *middlewar return stack.Initialize.Add(&validateOpStartInputDeviceMaintenanceWindow{}, middleware.After) } +func addOpStartMonitorDeploymentValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartMonitorDeployment{}, middleware.After) +} + func addOpStartMultiplexValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartMultiplex{}, middleware.After) } +func addOpStartUpdateSignalMapValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartUpdateSignalMap{}, middleware.After) +} + func addOpStopChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopChannel{}, middleware.After) } @@ -1210,6 +1722,22 @@ func addOpUpdateChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateChannel{}, middleware.After) } +func addOpUpdateCloudWatchAlarmTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCloudWatchAlarmTemplateGroup{}, middleware.After) +} + +func addOpUpdateCloudWatchAlarmTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateCloudWatchAlarmTemplate{}, middleware.After) +} + +func addOpUpdateEventBridgeRuleTemplateGroupValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateEventBridgeRuleTemplateGroup{}, middleware.After) +} + +func addOpUpdateEventBridgeRuleTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateEventBridgeRuleTemplate{}, middleware.After) +} + func addOpUpdateInputDeviceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateInputDevice{}, middleware.After) } @@ -1370,6 +1898,23 @@ func validate__listOfColorCorrection(v []types.ColorCorrection) error { } } +func validate__listOfEventBridgeRuleTemplateTarget(v []types.EventBridgeRuleTemplateTarget) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOfEventBridgeRuleTemplateTarget"} + for i := range v { + if err := validateEventBridgeRuleTemplateTarget(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validate__listOfFailoverCondition(v []types.FailoverCondition) error { if v == nil { return nil @@ -2286,6 +2831,21 @@ func validateEsam(v *types.Esam) error { } } +func validateEventBridgeRuleTemplateTarget(v *types.EventBridgeRuleTemplateTarget) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "EventBridgeRuleTemplateTarget"} + if v.Arn == nil { + invalidParams.Add(smithy.NewErrParamRequired("Arn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateFailoverCondition(v *types.FailoverCondition) error { if v == nil { return nil @@ -3637,13 +4197,95 @@ func validateVpcOutputSettings(v *types.VpcOutputSettings) error { } } -func validateOpAcceptInputDeviceTransferInput(v *AcceptInputDeviceTransferInput) error { +func validateOpAcceptInputDeviceTransferInput(v *AcceptInputDeviceTransferInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptInputDeviceTransferInput"} + if v.InputDeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchUpdateScheduleInput(v *BatchUpdateScheduleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateScheduleInput"} + if v.ChannelId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) + } + if v.Creates != nil { + if err := validateBatchScheduleActionCreateRequest(v.Creates); err != nil { + invalidParams.AddNested("Creates", err.(smithy.InvalidParamsError)) + } + } + if v.Deletes != nil { + if err := validateBatchScheduleActionDeleteRequest(v.Deletes); err != nil { + invalidParams.AddNested("Deletes", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCancelInputDeviceTransferInput(v *CancelInputDeviceTransferInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CancelInputDeviceTransferInput"} + if v.InputDeviceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateChannelInput(v *CreateChannelInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateChannelInput"} + if v.EncoderSettings != nil { + if err := validateEncoderSettings(v.EncoderSettings); err != nil { + invalidParams.AddNested("EncoderSettings", err.(smithy.InvalidParamsError)) + } + } + if v.InputAttachments != nil { + if err := validate__listOfInputAttachment(v.InputAttachments); err != nil { + invalidParams.AddNested("InputAttachments", err.(smithy.InvalidParamsError)) + } + } + if v.Vpc != nil { + if err := validateVpcOutputSettings(v.Vpc); err != nil { + invalidParams.AddNested("Vpc", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateCloudWatchAlarmTemplateGroupInput(v *CreateCloudWatchAlarmTemplateGroupInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "AcceptInputDeviceTransferInput"} - if v.InputDeviceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) + invalidParams := smithy.InvalidParamsError{Context: "CreateCloudWatchAlarmTemplateGroupInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams @@ -3652,23 +4294,40 @@ func validateOpAcceptInputDeviceTransferInput(v *AcceptInputDeviceTransferInput) } } -func validateOpBatchUpdateScheduleInput(v *BatchUpdateScheduleInput) error { +func validateOpCreateCloudWatchAlarmTemplateInput(v *CreateCloudWatchAlarmTemplateInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateScheduleInput"} - if v.ChannelId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelId")) + invalidParams := smithy.InvalidParamsError{Context: "CreateCloudWatchAlarmTemplateInput"} + if len(v.ComparisonOperator) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ComparisonOperator")) } - if v.Creates != nil { - if err := validateBatchScheduleActionCreateRequest(v.Creates); err != nil { - invalidParams.AddNested("Creates", err.(smithy.InvalidParamsError)) - } + if v.EvaluationPeriods == nil { + invalidParams.Add(smithy.NewErrParamRequired("EvaluationPeriods")) } - if v.Deletes != nil { - if err := validateBatchScheduleActionDeleteRequest(v.Deletes); err != nil { - invalidParams.AddNested("Deletes", err.(smithy.InvalidParamsError)) - } + if v.GroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupIdentifier")) + } + if v.MetricName == nil { + invalidParams.Add(smithy.NewErrParamRequired("MetricName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Period == nil { + invalidParams.Add(smithy.NewErrParamRequired("Period")) + } + if len(v.Statistic) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Statistic")) + } + if len(v.TargetResourceType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TargetResourceType")) + } + if v.Threshold == nil { + invalidParams.Add(smithy.NewErrParamRequired("Threshold")) + } + if len(v.TreatMissingData) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TreatMissingData")) } if invalidParams.Len() > 0 { return invalidParams @@ -3677,13 +4336,13 @@ func validateOpBatchUpdateScheduleInput(v *BatchUpdateScheduleInput) error { } } -func validateOpCancelInputDeviceTransferInput(v *CancelInputDeviceTransferInput) error { +func validateOpCreateEventBridgeRuleTemplateGroupInput(v *CreateEventBridgeRuleTemplateGroupInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "CancelInputDeviceTransferInput"} - if v.InputDeviceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("InputDeviceId")) + invalidParams := smithy.InvalidParamsError{Context: "CreateEventBridgeRuleTemplateGroupInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams @@ -3692,25 +4351,24 @@ func validateOpCancelInputDeviceTransferInput(v *CancelInputDeviceTransferInput) } } -func validateOpCreateChannelInput(v *CreateChannelInput) error { +func validateOpCreateEventBridgeRuleTemplateInput(v *CreateEventBridgeRuleTemplateInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "CreateChannelInput"} - if v.EncoderSettings != nil { - if err := validateEncoderSettings(v.EncoderSettings); err != nil { - invalidParams.AddNested("EncoderSettings", err.(smithy.InvalidParamsError)) + invalidParams := smithy.InvalidParamsError{Context: "CreateEventBridgeRuleTemplateInput"} + if v.EventTargets != nil { + if err := validate__listOfEventBridgeRuleTemplateTarget(v.EventTargets); err != nil { + invalidParams.AddNested("EventTargets", err.(smithy.InvalidParamsError)) } } - if v.InputAttachments != nil { - if err := validate__listOfInputAttachment(v.InputAttachments); err != nil { - invalidParams.AddNested("InputAttachments", err.(smithy.InvalidParamsError)) - } + if len(v.EventType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("EventType")) } - if v.Vpc != nil { - if err := validateVpcOutputSettings(v.Vpc); err != nil { - invalidParams.AddNested("Vpc", err.(smithy.InvalidParamsError)) - } + if v.GroupIdentifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupIdentifier")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams @@ -3807,6 +4465,24 @@ func validateOpCreatePartnerInputInput(v *CreatePartnerInputInput) error { } } +func validateOpCreateSignalMapInput(v *CreateSignalMapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateSignalMapInput"} + if v.DiscoveryEntryPointArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("DiscoveryEntryPointArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateTagsInput(v *CreateTagsInput) error { if v == nil { return nil @@ -3837,6 +4513,66 @@ func validateOpDeleteChannelInput(v *DeleteChannelInput) error { } } +func validateOpDeleteCloudWatchAlarmTemplateGroupInput(v *DeleteCloudWatchAlarmTemplateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCloudWatchAlarmTemplateGroupInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteCloudWatchAlarmTemplateInput(v *DeleteCloudWatchAlarmTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteCloudWatchAlarmTemplateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteEventBridgeRuleTemplateGroupInput(v *DeleteEventBridgeRuleTemplateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteEventBridgeRuleTemplateGroupInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteEventBridgeRuleTemplateInput(v *DeleteEventBridgeRuleTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteEventBridgeRuleTemplateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteInputInput(v *DeleteInputInput) error { if v == nil { return nil @@ -3930,6 +4666,21 @@ func validateOpDeleteScheduleInput(v *DeleteScheduleInput) error { } } +func validateOpDeleteSignalMapInput(v *DeleteSignalMapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSignalMapInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteTagsInput(v *DeleteTagsInput) error { if v == nil { return nil @@ -4125,6 +4876,81 @@ func validateOpDescribeThumbnailsInput(v *DescribeThumbnailsInput) error { } } +func validateOpGetCloudWatchAlarmTemplateGroupInput(v *GetCloudWatchAlarmTemplateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCloudWatchAlarmTemplateGroupInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetCloudWatchAlarmTemplateInput(v *GetCloudWatchAlarmTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetCloudWatchAlarmTemplateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetEventBridgeRuleTemplateGroupInput(v *GetEventBridgeRuleTemplateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetEventBridgeRuleTemplateGroupInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetEventBridgeRuleTemplateInput(v *GetEventBridgeRuleTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetEventBridgeRuleTemplateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpGetSignalMapInput(v *GetSignalMapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSignalMapInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListInputDeviceTransfersInput(v *ListInputDeviceTransfersInput) error { if v == nil { return nil @@ -4248,6 +5074,21 @@ func validateOpStartChannelInput(v *StartChannelInput) error { } } +func validateOpStartDeleteMonitorDeploymentInput(v *StartDeleteMonitorDeploymentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartDeleteMonitorDeploymentInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartInputDeviceInput(v *StartInputDeviceInput) error { if v == nil { return nil @@ -4278,6 +5119,21 @@ func validateOpStartInputDeviceMaintenanceWindowInput(v *StartInputDeviceMainten } } +func validateOpStartMonitorDeploymentInput(v *StartMonitorDeploymentInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartMonitorDeploymentInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartMultiplexInput(v *StartMultiplexInput) error { if v == nil { return nil @@ -4293,6 +5149,21 @@ func validateOpStartMultiplexInput(v *StartMultiplexInput) error { } } +func validateOpStartUpdateSignalMapInput(v *StartUpdateSignalMapInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartUpdateSignalMapInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStopChannelInput(v *StopChannelInput) error { if v == nil { return nil @@ -4396,6 +5267,71 @@ func validateOpUpdateChannelInput(v *UpdateChannelInput) error { } } +func validateOpUpdateCloudWatchAlarmTemplateGroupInput(v *UpdateCloudWatchAlarmTemplateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCloudWatchAlarmTemplateGroupInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateCloudWatchAlarmTemplateInput(v *UpdateCloudWatchAlarmTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateCloudWatchAlarmTemplateInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateEventBridgeRuleTemplateGroupInput(v *UpdateEventBridgeRuleTemplateGroupInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateEventBridgeRuleTemplateGroupInput"} + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateEventBridgeRuleTemplateInput(v *UpdateEventBridgeRuleTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateEventBridgeRuleTemplateInput"} + if v.EventTargets != nil { + if err := validate__listOfEventBridgeRuleTemplateTarget(v.EventTargets); err != nil { + invalidParams.AddNested("EventTargets", err.(smithy.InvalidParamsError)) + } + } + if v.Identifier == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifier")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateInputDeviceInput(v *UpdateInputDeviceInput) error { if v == nil { return nil diff --git a/service/omics/api_op_CreateMultipartReadSetUpload.go b/service/omics/api_op_CreateMultipartReadSetUpload.go index ad13cd96953..ccce70c26c8 100644 --- a/service/omics/api_op_CreateMultipartReadSetUpload.go +++ b/service/omics/api_op_CreateMultipartReadSetUpload.go @@ -107,7 +107,7 @@ type CreateMultipartReadSetUploadOutput struct { // This member is required. SubjectId *string - // he ID for the initiated multipart upload. + // The ID for the initiated multipart upload. // // This member is required. UploadId *string diff --git a/service/omics/api_op_CreateSequenceStore.go b/service/omics/api_op_CreateSequenceStore.go index 686b31be861..3b653f985e4 100644 --- a/service/omics/api_op_CreateSequenceStore.go +++ b/service/omics/api_op_CreateSequenceStore.go @@ -42,6 +42,9 @@ type CreateSequenceStoreInput struct { // A description for the store. Description *string + // The ETag algorithm family to use for ingested read sets. + ETagAlgorithmFamily types.ETagAlgorithmFamily + // An S3 location that is used to store files that have failed a direct upload. FallbackLocation *string @@ -74,6 +77,9 @@ type CreateSequenceStoreOutput struct { // The store's description. Description *string + // The algorithm family of the ETag. + ETagAlgorithmFamily types.ETagAlgorithmFamily + // An S3 location that is used to store files that have failed a direct upload. FallbackLocation *string diff --git a/service/omics/api_op_GetSequenceStore.go b/service/omics/api_op_GetSequenceStore.go index d5195783c75..a5787ecc49c 100644 --- a/service/omics/api_op_GetSequenceStore.go +++ b/service/omics/api_op_GetSequenceStore.go @@ -58,12 +58,19 @@ type GetSequenceStoreOutput struct { // The store's description. Description *string + // The algorithm family of the ETag. + ETagAlgorithmFamily types.ETagAlgorithmFamily + // An S3 location that is used to store files that have failed a direct upload. FallbackLocation *string // The store's name. Name *string + // The S3 metadata of a sequence store, including the ARN and S3 URI of the S3 + // bucket. + S3Access *types.SequenceStoreS3Access + // The store's server-side encryption (SSE) settings. SseConfig *types.SseConfig diff --git a/service/omics/api_op_ListMultipartReadSetUploads.go b/service/omics/api_op_ListMultipartReadSetUploads.go index b659dbe0ce5..c443dd85e54 100644 --- a/service/omics/api_op_ListMultipartReadSetUploads.go +++ b/service/omics/api_op_ListMultipartReadSetUploads.go @@ -13,7 +13,7 @@ import ( // Lists multipart read set uploads and for in progress uploads. Once the upload // is completed, a read set is created and the upload will no longer be returned in -// the respone. +// the response. func (c *Client) ListMultipartReadSetUploads(ctx context.Context, params *ListMultipartReadSetUploadsInput, optFns ...func(*Options)) (*ListMultipartReadSetUploadsOutput, error) { if params == nil { params = &ListMultipartReadSetUploadsInput{} diff --git a/service/omics/api_op_StartRun.go b/service/omics/api_op_StartRun.go index fd91f2b76c6..1cd28ea050f 100644 --- a/service/omics/api_op_StartRun.go +++ b/service/omics/api_op_StartRun.go @@ -69,7 +69,7 @@ type StartRunInput struct { // The ID of a run to duplicate. RunId *string - // A storage capacity for the run in gigabytes. + // A storage capacity for the run in gibibytes. StorageCapacity *int32 // Tags for the run. diff --git a/service/omics/deserializers.go b/service/omics/deserializers.go index 9667107ee86..fbb316ee0ba 100644 --- a/service/omics/deserializers.go +++ b/service/omics/deserializers.go @@ -2218,6 +2218,15 @@ func awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(v **CreateSeque sv.Description = ptr.String(jtv) } + case "eTagAlgorithmFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ETagAlgorithmFamily to be of type string, got %T instead", value) + } + sv.ETagAlgorithmFamily = types.ETagAlgorithmFamily(jtv) + } + case "fallbackLocation": if value != nil { jtv, ok := value.(string) @@ -8059,6 +8068,15 @@ func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceSto sv.Description = ptr.String(jtv) } + case "eTagAlgorithmFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ETagAlgorithmFamily to be of type string, got %T instead", value) + } + sv.ETagAlgorithmFamily = types.ETagAlgorithmFamily(jtv) + } + case "fallbackLocation": if value != nil { jtv, ok := value.(string) @@ -8086,6 +8104,11 @@ func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceSto sv.Name = ptr.String(jtv) } + case "s3Access": + if err := awsRestjson1_deserializeDocumentSequenceStoreS3Access(&sv.S3Access, value); err != nil { + return err + } + case "sseConfig": if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { return err @@ -16974,6 +16997,11 @@ func awsRestjson1_deserializeDocumentFileInformation(v **types.FileInformation, sv.PartSize = ptr.Int64(i64) } + case "s3Access": + if err := awsRestjson1_deserializeDocumentReadSetS3Access(&sv.S3Access, value); err != nil { + return err + } + case "totalParts": if value != nil { jtv, ok := value.(json.Number) @@ -18337,6 +18365,46 @@ func awsRestjson1_deserializeDocumentReadSetListItem(v **types.ReadSetListItem, return nil } +func awsRestjson1_deserializeDocumentReadSetS3Access(v **types.ReadSetS3Access, 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.ReadSetS3Access + if *v == nil { + sv = &types.ReadSetS3Access{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentReadSetUploadPartList(v *[]types.ReadSetUploadPartListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -19529,6 +19597,15 @@ func awsRestjson1_deserializeDocumentSequenceStoreDetail(v **types.SequenceStore sv.Description = ptr.String(jtv) } + case "eTagAlgorithmFamily": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ETagAlgorithmFamily to be of type string, got %T instead", value) + } + sv.ETagAlgorithmFamily = types.ETagAlgorithmFamily(jtv) + } + case "fallbackLocation": if value != nil { jtv, ok := value.(string) @@ -19604,6 +19681,55 @@ func awsRestjson1_deserializeDocumentSequenceStoreDetailList(v *[]types.Sequence return nil } +func awsRestjson1_deserializeDocumentSequenceStoreS3Access(v **types.SequenceStoreS3Access, 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.SequenceStoreS3Access + if *v == nil { + sv = &types.SequenceStoreS3Access{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3AccessPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3AccessPointArn to be of type string, got %T instead", value) + } + sv.S3AccessPointArn = ptr.String(jtv) + } + + case "s3Uri": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Uri to be of type string, got %T instead", value) + } + sv.S3Uri = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/omics/serializers.go b/service/omics/serializers.go index 03a58b0a099..3f671526856 100644 --- a/service/omics/serializers.go +++ b/service/omics/serializers.go @@ -1178,6 +1178,11 @@ func awsRestjson1_serializeOpDocumentCreateSequenceStoreInput(v *CreateSequenceS ok.String(*v.Description) } + if len(v.ETagAlgorithmFamily) > 0 { + ok := object.Key("eTagAlgorithmFamily") + ok.String(string(v.ETagAlgorithmFamily)) + } + if v.FallbackLocation != nil { ok := object.Key("fallbackLocation") ok.String(*v.FallbackLocation) diff --git a/service/omics/types/enums.go b/service/omics/types/enums.go index a0298f99220..fa2e1fc042f 100644 --- a/service/omics/types/enums.go +++ b/service/omics/types/enums.go @@ -94,9 +94,15 @@ type ETagAlgorithm string // Enum values for ETagAlgorithm const ( - ETagAlgorithmFastqMd5up ETagAlgorithm = "FASTQ_MD5up" - ETagAlgorithmBamMd5up ETagAlgorithm = "BAM_MD5up" - ETagAlgorithmCramMd5up ETagAlgorithm = "CRAM_MD5up" + ETagAlgorithmFastqMd5up ETagAlgorithm = "FASTQ_MD5up" + ETagAlgorithmBamMd5up ETagAlgorithm = "BAM_MD5up" + ETagAlgorithmCramMd5up ETagAlgorithm = "CRAM_MD5up" + ETagAlgorithmFastqSha256up ETagAlgorithm = "FASTQ_SHA256up" + ETagAlgorithmBamSha256up ETagAlgorithm = "BAM_SHA256up" + ETagAlgorithmCramSha256up ETagAlgorithm = "CRAM_SHA256up" + ETagAlgorithmFastqSha512up ETagAlgorithm = "FASTQ_SHA512up" + ETagAlgorithmBamSha512up ETagAlgorithm = "BAM_SHA512up" + ETagAlgorithmCramSha512up ETagAlgorithm = "CRAM_SHA512up" ) // Values returns all known values for ETagAlgorithm. Note that this can be @@ -107,6 +113,32 @@ func (ETagAlgorithm) Values() []ETagAlgorithm { "FASTQ_MD5up", "BAM_MD5up", "CRAM_MD5up", + "FASTQ_SHA256up", + "BAM_SHA256up", + "CRAM_SHA256up", + "FASTQ_SHA512up", + "BAM_SHA512up", + "CRAM_SHA512up", + } +} + +type ETagAlgorithmFamily string + +// Enum values for ETagAlgorithmFamily +const ( + ETagAlgorithmFamilyMd5up ETagAlgorithmFamily = "MD5up" + ETagAlgorithmFamilySha256up ETagAlgorithmFamily = "SHA256up" + ETagAlgorithmFamilySha512up ETagAlgorithmFamily = "SHA512up" +) + +// Values returns all known values for ETagAlgorithmFamily. 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 (ETagAlgorithmFamily) Values() []ETagAlgorithmFamily { + return []ETagAlgorithmFamily{ + "MD5up", + "SHA256up", + "SHA512up", } } diff --git a/service/omics/types/types.go b/service/omics/types/types.go index a8e4d3f9e81..3cb523ce131 100644 --- a/service/omics/types/types.go +++ b/service/omics/types/types.go @@ -399,6 +399,9 @@ type FileInformation struct { // The file's part size. PartSize *int64 + // The S3 URI metadata of a sequence store. + S3Access *ReadSetS3Access + // The file's total parts. TotalParts *int32 @@ -893,6 +896,15 @@ type ReadSetListItem struct { noSmithyDocumentSerde } +// The S3 URI for each read set file. +type ReadSetS3Access struct { + + // The S3 URI for each read set file. + S3Uri *string + + noSmithyDocumentSerde +} + // Filter settings that select for read set upload parts of interest. type ReadSetUploadPartListFilter struct { @@ -1195,6 +1207,9 @@ type SequenceStoreDetail struct { // The store's description. Description *string + // The algorithm family of the ETag. + ETagAlgorithmFamily ETagAlgorithmFamily + // An S3 location that is used to store files that have failed a direct upload. FallbackLocation *string @@ -1222,6 +1237,18 @@ type SequenceStoreFilter struct { noSmithyDocumentSerde } +// The S3 access metadata of the sequence store. +type SequenceStoreS3Access struct { + + // This is ARN of the access point associated with the S3 bucket storing read sets. + S3AccessPointArn *string + + // The S3 URI of the sequence store. + S3Uri *string + + noSmithyDocumentSerde +} + // The details of a share. type ShareDetails struct { diff --git a/service/rds/api_op_CreateCustomDBEngineVersion.go b/service/rds/api_op_CreateCustomDBEngineVersion.go index 946168a4c30..ea3829e30fd 100644 --- a/service/rds/api_op_CreateCustomDBEngineVersion.go +++ b/service/rds/api_op_CreateCustomDBEngineVersion.go @@ -30,8 +30,11 @@ func (c *Client) CreateCustomDBEngineVersion(ctx context.Context, params *Create type CreateCustomDBEngineVersionInput struct { - // The database engine to use for your custom engine version (CEV). The only - // supported value is custom-oracle-ee . + // The database engine. RDS Custom for Oracle supports the following values: + // - custom-oracle-ee + // - custom-oracle-ee-cdb + // - custom-oracle-se2 + // - custom-oracle-se2-cdb // // This member is required. Engine *string diff --git a/service/rds/api_op_CreateDBInstance.go b/service/rds/api_op_CreateDBInstance.go index 7ce93b0967b..df5d39c5dd6 100644 --- a/service/rds/api_op_CreateDBInstance.go +++ b/service/rds/api_op_CreateDBInstance.go @@ -62,6 +62,8 @@ type CreateDBInstanceInput struct { // - aurora-postgresql (for Aurora PostgreSQL DB instances) // - custom-oracle-ee (for RDS Custom for Oracle DB instances) // - custom-oracle-ee-cdb (for RDS Custom for Oracle DB instances) + // - custom-oracle-se2 (for RDS Custom for Oracle DB instances) + // - custom-oracle-se2-cdb (for RDS Custom for Oracle DB instances) // - custom-sqlserver-ee (for RDS Custom for SQL Server DB instances) // - custom-sqlserver-se (for RDS Custom for SQL Server DB instances) // - custom-sqlserver-web (for RDS Custom for SQL Server DB instances) diff --git a/service/rds/api_op_DeleteCustomDBEngineVersion.go b/service/rds/api_op_DeleteCustomDBEngineVersion.go index c72411d8b21..3ced09e8463 100644 --- a/service/rds/api_op_DeleteCustomDBEngineVersion.go +++ b/service/rds/api_op_DeleteCustomDBEngineVersion.go @@ -44,8 +44,11 @@ func (c *Client) DeleteCustomDBEngineVersion(ctx context.Context, params *Delete type DeleteCustomDBEngineVersionInput struct { - // The database engine. The only supported engines are custom-oracle-ee and - // custom-oracle-ee-cdb . + // The database engine. RDS Custom for Oracle supports the following values: + // - custom-oracle-ee + // - custom-oracle-ee-cdb + // - custom-oracle-se2 + // - custom-oracle-se2-cdb // // This member is required. Engine *string diff --git a/service/rds/api_op_DescribeDBEngineVersions.go b/service/rds/api_op_DescribeDBEngineVersions.go index bfc2967c34a..0cf9e2621ec 100644 --- a/service/rds/api_op_DescribeDBEngineVersions.go +++ b/service/rds/api_op_DescribeDBEngineVersions.go @@ -42,6 +42,9 @@ type DescribeDBEngineVersionsInput struct { // - aurora-mysql // - aurora-postgresql // - custom-oracle-ee + // - custom-oracle-ee-cdb + // - custom-oracle-se2 + // - custom-oracle-se2-cdb // - db2-ae // - db2-se // - mariadb diff --git a/service/rds/api_op_DescribeEngineDefaultParameters.go b/service/rds/api_op_DescribeEngineDefaultParameters.go index 3cf42a5ed78..3317f371afa 100644 --- a/service/rds/api_op_DescribeEngineDefaultParameters.go +++ b/service/rds/api_op_DescribeEngineDefaultParameters.go @@ -39,6 +39,7 @@ type DescribeEngineDefaultParametersInput struct { // - aurora-postgresql13 // - aurora-postgresql14 // - custom-oracle-ee-19 + // - custom-oracle-ee-cdb-19 // - db2-ae // - db2-se // - mariadb10.2 diff --git a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go index 5d8228cf11b..e10e639a31b 100644 --- a/service/rds/api_op_DescribeOrderableDBInstanceOptions.go +++ b/service/rds/api_op_DescribeOrderableDBInstanceOptions.go @@ -29,10 +29,14 @@ func (c *Client) DescribeOrderableDBInstanceOptions(ctx context.Context, params type DescribeOrderableDBInstanceOptionsInput struct { - // The name of the engine to describe DB instance options for. Valid Values: + // The name of the database engine to describe DB instance options for. Valid + // Values: // - aurora-mysql // - aurora-postgresql // - custom-oracle-ee + // - custom-oracle-ee-cdb + // - custom-oracle-se2 + // - custom-oracle-se2-cdb // - db2-ae // - db2-se // - mariadb @@ -79,7 +83,7 @@ type DescribeOrderableDBInstanceOptionsInput struct { // The maximum number of records to include in the response. If more records exist // than the specified MaxRecords value, a pagination token called a marker is // included in the response so that you can retrieve the remaining results. - // Default: 100 Constraints: Minimum 20, maximum 10000. + // Default: 100 Constraints: Minimum 20, maximum 1000. MaxRecords *int32 // Specifies whether to show only VPC or non-VPC offerings. RDS Custom supports @@ -202,7 +206,7 @@ type DescribeOrderableDBInstanceOptionsPaginatorOptions struct { // The maximum number of records to include in the response. If more records exist // than the specified MaxRecords value, a pagination token called a marker is // included in the response so that you can retrieve the remaining results. - // Default: 100 Constraints: Minimum 20, maximum 10000. + // Default: 100 Constraints: Minimum 20, maximum 1000. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/rds/api_op_ModifyCustomDBEngineVersion.go b/service/rds/api_op_ModifyCustomDBEngineVersion.go index 2f0bc60e198..853435473f8 100644 --- a/service/rds/api_op_ModifyCustomDBEngineVersion.go +++ b/service/rds/api_op_ModifyCustomDBEngineVersion.go @@ -38,8 +38,11 @@ func (c *Client) ModifyCustomDBEngineVersion(ctx context.Context, params *Modify type ModifyCustomDBEngineVersionInput struct { - // The DB engine. The only supported values are custom-oracle-ee and - // custom-oracle-ee-cdb . + // The database engine. RDS Custom for Oracle supports the following values: + // - custom-oracle-ee + // - custom-oracle-ee-cdb + // - custom-oracle-se2 + // - custom-oracle-se2-cdb // // This member is required. Engine *string diff --git a/service/rds/api_op_ModifyDBInstance.go b/service/rds/api_op_ModifyDBInstance.go index 7e9b2c9a32f..8b009236e5b 100644 --- a/service/rds/api_op_ModifyDBInstance.go +++ b/service/rds/api_op_ModifyDBInstance.go @@ -44,7 +44,10 @@ type ModifyDBInstanceInput struct { // the value supplied must be at least 10% greater than the current value. Values // that are not at least 10% greater than the existing value are rounded up so that // they are 10% greater than the current value. For the valid values for allocated - // storage for each engine, see CreateDBInstance . + // storage for each engine, see CreateDBInstance . Constraints: + // - When you increase the allocated storage for a DB instance that uses + // Provisioned IOPS ( gp3 , io1 , or io2 storage type), you must also specify the + // Iops parameter. You can use the current value for Iops . AllocatedStorage *int32 // Specifies whether major version upgrades are allowed. Changing this parameter @@ -347,6 +350,9 @@ type ModifyDBInstanceInput struct { // - The value supplied must be at least 10% greater than the current value. Values // that are not at least 10% greater than the existing value are rounded up so that // they are 10% greater than the current value. + // - When you increase the Provisioned IOPS, you must also specify the + // AllocatedStorage parameter. You can use the current value for AllocatedStorage + // . // Default: Uses existing setting Iops *int32 diff --git a/service/s3control/api_op_CreateAccessPoint.go b/service/s3control/api_op_CreateAccessPoint.go index 560f72ac93b..a1785317626 100644 --- a/service/s3control/api_op_CreateAccessPoint.go +++ b/service/s3control/api_op_CreateAccessPoint.go @@ -74,7 +74,10 @@ type CreateAccessPointInput struct { Name *string // The Amazon Web Services account ID associated with the S3 bucket associated - // with this access point. + // with this access point. For same account access point when your bucket and + // access point belong to the same account owner, the BucketAccountId is not + // required. For cross-account access point when your bucket and access point are + // not in the same account, the BucketAccountId is required. BucketAccountId *string // The PublicAccessBlock configuration that you want to apply to the access point. diff --git a/service/s3control/api_op_CreateJob.go b/service/s3control/api_op_CreateJob.go index 1e90bd9859e..1cefeb11b72 100644 --- a/service/s3control/api_op_CreateJob.go +++ b/service/s3control/api_op_CreateJob.go @@ -22,7 +22,7 @@ import ( // specify. For more information, see S3 Batch Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops.html) // in the Amazon S3 User Guide. Permissions For information about permissions // required to use the Batch Operations, see Granting permissions for S3 Batch -// Operations (https://docs.aws.amazon.com/AmazonS3/latest/dev/mpuAndPermissions.html) +// Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops-iam-role-policies.html) // in the Amazon S3 User Guide. Related actions include: // - DescribeJob (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_DescribeJob.html) // - ListJobs (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_ListJobs.html) diff --git a/service/s3control/api_op_CreateMultiRegionAccessPoint.go b/service/s3control/api_op_CreateMultiRegionAccessPoint.go index 355ce8febf7..b9e3e6903b1 100644 --- a/service/s3control/api_op_CreateMultiRegionAccessPoint.go +++ b/service/s3control/api_op_CreateMultiRegionAccessPoint.go @@ -21,8 +21,9 @@ import ( // about creating Multi-Region Access Points, see Creating Multi-Region Access // Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html) // in the Amazon S3 User Guide. This action will always be routed to the US West -// (Oregon) Region. For more information about the restrictions around managing -// Multi-Region Access Points, see Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// (Oregon) Region. For more information about the restrictions around working with +// Multi-Region Access Points, see Multi-Region Access Point restrictions and +// limitations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html) // in the Amazon S3 User Guide. This request is asynchronous, meaning that you // might receive a response before the command has completed. When this request // provides a response, it provides a token that you can use to monitor the status diff --git a/service/s3control/api_op_DeleteMultiRegionAccessPoint.go b/service/s3control/api_op_DeleteMultiRegionAccessPoint.go index 9204a717e4e..2116224ddc3 100644 --- a/service/s3control/api_op_DeleteMultiRegionAccessPoint.go +++ b/service/s3control/api_op_DeleteMultiRegionAccessPoint.go @@ -20,8 +20,8 @@ import ( // Access Point. This action does not delete the buckets associated with the // Multi-Region Access Point, only the Multi-Region Access Point itself. This // action will always be routed to the US West (Oregon) Region. For more -// information about the restrictions around managing Multi-Region Access Points, -// see Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// information about the restrictions around working with Multi-Region Access +// Points, see Multi-Region Access Point restrictions and limitations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html) // in the Amazon S3 User Guide. This request is asynchronous, meaning that you // might receive a response before the command has completed. When this request // provides a response, it provides a token that you can use to monitor the status diff --git a/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go b/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go index d43ebba6331..98b6a7fbd10 100644 --- a/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go +++ b/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go @@ -19,7 +19,7 @@ import ( // This operation is not supported by directory buckets. Retrieves the status of // an asynchronous request to manage a Multi-Region Access Point. For more // information about managing Multi-Region Access Points and how asynchronous -// requests work, see Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// requests work, see Using Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MrapOperations.html) // in the Amazon S3 User Guide. The following actions are related to // GetMultiRegionAccessPoint : // - CreateMultiRegionAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateMultiRegionAccessPoint.html) diff --git a/service/s3control/api_op_GetDataAccess.go b/service/s3control/api_op_GetDataAccess.go index 9bf0637cf6e..c3814b5a0b2 100644 --- a/service/s3control/api_op_GetDataAccess.go +++ b/service/s3control/api_op_GetDataAccess.go @@ -23,7 +23,7 @@ import ( // operation. Additional Permissions The IAM role that S3 Access Grants assumes // must have the following permissions specified in the trust policy when // registering the location: sts:AssumeRole , for directory users or groups -// sts:SetContext , and for IAM users or roles sts:SourceIdentity . +// sts:SetContext , and for IAM users or roles sts:SetSourceIdentity . func (c *Client) GetDataAccess(ctx context.Context, params *GetDataAccessInput, optFns ...func(*Options)) (*GetDataAccessOutput, error) { if params == nil { params = &GetDataAccessInput{} diff --git a/service/s3control/api_op_GetMultiRegionAccessPoint.go b/service/s3control/api_op_GetMultiRegionAccessPoint.go index d32ad9035a8..3538a562112 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPoint.go +++ b/service/s3control/api_op_GetMultiRegionAccessPoint.go @@ -19,8 +19,8 @@ import ( // This operation is not supported by directory buckets. Returns configuration // information about the specified Multi-Region Access Point. This action will // always be routed to the US West (Oregon) Region. For more information about the -// restrictions around managing Multi-Region Access Points, see Managing -// Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// restrictions around working with Multi-Region Access Points, see Multi-Region +// Access Point restrictions and limitations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html) // in the Amazon S3 User Guide. The following actions are related to // GetMultiRegionAccessPoint : // - CreateMultiRegionAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateMultiRegionAccessPoint.html) @@ -53,7 +53,8 @@ type GetMultiRegionAccessPointInput struct { // The name of the Multi-Region Access Point whose configuration information you // want to receive. The name of the Multi-Region Access Point is different from the // alias. For more information about the distinction between the name and the alias - // of an Multi-Region Access Point, see Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) + // of an Multi-Region Access Point, see Rules for naming Amazon S3 Multi-Region + // Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go b/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go index fd737d09a63..734b7720e70 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go @@ -19,8 +19,8 @@ import ( // This operation is not supported by directory buckets. Returns the access // control policy of the specified Multi-Region Access Point. This action will // always be routed to the US West (Oregon) Region. For more information about the -// restrictions around managing Multi-Region Access Points, see Managing -// Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// restrictions around working with Multi-Region Access Points, see Multi-Region +// Access Point restrictions and limitations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html) // in the Amazon S3 User Guide. The following actions are related to // GetMultiRegionAccessPointPolicy : // - GetMultiRegionAccessPointPolicyStatus (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetMultiRegionAccessPointPolicyStatus.html) @@ -50,8 +50,8 @@ type GetMultiRegionAccessPointPolicyInput struct { // Specifies the Multi-Region Access Point. The name of the Multi-Region Access // Point is different from the alias. For more information about the distinction - // between the name and the alias of an Multi-Region Access Point, see Managing - // Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) + // between the name and the alias of an Multi-Region Access Point, see Rules for + // naming Amazon S3 Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go b/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go index 0bde5e16249..acd77a1d87e 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go @@ -19,8 +19,8 @@ import ( // This operation is not supported by directory buckets. Indicates whether the // specified Multi-Region Access Point has an access control policy that allows // public access. This action will always be routed to the US West (Oregon) Region. -// For more information about the restrictions around managing Multi-Region Access -// Points, see Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// For more information about the restrictions around working with Multi-Region +// Access Points, see Multi-Region Access Point restrictions and limitations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html) // in the Amazon S3 User Guide. The following actions are related to // GetMultiRegionAccessPointPolicyStatus : // - GetMultiRegionAccessPointPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetMultiRegionAccessPointPolicy.html) @@ -50,8 +50,8 @@ type GetMultiRegionAccessPointPolicyStatusInput struct { // Specifies the Multi-Region Access Point. The name of the Multi-Region Access // Point is different from the alias. For more information about the distinction - // between the name and the alias of an Multi-Region Access Point, see Managing - // Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) + // between the name and the alias of an Multi-Region Access Point, see Rules for + // naming Amazon S3 Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) // in the Amazon S3 User Guide. // // This member is required. diff --git a/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go b/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go index 04c9d4649ab..d2664d8a99d 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go @@ -26,8 +26,6 @@ import ( // - ap-southeast-2 // - ap-northeast-1 // - eu-west-1 -// -// Your Amazon S3 bucket does not need to be in these five Regions. func (c *Client) GetMultiRegionAccessPointRoutes(ctx context.Context, params *GetMultiRegionAccessPointRoutesInput, optFns ...func(*Options)) (*GetMultiRegionAccessPointRoutesOutput, error) { if params == nil { params = &GetMultiRegionAccessPointRoutesInput{} diff --git a/service/s3control/api_op_ListJobs.go b/service/s3control/api_op_ListJobs.go index eb846b3084c..a023cc451dc 100644 --- a/service/s3control/api_op_ListJobs.go +++ b/service/s3control/api_op_ListJobs.go @@ -17,7 +17,7 @@ import ( ) // Lists current S3 Batch Operations jobs as well as the jobs that have ended -// within the last 30 days for the Amazon Web Services account making the request. +// within the last 90 days for the Amazon Web Services account making the request. // For more information, see S3 Batch Operations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/batch-ops.html) // in the Amazon S3 User Guide. Permissions To use the ListJobs operation, you // must have permission to perform the s3:ListJobs action. Related actions diff --git a/service/s3control/api_op_ListMultiRegionAccessPoints.go b/service/s3control/api_op_ListMultiRegionAccessPoints.go index 0cdf295360c..d644775265a 100644 --- a/service/s3control/api_op_ListMultiRegionAccessPoints.go +++ b/service/s3control/api_op_ListMultiRegionAccessPoints.go @@ -21,8 +21,9 @@ import ( // Services account. Each call can return up to 100 Multi-Region Access Points, the // maximum number of Multi-Region Access Points that can be associated with a // single account. This action will always be routed to the US West (Oregon) -// Region. For more information about the restrictions around managing Multi-Region -// Access Points, see Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// Region. For more information about the restrictions around working with +// Multi-Region Access Points, see Multi-Region Access Point restrictions and +// limitations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html) // in the Amazon S3 User Guide. The following actions are related to // ListMultiRegionAccessPoint : // - CreateMultiRegionAccessPoint (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateMultiRegionAccessPoint.html) diff --git a/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go b/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go index 7c58ce52ca0..e202beb4210 100644 --- a/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go +++ b/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go @@ -21,8 +21,8 @@ import ( // Access Point can have only one policy, so a request made to this action replaces // any existing policy that is associated with the specified Multi-Region Access // Point. This action will always be routed to the US West (Oregon) Region. For -// more information about the restrictions around managing Multi-Region Access -// Points, see Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ManagingMultiRegionAccessPoints.html) +// more information about the restrictions around working with Multi-Region Access +// Points, see Multi-Region Access Point restrictions and limitations (https://docs.aws.amazon.com/AmazonS3/latest/userguide/MultiRegionAccessPointRestrictions.html) // in the Amazon S3 User Guide. The following actions are related to // PutMultiRegionAccessPointPolicy : // - GetMultiRegionAccessPointPolicy (https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_GetMultiRegionAccessPointPolicy.html) diff --git a/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go b/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go index 0bc3d3d074c..f2df031c7ba 100644 --- a/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go +++ b/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go @@ -36,8 +36,6 @@ import ( // - ap-southeast-2 // - ap-northeast-1 // - eu-west-1 -// -// Your Amazon S3 bucket does not need to be in these five Regions. func (c *Client) SubmitMultiRegionAccessPointRoutes(ctx context.Context, params *SubmitMultiRegionAccessPointRoutesInput, optFns ...func(*Options)) (*SubmitMultiRegionAccessPointRoutesOutput, error) { if params == nil { params = &SubmitMultiRegionAccessPointRoutesInput{} diff --git a/service/s3control/types/types.go b/service/s3control/types/types.go index ad4acb384f4..2f0f1a7e685 100644 --- a/service/s3control/types/types.go +++ b/service/s3control/types/types.go @@ -944,8 +944,8 @@ type LambdaInvokeOperation struct { // invoking an Lambda function. Version 1.0 is the default. Version 2.0 is // required when you use Batch Operations to invoke Lambda functions that act on // directory buckets, or if you need to specify UserArguments . For more - // information, see Using Lambda with Amazon S3 Batch Operations and Amazon S3 - // Express One Zone (https://aws.amazon.com/blogs/storage/using-lambda-with-s3-batch-operations-and-s3-express-one-zone/) + // information, see Automate object processing in Amazon S3 directory buckets with + // S3 Batch Operations and Lambda (https://aws.amazon.com/blogs/storage/automate-object-processing-in-amazon-s3-directory-buckets-with-s3-batch-operations-and-aws-lambda/) // in the Amazon Web Services Storage Blog. Ensure that your Lambda function code // expects InvocationSchemaVersion 2.0 and uses bucket name rather than bucket // ARN. If the InvocationSchemaVersion does not match what your Lambda function @@ -957,7 +957,8 @@ type LambdaInvokeOperation struct { // Key-value pairs that are passed in the payload that Batch Operations sends when // invoking an Lambda function. You must specify InvocationSchemaVersion 2.0 for // LambdaInvoke operations that include UserArguments . For more information, see - // Using Lambda with Amazon S3 Batch Operations and Amazon S3 Express One Zone (https://aws.amazon.com/blogs/storage/using-lambda-with-s3-batch-operations-and-s3-express-one-zone/) + // Automate object processing in Amazon S3 directory buckets with S3 Batch + // Operations and Lambda (https://aws.amazon.com/blogs/storage/automate-object-processing-in-amazon-s3-directory-buckets-with-s3-batch-operations-and-aws-lambda/) // in the Amazon Web Services Storage Blog. UserArguments map[string]string @@ -1040,10 +1041,14 @@ type LifecycleRule struct { // The container for the Outposts bucket lifecycle rule and operator. type LifecycleRuleAndOperator struct { - // Minimum object size to which the rule applies. + // The non-inclusive minimum object size for the lifecycle rule. Setting this + // property to 7 means the rule applies to objects with a size that is greater than + // 7. ObjectSizeGreaterThan *int64 - // Maximum object size to which the rule applies. + // The non-inclusive maximum object size for the lifecycle rule. Setting this + // property to 77 means the rule applies to objects with a size that is less than + // 77. ObjectSizeLessThan *int64 // Prefix identifying one or more objects to which the rule applies. @@ -1317,7 +1322,7 @@ type MultiRegionAccessPointReport struct { // The alias for the Multi-Region Access Point. For more information about the // distinction between the name and the alias of an Multi-Region Access Point, see - // Managing Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) + // Rules for naming Amazon S3 Multi-Region Access Points (https://docs.aws.amazon.com/AmazonS3/latest/userguide/CreatingMultiRegionAccessPoints.html#multi-region-access-point-naming) // . Alias *string @@ -2032,8 +2037,8 @@ type S3CopyObjectOperation struct { // arn:aws:s3:::destinationBucket . // - Directory buckets - For example, to copy objects to a directory bucket // named destinationBucket in the Availability Zone; identified by the AZ ID - // usw2-az2 , set the TargetResource property to - // arn:aws:s3express:region:account_id:/bucket/destination_bucket_base_name--usw2-az2--x-s3 + // usw2-az1 , set the TargetResource property to + // arn:aws:s3express:region:account_id:/bucket/destination_bucket_base_name--usw2-az1--x-s3 // . TargetResource *string diff --git a/service/serverlessapplicationrepository/internal/endpoints/endpoints.go b/service/serverlessapplicationrepository/internal/endpoints/endpoints.go index 7e8e9efee85..832e7e4ef5a 100644 --- a/service/serverlessapplicationrepository/internal/endpoints/endpoints.go +++ b/service/serverlessapplicationrepository/internal/endpoints/endpoints.go @@ -214,21 +214,85 @@ var defaultPartitions = endpoints.Partitions{ }: endpoints.Endpoint{ Protocols: []string{"https"}, }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "serverlessrepo-fips.us-east-1.amazonaws.com", + Protocols: []string{"https"}, + }, + endpoints.EndpointKey{ + Region: "us-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "serverlessrepo-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{ Protocols: []string{"https"}, }, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "serverlessrepo-fips.us-east-2.amazonaws.com", + Protocols: []string{"https"}, + }, + endpoints.EndpointKey{ + Region: "us-east-2-fips", + }: endpoints.Endpoint{ + Hostname: "serverlessrepo-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{ Protocols: []string{"https"}, }, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "serverlessrepo-fips.us-west-1.amazonaws.com", + Protocols: []string{"https"}, + }, + endpoints.EndpointKey{ + Region: "us-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "serverlessrepo-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{ Protocols: []string{"https"}, }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "serverlessrepo-fips.us-west-2.amazonaws.com", + Protocols: []string{"https"}, + }, + endpoints.EndpointKey{ + Region: "us-west-2-fips", + }: endpoints.Endpoint{ + Hostname: "serverlessrepo-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, }, }, { diff --git a/service/verifiedpermissions/internal/endpoints/endpoints.go b/service/verifiedpermissions/internal/endpoints/endpoints.go index 485703c60f3..faf4d332cb4 100644 --- a/service/verifiedpermissions/internal/endpoints/endpoints.go +++ b/service/verifiedpermissions/internal/endpoints/endpoints.go @@ -181,6 +181,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "verifiedpermissions-fips.ca-central-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "verifiedpermissions-fips.ca-west-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -214,6 +223,15 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "fips-ca-west-1", + }: endpoints.Endpoint{ + Hostname: "verifiedpermissions-fips.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ @@ -250,6 +268,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, @@ -450,5 +471,43 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-gov-east-1", + }: endpoints.Endpoint{ + Hostname: "verifiedpermissions-fips.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-gov-west-1", + }: endpoints.Endpoint{ + Hostname: "verifiedpermissions-fips.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "verifiedpermissions-fips.us-gov-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "verifiedpermissions-fips.us-gov-west-1.amazonaws.com", + }, + }, }, }