repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns information about a specific Kinesis Data Analytics application. If you // want to retrieve a list of all applications in your account, use the // ListApplications operation. func (c *Client) DescribeApplication(ctx context.Context, params *DescribeApplicationInput, optFns ...func(*Options)) (*DescribeApplicationOutput, error) { if params == nil { params = &DescribeApplicationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeApplication", params, optFns, c.addOperationDescribeApplicationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeApplicationOutput) out.ResultMetadata = metadata return out, nil } type DescribeApplicationInput struct { // The name of the application. // // This member is required. ApplicationName *string // Displays verbose information about a Kinesis Data Analytics application, // including the application's job plan. IncludeAdditionalDetails *bool noSmithyDocumentSerde } type DescribeApplicationOutput struct { // Provides a description of the application, such as the application's Amazon // Resource Name (ARN), status, and latest version. // // This member is required. ApplicationDetail *types.ApplicationDetail // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeApplication{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeApplication{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplication(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "DescribeApplication", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns information about a snapshot of application state data. func (c *Client) DescribeApplicationSnapshot(ctx context.Context, params *DescribeApplicationSnapshotInput, optFns ...func(*Options)) (*DescribeApplicationSnapshotOutput, error) { if params == nil { params = &DescribeApplicationSnapshotInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeApplicationSnapshot", params, optFns, c.addOperationDescribeApplicationSnapshotMiddlewares) if err != nil { return nil, err } out := result.(*DescribeApplicationSnapshotOutput) out.ResultMetadata = metadata return out, nil } type DescribeApplicationSnapshotInput struct { // The name of an existing application. // // This member is required. ApplicationName *string // The identifier of an application snapshot. You can retrieve this value using . // // This member is required. SnapshotName *string noSmithyDocumentSerde } type DescribeApplicationSnapshotOutput struct { // An object containing information about the application snapshot. // // This member is required. SnapshotDetails *types.SnapshotDetails // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeApplicationSnapshotMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeApplicationSnapshot{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeApplicationSnapshot{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeApplicationSnapshotValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationSnapshot(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeApplicationSnapshot(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "DescribeApplicationSnapshot", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Provides a detailed description of a specified version of the application. To // see a list of all the versions of an application, invoke the // ListApplicationVersions operation. This operation is supported only for Amazon // Kinesis Data Analytics for Apache Flink. func (c *Client) DescribeApplicationVersion(ctx context.Context, params *DescribeApplicationVersionInput, optFns ...func(*Options)) (*DescribeApplicationVersionOutput, error) { if params == nil { params = &DescribeApplicationVersionInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeApplicationVersion", params, optFns, c.addOperationDescribeApplicationVersionMiddlewares) if err != nil { return nil, err } out := result.(*DescribeApplicationVersionOutput) out.ResultMetadata = metadata return out, nil } type DescribeApplicationVersionInput struct { // The name of the application for which you want to get the version description. // // This member is required. ApplicationName *string // The ID of the application version for which you want to get the description. // // This member is required. ApplicationVersionId *int64 noSmithyDocumentSerde } type DescribeApplicationVersionOutput struct { // Describes the application, including the application Amazon Resource Name // (ARN), status, latest version, and input and output configurations. ApplicationVersionDetail *types.ApplicationDetail // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeApplicationVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeApplicationVersion{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeApplicationVersion{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDescribeApplicationVersionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeApplicationVersion(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeApplicationVersion(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "DescribeApplicationVersion", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Infers a schema for a SQL-based Kinesis Data Analytics application by // evaluating sample records on the specified streaming source (Kinesis data stream // or Kinesis Data Firehose delivery stream) or Amazon S3 object. In the response, // the operation returns the inferred schema and also the sample records that the // operation used to infer the schema. You can use the inferred schema when // configuring a streaming source for your application. When you create an // application using the Kinesis Data Analytics console, the console uses this // operation to infer a schema and show it in the console user interface. func (c *Client) DiscoverInputSchema(ctx context.Context, params *DiscoverInputSchemaInput, optFns ...func(*Options)) (*DiscoverInputSchemaOutput, error) { if params == nil { params = &DiscoverInputSchemaInput{} } result, metadata, err := c.invokeOperation(ctx, "DiscoverInputSchema", params, optFns, c.addOperationDiscoverInputSchemaMiddlewares) if err != nil { return nil, err } out := result.(*DiscoverInputSchemaOutput) out.ResultMetadata = metadata return out, nil } type DiscoverInputSchemaInput struct { // The ARN of the role that is used to access the streaming source. // // This member is required. ServiceExecutionRole *string // The InputProcessingConfiguration to use to preprocess the records before // discovering the schema of the records. InputProcessingConfiguration *types.InputProcessingConfiguration // The point at which you want Kinesis Data Analytics to start reading records // from the specified streaming source discovery purposes. InputStartingPositionConfiguration *types.InputStartingPositionConfiguration // The Amazon Resource Name (ARN) of the streaming source. ResourceARN *string // Specify this parameter to discover a schema from data in an Amazon S3 object. S3Configuration *types.S3Configuration noSmithyDocumentSerde } type DiscoverInputSchemaOutput struct { // The schema inferred from the streaming source. It identifies the format of the // data in the streaming source and how each data element maps to corresponding // columns in the in-application stream that you can create. InputSchema *types.SourceSchema // An array of elements, where each element corresponds to a row in a stream // record (a stream record can have more than one row). ParsedInputRecords [][]string // The stream data that was modified by the processor specified in the // InputProcessingConfiguration parameter. ProcessedInputRecords []string // The raw stream data that was sampled to infer the schema. RawInputRecords []string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDiscoverInputSchemaMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpDiscoverInputSchema{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDiscoverInputSchema{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDiscoverInputSchemaValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDiscoverInputSchema(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDiscoverInputSchema(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "DiscoverInputSchema", } }
159
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of Kinesis Data Analytics applications in your account. For each // application, the response includes the application name, Amazon Resource Name // (ARN), and status. If you want detailed information about a specific // application, use DescribeApplication . func (c *Client) ListApplications(ctx context.Context, params *ListApplicationsInput, optFns ...func(*Options)) (*ListApplicationsOutput, error) { if params == nil { params = &ListApplicationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListApplications", params, optFns, c.addOperationListApplicationsMiddlewares) if err != nil { return nil, err } out := result.(*ListApplicationsOutput) out.ResultMetadata = metadata return out, nil } type ListApplicationsInput struct { // The maximum number of applications to list. Limit *int32 // If a previous command returned a pagination token, pass it into this value to // retrieve the next set of results. For more information about pagination, see // Using the Amazon Command Line Interface's Pagination Options (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html) // . NextToken *string noSmithyDocumentSerde } type ListApplicationsOutput struct { // A list of ApplicationSummary objects. // // This member is required. ApplicationSummaries []types.ApplicationSummary // The pagination token for the next set of results, or null if there are no // additional results. Pass this token into a subsequent command to retrieve the // next set of items For more information about pagination, see Using the Amazon // Command Line Interface's Pagination Options (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html) // . NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListApplicationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListApplications{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListApplications{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplications(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListApplications(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "ListApplications", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists information about the current application snapshots. func (c *Client) ListApplicationSnapshots(ctx context.Context, params *ListApplicationSnapshotsInput, optFns ...func(*Options)) (*ListApplicationSnapshotsOutput, error) { if params == nil { params = &ListApplicationSnapshotsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListApplicationSnapshots", params, optFns, c.addOperationListApplicationSnapshotsMiddlewares) if err != nil { return nil, err } out := result.(*ListApplicationSnapshotsOutput) out.ResultMetadata = metadata return out, nil } type ListApplicationSnapshotsInput struct { // The name of an existing application. // // This member is required. ApplicationName *string // The maximum number of application snapshots to list. Limit *int32 // Use this parameter if you receive a NextToken response in a previous request // that indicates that there is more output available. Set it to the value of the // previous call's NextToken response to indicate where the output should continue // from. NextToken *string noSmithyDocumentSerde } type ListApplicationSnapshotsOutput struct { // The token for the next set of results, or null if there are no additional // results. NextToken *string // A collection of objects containing information about the application snapshots. SnapshotSummaries []types.SnapshotDetails // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListApplicationSnapshotsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListApplicationSnapshots{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListApplicationSnapshots{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListApplicationSnapshotsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationSnapshots(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListApplicationSnapshots(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "ListApplicationSnapshots", } }
138
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Lists all the versions for the specified application, including versions that // were rolled back. The response also includes a summary of the configuration // associated with each version. To get the complete description of a specific // application version, invoke the DescribeApplicationVersion operation. This // operation is supported only for Amazon Kinesis Data Analytics for Apache Flink. func (c *Client) ListApplicationVersions(ctx context.Context, params *ListApplicationVersionsInput, optFns ...func(*Options)) (*ListApplicationVersionsOutput, error) { if params == nil { params = &ListApplicationVersionsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListApplicationVersions", params, optFns, c.addOperationListApplicationVersionsMiddlewares) if err != nil { return nil, err } out := result.(*ListApplicationVersionsOutput) out.ResultMetadata = metadata return out, nil } type ListApplicationVersionsInput struct { // The name of the application for which you want to list all versions. // // This member is required. ApplicationName *string // The maximum number of versions to list in this invocation of the operation. Limit *int32 // If a previous invocation of this operation returned a pagination token, pass it // into this value to retrieve the next set of results. For more information about // pagination, see Using the Amazon Command Line Interface's Pagination Options (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html) // . NextToken *string noSmithyDocumentSerde } type ListApplicationVersionsOutput struct { // A list of the application versions and the associated configuration summaries. // The list includes application versions that were rolled back. To get the // complete description of a specific application version, invoke the // DescribeApplicationVersion operation. ApplicationVersionSummaries []types.ApplicationVersionSummary // The pagination token for the next set of results, or null if there are no // additional results. To retrieve the next set of items, pass this token into a // subsequent invocation of this operation. For more information about pagination, // see Using the Amazon Command Line Interface's Pagination Options (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html) // . NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListApplicationVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListApplicationVersions{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListApplicationVersions{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListApplicationVersionsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListApplicationVersions(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListApplicationVersions(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "ListApplicationVersions", } }
148
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves the list of key-value tags assigned to the application. For more // information, see Using Tagging (https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html) // . func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The ARN of the application for which to retrieve tags. // // This member is required. ResourceARN *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // The key-value tags assigned to the application. Tags []types.Tag // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "ListTagsForResource", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Reverts the application to the previous running version. You can roll back an // application if you suspect it is stuck in a transient status. You can roll back // an application only if it is in the UPDATING or AUTOSCALING status. When you // rollback an application, it loads state data from the last successful snapshot. // If the application has no snapshots, Kinesis Data Analytics rejects the rollback // request. This action is not supported for Kinesis Data Analytics for SQL // applications. func (c *Client) RollbackApplication(ctx context.Context, params *RollbackApplicationInput, optFns ...func(*Options)) (*RollbackApplicationOutput, error) { if params == nil { params = &RollbackApplicationInput{} } result, metadata, err := c.invokeOperation(ctx, "RollbackApplication", params, optFns, c.addOperationRollbackApplicationMiddlewares) if err != nil { return nil, err } out := result.(*RollbackApplicationOutput) out.ResultMetadata = metadata return out, nil } type RollbackApplicationInput struct { // The name of the application. // // This member is required. ApplicationName *string // The current application version ID. You can retrieve the application version ID // using DescribeApplication . // // This member is required. CurrentApplicationVersionId *int64 noSmithyDocumentSerde } type RollbackApplicationOutput struct { // Describes the application, including the application Amazon Resource Name // (ARN), status, latest version, and input and output configurations. // // This member is required. ApplicationDetail *types.ApplicationDetail // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationRollbackApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpRollbackApplication{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRollbackApplication{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpRollbackApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRollbackApplication(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opRollbackApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "RollbackApplication", } }
140
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Starts the specified Kinesis Data Analytics application. After creating an // application, you must exclusively call this operation to start your application. func (c *Client) StartApplication(ctx context.Context, params *StartApplicationInput, optFns ...func(*Options)) (*StartApplicationOutput, error) { if params == nil { params = &StartApplicationInput{} } result, metadata, err := c.invokeOperation(ctx, "StartApplication", params, optFns, c.addOperationStartApplicationMiddlewares) if err != nil { return nil, err } out := result.(*StartApplicationOutput) out.ResultMetadata = metadata return out, nil } type StartApplicationInput struct { // The name of the application. // // This member is required. ApplicationName *string // Identifies the run configuration (start parameters) of a Kinesis Data Analytics // application. RunConfiguration *types.RunConfiguration noSmithyDocumentSerde } type StartApplicationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStartApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpStartApplication{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStartApplication{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpStartApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartApplication(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opStartApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "StartApplication", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Stops the application from processing data. You can stop an application only if // it is in the running status, unless you set the Force parameter to true . You // can use the DescribeApplication operation to find the application status. // Kinesis Data Analytics takes a snapshot when the application is stopped, unless // Force is set to true . func (c *Client) StopApplication(ctx context.Context, params *StopApplicationInput, optFns ...func(*Options)) (*StopApplicationOutput, error) { if params == nil { params = &StopApplicationInput{} } result, metadata, err := c.invokeOperation(ctx, "StopApplication", params, optFns, c.addOperationStopApplicationMiddlewares) if err != nil { return nil, err } out := result.(*StopApplicationOutput) out.ResultMetadata = metadata return out, nil } type StopApplicationInput struct { // The name of the running application to stop. // // This member is required. ApplicationName *string // Set to true to force the application to stop. If you set Force to true , Kinesis // Data Analytics stops the application without taking a snapshot. Force-stopping // your application may lead to data loss or duplication. To prevent data loss or // duplicate processing of data during application restarts, we recommend you to // take frequent snapshots of your application. You can only force stop a // Flink-based Kinesis Data Analytics application. You can't force stop a SQL-based // Kinesis Data Analytics application. The application must be in the STARTING , // UPDATING , STOPPING , AUTOSCALING , or RUNNING status. Force *bool noSmithyDocumentSerde } type StopApplicationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStopApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopApplication{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopApplication{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpStopApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopApplication(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opStopApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "StopApplication", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds one or more key-value tags to a Kinesis Data Analytics application. Note // that the maximum number of application tags includes system tags. The maximum // number of user-defined application tags is 50. For more information, see Using // Tagging (https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html) // . func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The ARN of the application to assign the tags. // // This member is required. ResourceARN *string // The key-value tags to assign to the application. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "TagResource", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes one or more tags from a Kinesis Data Analytics application. For more // information, see Using Tagging (https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html) // . func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The ARN of the Kinesis Data Analytics application from which to remove the tags. // // This member is required. ResourceARN *string // A list of keys of tags to remove from the specified application. // // This member is required. TagKeys []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "UntagResource", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates an existing Kinesis Data Analytics application. Using this operation, // you can update application code, input configuration, and output configuration. // Kinesis Data Analytics updates the ApplicationVersionId each time you update // your application. You cannot update the RuntimeEnvironment of an existing // application. If you need to update an application's RuntimeEnvironment , you // must delete the application and create it again. func (c *Client) UpdateApplication(ctx context.Context, params *UpdateApplicationInput, optFns ...func(*Options)) (*UpdateApplicationOutput, error) { if params == nil { params = &UpdateApplicationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateApplication", params, optFns, c.addOperationUpdateApplicationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateApplicationOutput) out.ResultMetadata = metadata return out, nil } type UpdateApplicationInput struct { // The name of the application to update. // // This member is required. ApplicationName *string // Describes application configuration updates. ApplicationConfigurationUpdate *types.ApplicationConfigurationUpdate // Describes application Amazon CloudWatch logging option updates. You can only // update existing CloudWatch logging options with this action. To add a new // CloudWatch logging option, use AddApplicationCloudWatchLoggingOption . CloudWatchLoggingOptionUpdates []types.CloudWatchLoggingOptionUpdate // A value you use to implement strong concurrency for application updates. You // must provide the CurrentApplicationVersionId or the ConditionalToken . You get // the application's current ConditionalToken using DescribeApplication . For // better concurrency support, use the ConditionalToken parameter instead of // CurrentApplicationVersionId . ConditionalToken *string // The current application version ID. You must provide the // CurrentApplicationVersionId or the ConditionalToken .You can retrieve the // application version ID using DescribeApplication . For better concurrency // support, use the ConditionalToken parameter instead of // CurrentApplicationVersionId . CurrentApplicationVersionId *int64 // Describes updates to the application's starting parameters. RunConfigurationUpdate *types.RunConfigurationUpdate // Describes updates to the service execution role. ServiceExecutionRoleUpdate *string noSmithyDocumentSerde } type UpdateApplicationOutput struct { // Describes application updates. // // This member is required. ApplicationDetail *types.ApplicationDetail // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateApplication{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateApplication{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateApplicationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApplication(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateApplication(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "UpdateApplication", } }
160
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the maintenance configuration of the Kinesis Data Analytics // application. You can invoke this operation on an application that is in one of // the two following states: READY or RUNNING . If you invoke it when the // application is in a state other than these two states, it throws a // ResourceInUseException . The service makes use of the updated configuration the // next time it schedules maintenance for the application. If you invoke this // operation after the service schedules maintenance, the service will apply the // configuration update the next time it schedules maintenance for the application. // This means that you might not see the maintenance configuration update applied // to the maintenance process that follows a successful invocation of this // operation, but to the following maintenance process instead. To see the current // maintenance configuration of your application, invoke the DescribeApplication // operation. For information about application maintenance, see Kinesis Data // Analytics for Apache Flink Maintenance (https://docs.aws.amazon.com/kinesisanalytics/latest/java/maintenance.html) // . This operation is supported only for Amazon Kinesis Data Analytics for Apache // Flink. func (c *Client) UpdateApplicationMaintenanceConfiguration(ctx context.Context, params *UpdateApplicationMaintenanceConfigurationInput, optFns ...func(*Options)) (*UpdateApplicationMaintenanceConfigurationOutput, error) { if params == nil { params = &UpdateApplicationMaintenanceConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateApplicationMaintenanceConfiguration", params, optFns, c.addOperationUpdateApplicationMaintenanceConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateApplicationMaintenanceConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateApplicationMaintenanceConfigurationInput struct { // Describes the application maintenance configuration update. // // This member is required. ApplicationMaintenanceConfigurationUpdate *types.ApplicationMaintenanceConfigurationUpdate // The name of the application for which you want to update the maintenance // configuration. // // This member is required. ApplicationName *string noSmithyDocumentSerde } type UpdateApplicationMaintenanceConfigurationOutput struct { // The Amazon Resource Name (ARN) of the application. ApplicationARN *string // The application maintenance configuration description after the update. ApplicationMaintenanceConfigurationDescription *types.ApplicationMaintenanceConfigurationDescription // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateApplicationMaintenanceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateApplicationMaintenanceConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateApplicationMaintenanceConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateApplicationMaintenanceConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateApplicationMaintenanceConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateApplicationMaintenanceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisanalytics", OperationName: "UpdateApplicationMaintenanceConfiguration", } }
149
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsAwsjson11_deserializeOpAddApplicationCloudWatchLoggingOption struct { } func (*awsAwsjson11_deserializeOpAddApplicationCloudWatchLoggingOption) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddApplicationCloudWatchLoggingOption) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddApplicationCloudWatchLoggingOption(response, &metadata) } output := &AddApplicationCloudWatchLoggingOptionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddApplicationCloudWatchLoggingOptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddApplicationCloudWatchLoggingOption(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAddApplicationInput struct { } func (*awsAwsjson11_deserializeOpAddApplicationInput) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddApplicationInput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddApplicationInput(response, &metadata) } output := &AddApplicationInputOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddApplicationInputOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddApplicationInput(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("CodeValidationException", errorCode): return awsAwsjson11_deserializeErrorCodeValidationException(response, errorBody) case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAddApplicationInputProcessingConfiguration struct { } func (*awsAwsjson11_deserializeOpAddApplicationInputProcessingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddApplicationInputProcessingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddApplicationInputProcessingConfiguration(response, &metadata) } output := &AddApplicationInputProcessingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddApplicationInputProcessingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddApplicationInputProcessingConfiguration(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAddApplicationOutput struct { } func (*awsAwsjson11_deserializeOpAddApplicationOutput) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddApplicationOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddApplicationOutput(response, &metadata) } output := &AddApplicationOutputOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddApplicationOutputOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddApplicationOutput(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAddApplicationReferenceDataSource struct { } func (*awsAwsjson11_deserializeOpAddApplicationReferenceDataSource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddApplicationReferenceDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddApplicationReferenceDataSource(response, &metadata) } output := &AddApplicationReferenceDataSourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddApplicationReferenceDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddApplicationReferenceDataSource(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpAddApplicationVpcConfiguration struct { } func (*awsAwsjson11_deserializeOpAddApplicationVpcConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpAddApplicationVpcConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorAddApplicationVpcConfiguration(response, &metadata) } output := &AddApplicationVpcConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentAddApplicationVpcConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorAddApplicationVpcConfiguration(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateApplication struct { } func (*awsAwsjson11_deserializeOpCreateApplication) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateApplication(response, &metadata) } output := &CreateApplicationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateApplication(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("CodeValidationException", errorCode): return awsAwsjson11_deserializeErrorCodeValidationException(response, errorBody) case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateApplicationPresignedUrl struct { } func (*awsAwsjson11_deserializeOpCreateApplicationPresignedUrl) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateApplicationPresignedUrl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateApplicationPresignedUrl(response, &metadata) } output := &CreateApplicationPresignedUrlOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateApplicationPresignedUrlOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateApplicationPresignedUrl(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("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpCreateApplicationSnapshot struct { } func (*awsAwsjson11_deserializeOpCreateApplicationSnapshot) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpCreateApplicationSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorCreateApplicationSnapshot(response, &metadata) } output := &CreateApplicationSnapshotOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentCreateApplicationSnapshotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorCreateApplicationSnapshot(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("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteApplication struct { } func (*awsAwsjson11_deserializeOpDeleteApplication) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteApplication(response, &metadata) } output := &DeleteApplicationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteApplication(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteApplicationCloudWatchLoggingOption struct { } func (*awsAwsjson11_deserializeOpDeleteApplicationCloudWatchLoggingOption) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteApplicationCloudWatchLoggingOption) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteApplicationCloudWatchLoggingOption(response, &metadata) } output := &DeleteApplicationCloudWatchLoggingOptionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteApplicationCloudWatchLoggingOptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteApplicationCloudWatchLoggingOption(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteApplicationInputProcessingConfiguration struct { } func (*awsAwsjson11_deserializeOpDeleteApplicationInputProcessingConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteApplicationInputProcessingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteApplicationInputProcessingConfiguration(response, &metadata) } output := &DeleteApplicationInputProcessingConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteApplicationInputProcessingConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteApplicationInputProcessingConfiguration(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteApplicationOutput struct { } func (*awsAwsjson11_deserializeOpDeleteApplicationOutput) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteApplicationOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteApplicationOutput(response, &metadata) } output := &DeleteApplicationOutputOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteApplicationOutputOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteApplicationOutput(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteApplicationReferenceDataSource struct { } func (*awsAwsjson11_deserializeOpDeleteApplicationReferenceDataSource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteApplicationReferenceDataSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteApplicationReferenceDataSource(response, &metadata) } output := &DeleteApplicationReferenceDataSourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteApplicationReferenceDataSourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteApplicationReferenceDataSource(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteApplicationSnapshot struct { } func (*awsAwsjson11_deserializeOpDeleteApplicationSnapshot) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteApplicationSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteApplicationSnapshot(response, &metadata) } output := &DeleteApplicationSnapshotOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteApplicationSnapshotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteApplicationSnapshot(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDeleteApplicationVpcConfiguration struct { } func (*awsAwsjson11_deserializeOpDeleteApplicationVpcConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDeleteApplicationVpcConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDeleteApplicationVpcConfiguration(response, &metadata) } output := &DeleteApplicationVpcConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDeleteApplicationVpcConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDeleteApplicationVpcConfiguration(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeApplication struct { } func (*awsAwsjson11_deserializeOpDescribeApplication) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeApplication(response, &metadata) } output := &DescribeApplicationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeApplication(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("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeApplicationSnapshot struct { } func (*awsAwsjson11_deserializeOpDescribeApplicationSnapshot) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeApplicationSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeApplicationSnapshot(response, &metadata) } output := &DescribeApplicationSnapshotOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeApplicationSnapshotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeApplicationSnapshot(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("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDescribeApplicationVersion struct { } func (*awsAwsjson11_deserializeOpDescribeApplicationVersion) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDescribeApplicationVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDescribeApplicationVersion(response, &metadata) } output := &DescribeApplicationVersionOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDescribeApplicationVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDescribeApplicationVersion(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("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpDiscoverInputSchema struct { } func (*awsAwsjson11_deserializeOpDiscoverInputSchema) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpDiscoverInputSchema) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorDiscoverInputSchema(response, &metadata) } output := &DiscoverInputSchemaOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentDiscoverInputSchemaOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorDiscoverInputSchema(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("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceProvisionedThroughputExceededException", errorCode): return awsAwsjson11_deserializeErrorResourceProvisionedThroughputExceededException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) case strings.EqualFold("UnableToDetectSchemaException", errorCode): return awsAwsjson11_deserializeErrorUnableToDetectSchemaException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListApplications struct { } func (*awsAwsjson11_deserializeOpListApplications) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListApplications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListApplications(response, &metadata) } output := &ListApplicationsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListApplicationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListApplications(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("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListApplicationSnapshots struct { } func (*awsAwsjson11_deserializeOpListApplicationSnapshots) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListApplicationSnapshots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListApplicationSnapshots(response, &metadata) } output := &ListApplicationSnapshotsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListApplicationSnapshotsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListApplicationSnapshots(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("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListApplicationVersions struct { } func (*awsAwsjson11_deserializeOpListApplicationVersions) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListApplicationVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListApplicationVersions(response, &metadata) } output := &ListApplicationVersionsOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListApplicationVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListApplicationVersions(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("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpListTagsForResource struct { } func (*awsAwsjson11_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpRollbackApplication struct { } func (*awsAwsjson11_deserializeOpRollbackApplication) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpRollbackApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorRollbackApplication(response, &metadata) } output := &RollbackApplicationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentRollbackApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorRollbackApplication(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpStartApplication struct { } func (*awsAwsjson11_deserializeOpStartApplication) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpStartApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorStartApplication(response, &metadata) } output := &StartApplicationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentStartApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorStartApplication(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("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpStopApplication struct { } func (*awsAwsjson11_deserializeOpStopApplication) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpStopApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorStopApplication(response, &metadata) } output := &StopApplicationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentStopApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorStopApplication(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpTagResource struct { } func (*awsAwsjson11_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUntagResource struct { } func (*awsAwsjson11_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TooManyTagsException", errorCode): return awsAwsjson11_deserializeErrorTooManyTagsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateApplication struct { } func (*awsAwsjson11_deserializeOpUpdateApplication) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateApplication(response, &metadata) } output := &UpdateApplicationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateApplication(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("CodeValidationException", errorCode): return awsAwsjson11_deserializeErrorCodeValidationException(response, errorBody) case strings.EqualFold("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidApplicationConfigurationException", errorCode): return awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidRequestException", errorCode): return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) case strings.EqualFold("LimitExceededException", errorCode): return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsAwsjson11_deserializeOpUpdateApplicationMaintenanceConfiguration struct { } func (*awsAwsjson11_deserializeOpUpdateApplicationMaintenanceConfiguration) ID() string { return "OperationDeserializer" } func (m *awsAwsjson11_deserializeOpUpdateApplicationMaintenanceConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { return out, metadata, err } response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsAwsjson11_deserializeOpErrorUpdateApplicationMaintenanceConfiguration(response, &metadata) } output := &UpdateApplicationMaintenanceConfigurationOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsAwsjson11_deserializeOpDocumentUpdateApplicationMaintenanceConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } return out, metadata, err } func awsAwsjson11_deserializeOpErrorUpdateApplicationMaintenanceConfiguration(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("ConcurrentModificationException", errorCode): return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsAwsjson11_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsAwsjson11_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedOperationException", errorCode): return awsAwsjson11_deserializeErrorUnsupportedOperationException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsAwsjson11_deserializeErrorCodeValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.CodeValidationException{} err := awsAwsjson11_deserializeDocumentCodeValidationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorConcurrentModificationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ConcurrentModificationException{} err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidApplicationConfigurationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidApplicationConfigurationException{} err := awsAwsjson11_deserializeDocumentInvalidApplicationConfigurationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidArgumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidArgumentException{} err := awsAwsjson11_deserializeDocumentInvalidArgumentException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.InvalidRequestException{} err := awsAwsjson11_deserializeDocumentInvalidRequestException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.LimitExceededException{} err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ResourceInUseException{} err := awsAwsjson11_deserializeDocumentResourceInUseException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ResourceNotFoundException{} err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorResourceProvisionedThroughputExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ResourceProvisionedThroughputExceededException{} err := awsAwsjson11_deserializeDocumentResourceProvisionedThroughputExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.ServiceUnavailableException{} err := awsAwsjson11_deserializeDocumentServiceUnavailableException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorTooManyTagsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.TooManyTagsException{} err := awsAwsjson11_deserializeDocumentTooManyTagsException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorUnableToDetectSchemaException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.UnableToDetectSchemaException{} err := awsAwsjson11_deserializeDocumentUnableToDetectSchemaException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeErrorUnsupportedOperationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } output := &types.UnsupportedOperationException{} err := awsAwsjson11_deserializeDocumentUnsupportedOperationException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsAwsjson11_deserializeDocumentApplicationCodeConfigurationDescription(v **types.ApplicationCodeConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationCodeConfigurationDescription if *v == nil { sv = &types.ApplicationCodeConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "CodeContentDescription": if err := awsAwsjson11_deserializeDocumentCodeContentDescription(&sv.CodeContentDescription, value); err != nil { return err } case "CodeContentType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CodeContentType to be of type string, got %T instead", value) } sv.CodeContentType = types.CodeContentType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentApplicationConfigurationDescription(v **types.ApplicationConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationConfigurationDescription if *v == nil { sv = &types.ApplicationConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationCodeConfigurationDescription": if err := awsAwsjson11_deserializeDocumentApplicationCodeConfigurationDescription(&sv.ApplicationCodeConfigurationDescription, value); err != nil { return err } case "ApplicationSnapshotConfigurationDescription": if err := awsAwsjson11_deserializeDocumentApplicationSnapshotConfigurationDescription(&sv.ApplicationSnapshotConfigurationDescription, value); err != nil { return err } case "EnvironmentPropertyDescriptions": if err := awsAwsjson11_deserializeDocumentEnvironmentPropertyDescriptions(&sv.EnvironmentPropertyDescriptions, value); err != nil { return err } case "FlinkApplicationConfigurationDescription": if err := awsAwsjson11_deserializeDocumentFlinkApplicationConfigurationDescription(&sv.FlinkApplicationConfigurationDescription, value); err != nil { return err } case "RunConfigurationDescription": if err := awsAwsjson11_deserializeDocumentRunConfigurationDescription(&sv.RunConfigurationDescription, value); err != nil { return err } case "SqlApplicationConfigurationDescription": if err := awsAwsjson11_deserializeDocumentSqlApplicationConfigurationDescription(&sv.SqlApplicationConfigurationDescription, value); err != nil { return err } case "VpcConfigurationDescriptions": if err := awsAwsjson11_deserializeDocumentVpcConfigurationDescriptions(&sv.VpcConfigurationDescriptions, value); err != nil { return err } case "ZeppelinApplicationConfigurationDescription": if err := awsAwsjson11_deserializeDocumentZeppelinApplicationConfigurationDescription(&sv.ZeppelinApplicationConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentApplicationDetail(v **types.ApplicationDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationDetail if *v == nil { sv = &types.ApplicationDetail{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationConfigurationDescription": if err := awsAwsjson11_deserializeDocumentApplicationConfigurationDescription(&sv.ApplicationConfigurationDescription, value); err != nil { return err } case "ApplicationDescription": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationDescription to be of type string, got %T instead", value) } sv.ApplicationDescription = ptr.String(jtv) } case "ApplicationMaintenanceConfigurationDescription": if err := awsAwsjson11_deserializeDocumentApplicationMaintenanceConfigurationDescription(&sv.ApplicationMaintenanceConfigurationDescription, value); err != nil { return err } case "ApplicationMode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationMode to be of type string, got %T instead", value) } sv.ApplicationMode = types.ApplicationMode(jtv) } case "ApplicationName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) } sv.ApplicationName = ptr.String(jtv) } case "ApplicationStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) } sv.ApplicationStatus = types.ApplicationStatus(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "ApplicationVersionRolledBackFrom": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionRolledBackFrom = ptr.Int64(i64) } case "ApplicationVersionRolledBackTo": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionRolledBackTo = ptr.Int64(i64) } case "ApplicationVersionUpdatedFrom": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionUpdatedFrom = ptr.Int64(i64) } case "CloudWatchLoggingOptionDescriptions": if err := awsAwsjson11_deserializeDocumentCloudWatchLoggingOptionDescriptions(&sv.CloudWatchLoggingOptionDescriptions, value); err != nil { return err } case "ConditionalToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConditionalToken to be of type string, got %T instead", value) } sv.ConditionalToken = ptr.String(jtv) } case "CreateTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "LastUpdateTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdateTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "RuntimeEnvironment": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RuntimeEnvironment to be of type string, got %T instead", value) } sv.RuntimeEnvironment = types.RuntimeEnvironment(jtv) } case "ServiceExecutionRole": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.ServiceExecutionRole = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentApplicationMaintenanceConfigurationDescription(v **types.ApplicationMaintenanceConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationMaintenanceConfigurationDescription if *v == nil { sv = &types.ApplicationMaintenanceConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationMaintenanceWindowEndTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationMaintenanceWindowEndTime to be of type string, got %T instead", value) } sv.ApplicationMaintenanceWindowEndTime = ptr.String(jtv) } case "ApplicationMaintenanceWindowStartTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationMaintenanceWindowStartTime to be of type string, got %T instead", value) } sv.ApplicationMaintenanceWindowStartTime = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentApplicationRestoreConfiguration(v **types.ApplicationRestoreConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationRestoreConfiguration if *v == nil { sv = &types.ApplicationRestoreConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationRestoreType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationRestoreType to be of type string, got %T instead", value) } sv.ApplicationRestoreType = types.ApplicationRestoreType(jtv) } case "SnapshotName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SnapshotName to be of type string, got %T instead", value) } sv.SnapshotName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentApplicationSnapshotConfigurationDescription(v **types.ApplicationSnapshotConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationSnapshotConfigurationDescription if *v == nil { sv = &types.ApplicationSnapshotConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "SnapshotsEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.SnapshotsEnabled = ptr.Bool(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentApplicationSummaries(v *[]types.ApplicationSummary, 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.ApplicationSummary if *v == nil { cv = []types.ApplicationSummary{} } else { cv = *v } for _, value := range shape { var col types.ApplicationSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentApplicationSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentApplicationSummary(v **types.ApplicationSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationSummary if *v == nil { sv = &types.ApplicationSummary{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationMode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationMode to be of type string, got %T instead", value) } sv.ApplicationMode = types.ApplicationMode(jtv) } case "ApplicationName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) } sv.ApplicationName = ptr.String(jtv) } case "ApplicationStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) } sv.ApplicationStatus = types.ApplicationStatus(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "RuntimeEnvironment": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RuntimeEnvironment to be of type string, got %T instead", value) } sv.RuntimeEnvironment = types.RuntimeEnvironment(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentApplicationVersionSummaries(v *[]types.ApplicationVersionSummary, 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.ApplicationVersionSummary if *v == nil { cv = []types.ApplicationVersionSummary{} } else { cv = *v } for _, value := range shape { var col types.ApplicationVersionSummary destAddr := &col if err := awsAwsjson11_deserializeDocumentApplicationVersionSummary(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentApplicationVersionSummary(v **types.ApplicationVersionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ApplicationVersionSummary if *v == nil { sv = &types.ApplicationVersionSummary{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationStatus to be of type string, got %T instead", value) } sv.ApplicationStatus = types.ApplicationStatus(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCatalogConfigurationDescription(v **types.CatalogConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.CatalogConfigurationDescription if *v == nil { sv = &types.CatalogConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "GlueDataCatalogConfigurationDescription": if err := awsAwsjson11_deserializeDocumentGlueDataCatalogConfigurationDescription(&sv.GlueDataCatalogConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCheckpointConfigurationDescription(v **types.CheckpointConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.CheckpointConfigurationDescription if *v == nil { sv = &types.CheckpointConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "CheckpointingEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.CheckpointingEnabled = ptr.Bool(jtv) } case "CheckpointInterval": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected CheckpointInterval to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.CheckpointInterval = ptr.Int64(i64) } case "ConfigurationType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConfigurationType to be of type string, got %T instead", value) } sv.ConfigurationType = types.ConfigurationType(jtv) } case "MinPauseBetweenCheckpoints": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MinPauseBetweenCheckpoints to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MinPauseBetweenCheckpoints = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCloudWatchLoggingOptionDescription(v **types.CloudWatchLoggingOptionDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.CloudWatchLoggingOptionDescription if *v == nil { sv = &types.CloudWatchLoggingOptionDescription{} } else { sv = *v } for key, value := range shape { switch key { case "CloudWatchLoggingOptionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Id to be of type string, got %T instead", value) } sv.CloudWatchLoggingOptionId = ptr.String(jtv) } case "LogStreamARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected LogStreamARN to be of type string, got %T instead", value) } sv.LogStreamARN = ptr.String(jtv) } case "RoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.RoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCloudWatchLoggingOptionDescriptions(v *[]types.CloudWatchLoggingOptionDescription, 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.CloudWatchLoggingOptionDescription if *v == nil { cv = []types.CloudWatchLoggingOptionDescription{} } else { cv = *v } for _, value := range shape { var col types.CloudWatchLoggingOptionDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentCloudWatchLoggingOptionDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentCodeContentDescription(v **types.CodeContentDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.CodeContentDescription if *v == nil { sv = &types.CodeContentDescription{} } else { sv = *v } for key, value := range shape { switch key { case "CodeMD5": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected CodeMD5 to be of type string, got %T instead", value) } sv.CodeMD5 = ptr.String(jtv) } case "CodeSize": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected CodeSize to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.CodeSize = ptr.Int64(i64) } case "S3ApplicationCodeLocationDescription": if err := awsAwsjson11_deserializeDocumentS3ApplicationCodeLocationDescription(&sv.S3ApplicationCodeLocationDescription, value); err != nil { return err } case "TextContent": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TextContent to be of type string, got %T instead", value) } sv.TextContent = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCodeValidationException(v **types.CodeValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.CodeValidationException if *v == nil { sv = &types.CodeValidationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ConcurrentModificationException if *v == nil { sv = &types.ConcurrentModificationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCSVMappingParameters(v **types.CSVMappingParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.CSVMappingParameters if *v == nil { sv = &types.CSVMappingParameters{} } else { sv = *v } for key, value := range shape { switch key { case "RecordColumnDelimiter": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordColumnDelimiter to be of type string, got %T instead", value) } sv.RecordColumnDelimiter = ptr.String(jtv) } case "RecordRowDelimiter": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordRowDelimiter to be of type string, got %T instead", value) } sv.RecordRowDelimiter = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomArtifactConfigurationDescription(v **types.CustomArtifactConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.CustomArtifactConfigurationDescription if *v == nil { sv = &types.CustomArtifactConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ArtifactType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ArtifactType to be of type string, got %T instead", value) } sv.ArtifactType = types.ArtifactType(jtv) } case "MavenReferenceDescription": if err := awsAwsjson11_deserializeDocumentMavenReference(&sv.MavenReferenceDescription, value); err != nil { return err } case "S3ContentLocationDescription": if err := awsAwsjson11_deserializeDocumentS3ContentLocation(&sv.S3ContentLocationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentCustomArtifactsConfigurationDescriptionList(v *[]types.CustomArtifactConfigurationDescription, 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.CustomArtifactConfigurationDescription if *v == nil { cv = []types.CustomArtifactConfigurationDescription{} } else { cv = *v } for _, value := range shape { var col types.CustomArtifactConfigurationDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentCustomArtifactConfigurationDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentDeployAsApplicationConfigurationDescription(v **types.DeployAsApplicationConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.DeployAsApplicationConfigurationDescription if *v == nil { sv = &types.DeployAsApplicationConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "S3ContentLocationDescription": if err := awsAwsjson11_deserializeDocumentS3ContentBaseLocationDescription(&sv.S3ContentLocationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentDestinationSchema(v **types.DestinationSchema, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.DestinationSchema if *v == nil { sv = &types.DestinationSchema{} } else { sv = *v } for key, value := range shape { switch key { case "RecordFormatType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordFormatType to be of type string, got %T instead", value) } sv.RecordFormatType = types.RecordFormatType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentEnvironmentPropertyDescriptions(v **types.EnvironmentPropertyDescriptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.EnvironmentPropertyDescriptions if *v == nil { sv = &types.EnvironmentPropertyDescriptions{} } else { sv = *v } for key, value := range shape { switch key { case "PropertyGroupDescriptions": if err := awsAwsjson11_deserializeDocumentPropertyGroups(&sv.PropertyGroupDescriptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentFlinkApplicationConfigurationDescription(v **types.FlinkApplicationConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.FlinkApplicationConfigurationDescription if *v == nil { sv = &types.FlinkApplicationConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "CheckpointConfigurationDescription": if err := awsAwsjson11_deserializeDocumentCheckpointConfigurationDescription(&sv.CheckpointConfigurationDescription, value); err != nil { return err } case "JobPlanDescription": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobPlanDescription to be of type string, got %T instead", value) } sv.JobPlanDescription = ptr.String(jtv) } case "MonitoringConfigurationDescription": if err := awsAwsjson11_deserializeDocumentMonitoringConfigurationDescription(&sv.MonitoringConfigurationDescription, value); err != nil { return err } case "ParallelismConfigurationDescription": if err := awsAwsjson11_deserializeDocumentParallelismConfigurationDescription(&sv.ParallelismConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentFlinkRunConfiguration(v **types.FlinkRunConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.FlinkRunConfiguration if *v == nil { sv = &types.FlinkRunConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "AllowNonRestoredState": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.AllowNonRestoredState = ptr.Bool(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentGlueDataCatalogConfigurationDescription(v **types.GlueDataCatalogConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.GlueDataCatalogConfigurationDescription if *v == nil { sv = &types.GlueDataCatalogConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "DatabaseARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DatabaseARN to be of type string, got %T instead", value) } sv.DatabaseARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInAppStreamNames(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 InAppStreamName to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentInputDescription(v **types.InputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InputDescription if *v == nil { sv = &types.InputDescription{} } else { sv = *v } for key, value := range shape { switch key { case "InAppStreamNames": if err := awsAwsjson11_deserializeDocumentInAppStreamNames(&sv.InAppStreamNames, value); err != nil { return err } case "InputId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Id to be of type string, got %T instead", value) } sv.InputId = ptr.String(jtv) } case "InputParallelism": if err := awsAwsjson11_deserializeDocumentInputParallelism(&sv.InputParallelism, value); err != nil { return err } case "InputProcessingConfigurationDescription": if err := awsAwsjson11_deserializeDocumentInputProcessingConfigurationDescription(&sv.InputProcessingConfigurationDescription, value); err != nil { return err } case "InputSchema": if err := awsAwsjson11_deserializeDocumentSourceSchema(&sv.InputSchema, value); err != nil { return err } case "InputStartingPositionConfiguration": if err := awsAwsjson11_deserializeDocumentInputStartingPositionConfiguration(&sv.InputStartingPositionConfiguration, value); err != nil { return err } case "KinesisFirehoseInputDescription": if err := awsAwsjson11_deserializeDocumentKinesisFirehoseInputDescription(&sv.KinesisFirehoseInputDescription, value); err != nil { return err } case "KinesisStreamsInputDescription": if err := awsAwsjson11_deserializeDocumentKinesisStreamsInputDescription(&sv.KinesisStreamsInputDescription, value); err != nil { return err } case "NamePrefix": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected InAppStreamName to be of type string, got %T instead", value) } sv.NamePrefix = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInputDescriptions(v *[]types.InputDescription, 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.InputDescription if *v == nil { cv = []types.InputDescription{} } else { cv = *v } for _, value := range shape { var col types.InputDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentInputDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentInputLambdaProcessorDescription(v **types.InputLambdaProcessorDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InputLambdaProcessorDescription if *v == nil { sv = &types.InputLambdaProcessorDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ResourceARN = ptr.String(jtv) } case "RoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.RoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInputParallelism(v **types.InputParallelism, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InputParallelism if *v == nil { sv = &types.InputParallelism{} } else { sv = *v } for key, value := range shape { switch key { case "Count": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected InputParallelismCount to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Count = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInputProcessingConfigurationDescription(v **types.InputProcessingConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InputProcessingConfigurationDescription if *v == nil { sv = &types.InputProcessingConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "InputLambdaProcessorDescription": if err := awsAwsjson11_deserializeDocumentInputLambdaProcessorDescription(&sv.InputLambdaProcessorDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInputStartingPositionConfiguration(v **types.InputStartingPositionConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InputStartingPositionConfiguration if *v == nil { sv = &types.InputStartingPositionConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "InputStartingPosition": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected InputStartingPosition to be of type string, got %T instead", value) } sv.InputStartingPosition = types.InputStartingPosition(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidApplicationConfigurationException(v **types.InvalidApplicationConfigurationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidApplicationConfigurationException if *v == nil { sv = &types.InvalidApplicationConfigurationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidArgumentException(v **types.InvalidArgumentException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidArgumentException if *v == nil { sv = &types.InvalidArgumentException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidRequestException if *v == nil { sv = &types.InvalidRequestException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentJSONMappingParameters(v **types.JSONMappingParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.JSONMappingParameters if *v == nil { sv = &types.JSONMappingParameters{} } else { sv = *v } for key, value := range shape { switch key { case "RecordRowPath": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordRowPath to be of type string, got %T instead", value) } sv.RecordRowPath = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentKinesisFirehoseInputDescription(v **types.KinesisFirehoseInputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.KinesisFirehoseInputDescription if *v == nil { sv = &types.KinesisFirehoseInputDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ResourceARN = ptr.String(jtv) } case "RoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.RoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentKinesisFirehoseOutputDescription(v **types.KinesisFirehoseOutputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.KinesisFirehoseOutputDescription if *v == nil { sv = &types.KinesisFirehoseOutputDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ResourceARN = ptr.String(jtv) } case "RoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.RoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentKinesisStreamsInputDescription(v **types.KinesisStreamsInputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.KinesisStreamsInputDescription if *v == nil { sv = &types.KinesisStreamsInputDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ResourceARN = ptr.String(jtv) } case "RoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.RoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentKinesisStreamsOutputDescription(v **types.KinesisStreamsOutputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.KinesisStreamsOutputDescription if *v == nil { sv = &types.KinesisStreamsOutputDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ResourceARN = ptr.String(jtv) } case "RoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.RoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentLambdaOutputDescription(v **types.LambdaOutputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.LambdaOutputDescription if *v == nil { sv = &types.LambdaOutputDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ResourceARN = ptr.String(jtv) } case "RoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.RoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.LimitExceededException if *v == nil { sv = &types.LimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMappingParameters(v **types.MappingParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.MappingParameters if *v == nil { sv = &types.MappingParameters{} } else { sv = *v } for key, value := range shape { switch key { case "CSVMappingParameters": if err := awsAwsjson11_deserializeDocumentCSVMappingParameters(&sv.CSVMappingParameters, value); err != nil { return err } case "JSONMappingParameters": if err := awsAwsjson11_deserializeDocumentJSONMappingParameters(&sv.JSONMappingParameters, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMavenReference(v **types.MavenReference, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.MavenReference if *v == nil { sv = &types.MavenReference{} } else { sv = *v } for key, value := range shape { switch key { case "ArtifactId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MavenArtifactId to be of type string, got %T instead", value) } sv.ArtifactId = ptr.String(jtv) } case "GroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MavenGroupId to be of type string, got %T instead", value) } sv.GroupId = ptr.String(jtv) } case "Version": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MavenVersion to be of type string, got %T instead", value) } sv.Version = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentMonitoringConfigurationDescription(v **types.MonitoringConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.MonitoringConfigurationDescription if *v == nil { sv = &types.MonitoringConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ConfigurationType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConfigurationType to be of type string, got %T instead", value) } sv.ConfigurationType = types.ConfigurationType(jtv) } 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 "MetricsLevel": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MetricsLevel to be of type string, got %T instead", value) } sv.MetricsLevel = types.MetricsLevel(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOutputDescription(v **types.OutputDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.OutputDescription if *v == nil { sv = &types.OutputDescription{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationSchema": if err := awsAwsjson11_deserializeDocumentDestinationSchema(&sv.DestinationSchema, value); err != nil { return err } case "KinesisFirehoseOutputDescription": if err := awsAwsjson11_deserializeDocumentKinesisFirehoseOutputDescription(&sv.KinesisFirehoseOutputDescription, value); err != nil { return err } case "KinesisStreamsOutputDescription": if err := awsAwsjson11_deserializeDocumentKinesisStreamsOutputDescription(&sv.KinesisStreamsOutputDescription, value); err != nil { return err } case "LambdaOutputDescription": if err := awsAwsjson11_deserializeDocumentLambdaOutputDescription(&sv.LambdaOutputDescription, value); err != nil { return err } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected InAppStreamName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "OutputId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Id to be of type string, got %T instead", value) } sv.OutputId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentOutputDescriptions(v *[]types.OutputDescription, 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.OutputDescription if *v == nil { cv = []types.OutputDescription{} } else { cv = *v } for _, value := range shape { var col types.OutputDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentOutputDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentParallelismConfigurationDescription(v **types.ParallelismConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ParallelismConfigurationDescription if *v == nil { sv = &types.ParallelismConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "AutoScalingEnabled": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected BooleanObject to be of type *bool, got %T instead", value) } sv.AutoScalingEnabled = ptr.Bool(jtv) } case "ConfigurationType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConfigurationType to be of type string, got %T instead", value) } sv.ConfigurationType = types.ConfigurationType(jtv) } case "CurrentParallelism": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Parallelism to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.CurrentParallelism = ptr.Int32(int32(i64)) } case "Parallelism": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Parallelism to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.Parallelism = ptr.Int32(int32(i64)) } case "ParallelismPerKPU": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ParallelismPerKPU to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ParallelismPerKPU = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentParsedInputRecord(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 ParsedInputRecordField to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentParsedInputRecords(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 err := awsAwsjson11_deserializeDocumentParsedInputRecord(&col, value); err != nil { return err } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentProcessedInputRecords(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 ProcessedInputRecord to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPropertyGroup(v **types.PropertyGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.PropertyGroup if *v == nil { sv = &types.PropertyGroup{} } else { sv = *v } for key, value := range shape { switch key { case "PropertyGroupId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Id to be of type string, got %T instead", value) } sv.PropertyGroupId = ptr.String(jtv) } case "PropertyMap": if err := awsAwsjson11_deserializeDocumentPropertyMap(&sv.PropertyMap, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentPropertyGroups(v *[]types.PropertyGroup, 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.PropertyGroup if *v == nil { cv = []types.PropertyGroup{} } else { cv = *v } for _, value := range shape { var col types.PropertyGroup destAddr := &col if err := awsAwsjson11_deserializeDocumentPropertyGroup(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentPropertyMap(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 PropertyValue to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsAwsjson11_deserializeDocumentRawInputRecords(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 RawInputRecord to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRecordColumn(v **types.RecordColumn, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.RecordColumn if *v == nil { sv = &types.RecordColumn{} } else { sv = *v } for key, value := range shape { switch key { case "Mapping": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordColumnMapping to be of type string, got %T instead", value) } sv.Mapping = ptr.String(jtv) } case "Name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordColumnName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } case "SqlType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordColumnSqlType to be of type string, got %T instead", value) } sv.SqlType = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRecordColumns(v *[]types.RecordColumn, 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.RecordColumn if *v == nil { cv = []types.RecordColumn{} } else { cv = *v } for _, value := range shape { var col types.RecordColumn destAddr := &col if err := awsAwsjson11_deserializeDocumentRecordColumn(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentRecordFormat(v **types.RecordFormat, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.RecordFormat if *v == nil { sv = &types.RecordFormat{} } else { sv = *v } for key, value := range shape { switch key { case "MappingParameters": if err := awsAwsjson11_deserializeDocumentMappingParameters(&sv.MappingParameters, value); err != nil { return err } case "RecordFormatType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordFormatType to be of type string, got %T instead", value) } sv.RecordFormatType = types.RecordFormatType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentReferenceDataSourceDescription(v **types.ReferenceDataSourceDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ReferenceDataSourceDescription if *v == nil { sv = &types.ReferenceDataSourceDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ReferenceId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Id to be of type string, got %T instead", value) } sv.ReferenceId = ptr.String(jtv) } case "ReferenceSchema": if err := awsAwsjson11_deserializeDocumentSourceSchema(&sv.ReferenceSchema, value); err != nil { return err } case "S3ReferenceDataSourceDescription": if err := awsAwsjson11_deserializeDocumentS3ReferenceDataSourceDescription(&sv.S3ReferenceDataSourceDescription, value); err != nil { return err } case "TableName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected InAppTableName to be of type string, got %T instead", value) } sv.TableName = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentReferenceDataSourceDescriptions(v *[]types.ReferenceDataSourceDescription, 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.ReferenceDataSourceDescription if *v == nil { cv = []types.ReferenceDataSourceDescription{} } else { cv = *v } for _, value := range shape { var col types.ReferenceDataSourceDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentReferenceDataSourceDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ResourceInUseException if *v == nil { sv = &types.ResourceInUseException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentResourceProvisionedThroughputExceededException(v **types.ResourceProvisionedThroughputExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ResourceProvisionedThroughputExceededException if *v == nil { sv = &types.ResourceProvisionedThroughputExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentRunConfigurationDescription(v **types.RunConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.RunConfigurationDescription if *v == nil { sv = &types.RunConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationRestoreConfigurationDescription": if err := awsAwsjson11_deserializeDocumentApplicationRestoreConfiguration(&sv.ApplicationRestoreConfigurationDescription, value); err != nil { return err } case "FlinkRunConfigurationDescription": if err := awsAwsjson11_deserializeDocumentFlinkRunConfiguration(&sv.FlinkRunConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentS3ApplicationCodeLocationDescription(v **types.S3ApplicationCodeLocationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.S3ApplicationCodeLocationDescription if *v == nil { sv = &types.S3ApplicationCodeLocationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "BucketARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BucketARN to be of type string, got %T instead", value) } sv.BucketARN = ptr.String(jtv) } case "FileKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FileKey to be of type string, got %T instead", value) } sv.FileKey = ptr.String(jtv) } case "ObjectVersion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ObjectVersion to be of type string, got %T instead", value) } sv.ObjectVersion = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentS3ContentBaseLocationDescription(v **types.S3ContentBaseLocationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.S3ContentBaseLocationDescription if *v == nil { sv = &types.S3ContentBaseLocationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "BasePath": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BasePath to be of type string, got %T instead", value) } sv.BasePath = ptr.String(jtv) } case "BucketARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BucketARN to be of type string, got %T instead", value) } sv.BucketARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentS3ContentLocation(v **types.S3ContentLocation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.S3ContentLocation if *v == nil { sv = &types.S3ContentLocation{} } else { sv = *v } for key, value := range shape { switch key { case "BucketARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BucketARN to be of type string, got %T instead", value) } sv.BucketARN = ptr.String(jtv) } case "FileKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FileKey to be of type string, got %T instead", value) } sv.FileKey = ptr.String(jtv) } case "ObjectVersion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ObjectVersion to be of type string, got %T instead", value) } sv.ObjectVersion = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentS3ReferenceDataSourceDescription(v **types.S3ReferenceDataSourceDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.S3ReferenceDataSourceDescription if *v == nil { sv = &types.S3ReferenceDataSourceDescription{} } else { sv = *v } for key, value := range shape { switch key { case "BucketARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BucketARN to be of type string, got %T instead", value) } sv.BucketARN = ptr.String(jtv) } case "FileKey": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FileKey to be of type string, got %T instead", value) } sv.FileKey = ptr.String(jtv) } case "ReferenceRoleARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RoleARN to be of type string, got %T instead", value) } sv.ReferenceRoleARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSecurityGroupIds(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 SecurityGroupId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ServiceUnavailableException if *v == nil { sv = &types.ServiceUnavailableException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSnapshotDetails(v **types.SnapshotDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.SnapshotDetails if *v == nil { sv = &types.SnapshotDetails{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "SnapshotCreationTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.SnapshotCreationTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "SnapshotName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SnapshotName to be of type string, got %T instead", value) } sv.SnapshotName = ptr.String(jtv) } case "SnapshotStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SnapshotStatus to be of type string, got %T instead", value) } sv.SnapshotStatus = types.SnapshotStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSnapshotSummaries(v *[]types.SnapshotDetails, 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.SnapshotDetails if *v == nil { cv = []types.SnapshotDetails{} } else { cv = *v } for _, value := range shape { var col types.SnapshotDetails destAddr := &col if err := awsAwsjson11_deserializeDocumentSnapshotDetails(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentSourceSchema(v **types.SourceSchema, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.SourceSchema if *v == nil { sv = &types.SourceSchema{} } else { sv = *v } for key, value := range shape { switch key { case "RecordColumns": if err := awsAwsjson11_deserializeDocumentRecordColumns(&sv.RecordColumns, value); err != nil { return err } case "RecordEncoding": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecordEncoding to be of type string, got %T instead", value) } sv.RecordEncoding = ptr.String(jtv) } case "RecordFormat": if err := awsAwsjson11_deserializeDocumentRecordFormat(&sv.RecordFormat, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSqlApplicationConfigurationDescription(v **types.SqlApplicationConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.SqlApplicationConfigurationDescription if *v == nil { sv = &types.SqlApplicationConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "InputDescriptions": if err := awsAwsjson11_deserializeDocumentInputDescriptions(&sv.InputDescriptions, value); err != nil { return err } case "OutputDescriptions": if err := awsAwsjson11_deserializeDocumentOutputDescriptions(&sv.OutputDescriptions, value); err != nil { return err } case "ReferenceDataSourceDescriptions": if err := awsAwsjson11_deserializeDocumentReferenceDataSourceDescriptions(&sv.ReferenceDataSourceDescriptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentSubnetIds(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 SubnetId to be of type string, got %T instead", value) } col = jtv } cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.Tag if *v == nil { sv = &types.Tag{} } else { sv = *v } for key, value := range shape { switch key { case "Key": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) } sv.Key = ptr.String(jtv) } case "Value": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) } sv.Value = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentTags(v *[]types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var cv []types.Tag if *v == nil { cv = []types.Tag{} } else { cv = *v } for _, value := range shape { var col types.Tag destAddr := &col if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentTooManyTagsException(v **types.TooManyTagsException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.TooManyTagsException if *v == nil { sv = &types.TooManyTagsException{} } else { sv = *v } for key, value := range shape { switch key { case "message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUnableToDetectSchemaException(v **types.UnableToDetectSchemaException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.UnableToDetectSchemaException if *v == nil { sv = &types.UnableToDetectSchemaException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } case "ProcessedInputRecords": if err := awsAwsjson11_deserializeDocumentProcessedInputRecords(&sv.ProcessedInputRecords, value); err != nil { return err } case "RawInputRecords": if err := awsAwsjson11_deserializeDocumentRawInputRecords(&sv.RawInputRecords, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentUnsupportedOperationException(v **types.UnsupportedOperationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.UnsupportedOperationException if *v == nil { sv = &types.UnsupportedOperationException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentVpcConfigurationDescription(v **types.VpcConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.VpcConfigurationDescription if *v == nil { sv = &types.VpcConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "SecurityGroupIds": if err := awsAwsjson11_deserializeDocumentSecurityGroupIds(&sv.SecurityGroupIds, value); err != nil { return err } case "SubnetIds": if err := awsAwsjson11_deserializeDocumentSubnetIds(&sv.SubnetIds, value); err != nil { return err } case "VpcConfigurationId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Id to be of type string, got %T instead", value) } sv.VpcConfigurationId = ptr.String(jtv) } case "VpcId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) } sv.VpcId = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentVpcConfigurationDescriptions(v *[]types.VpcConfigurationDescription, 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.VpcConfigurationDescription if *v == nil { cv = []types.VpcConfigurationDescription{} } else { cv = *v } for _, value := range shape { var col types.VpcConfigurationDescription destAddr := &col if err := awsAwsjson11_deserializeDocumentVpcConfigurationDescription(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsAwsjson11_deserializeDocumentZeppelinApplicationConfigurationDescription(v **types.ZeppelinApplicationConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ZeppelinApplicationConfigurationDescription if *v == nil { sv = &types.ZeppelinApplicationConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { case "CatalogConfigurationDescription": if err := awsAwsjson11_deserializeDocumentCatalogConfigurationDescription(&sv.CatalogConfigurationDescription, value); err != nil { return err } case "CustomArtifactsConfigurationDescription": if err := awsAwsjson11_deserializeDocumentCustomArtifactsConfigurationDescriptionList(&sv.CustomArtifactsConfigurationDescription, value); err != nil { return err } case "DeployAsApplicationConfigurationDescription": if err := awsAwsjson11_deserializeDocumentDeployAsApplicationConfigurationDescription(&sv.DeployAsApplicationConfigurationDescription, value); err != nil { return err } case "MonitoringConfigurationDescription": if err := awsAwsjson11_deserializeDocumentZeppelinMonitoringConfigurationDescription(&sv.MonitoringConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeDocumentZeppelinMonitoringConfigurationDescription(v **types.ZeppelinMonitoringConfigurationDescription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ZeppelinMonitoringConfigurationDescription if *v == nil { sv = &types.ZeppelinMonitoringConfigurationDescription{} } else { sv = *v } for key, value := range shape { switch key { 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) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddApplicationCloudWatchLoggingOptionOutput(v **AddApplicationCloudWatchLoggingOptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *AddApplicationCloudWatchLoggingOptionOutput if *v == nil { sv = &AddApplicationCloudWatchLoggingOptionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "CloudWatchLoggingOptionDescriptions": if err := awsAwsjson11_deserializeDocumentCloudWatchLoggingOptionDescriptions(&sv.CloudWatchLoggingOptionDescriptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddApplicationInputOutput(v **AddApplicationInputOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *AddApplicationInputOutput if *v == nil { sv = &AddApplicationInputOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "InputDescriptions": if err := awsAwsjson11_deserializeDocumentInputDescriptions(&sv.InputDescriptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddApplicationInputProcessingConfigurationOutput(v **AddApplicationInputProcessingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *AddApplicationInputProcessingConfigurationOutput if *v == nil { sv = &AddApplicationInputProcessingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "InputId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Id to be of type string, got %T instead", value) } sv.InputId = ptr.String(jtv) } case "InputProcessingConfigurationDescription": if err := awsAwsjson11_deserializeDocumentInputProcessingConfigurationDescription(&sv.InputProcessingConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddApplicationOutputOutput(v **AddApplicationOutputOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *AddApplicationOutputOutput if *v == nil { sv = &AddApplicationOutputOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "OutputDescriptions": if err := awsAwsjson11_deserializeDocumentOutputDescriptions(&sv.OutputDescriptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddApplicationReferenceDataSourceOutput(v **AddApplicationReferenceDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *AddApplicationReferenceDataSourceOutput if *v == nil { sv = &AddApplicationReferenceDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "ReferenceDataSourceDescriptions": if err := awsAwsjson11_deserializeDocumentReferenceDataSourceDescriptions(&sv.ReferenceDataSourceDescriptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentAddApplicationVpcConfigurationOutput(v **AddApplicationVpcConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *AddApplicationVpcConfigurationOutput if *v == nil { sv = &AddApplicationVpcConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "VpcConfigurationDescription": if err := awsAwsjson11_deserializeDocumentVpcConfigurationDescription(&sv.VpcConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateApplicationOutput(v **CreateApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *CreateApplicationOutput if *v == nil { sv = &CreateApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationDetail": if err := awsAwsjson11_deserializeDocumentApplicationDetail(&sv.ApplicationDetail, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateApplicationPresignedUrlOutput(v **CreateApplicationPresignedUrlOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *CreateApplicationPresignedUrlOutput if *v == nil { sv = &CreateApplicationPresignedUrlOutput{} } else { sv = *v } for key, value := range shape { switch key { case "AuthorizedUrl": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected AuthorizedUrl to be of type string, got %T instead", value) } sv.AuthorizedUrl = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentCreateApplicationSnapshotOutput(v **CreateApplicationSnapshotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *CreateApplicationSnapshotOutput if *v == nil { sv = &CreateApplicationSnapshotOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteApplicationCloudWatchLoggingOptionOutput(v **DeleteApplicationCloudWatchLoggingOptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DeleteApplicationCloudWatchLoggingOptionOutput if *v == nil { sv = &DeleteApplicationCloudWatchLoggingOptionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } case "CloudWatchLoggingOptionDescriptions": if err := awsAwsjson11_deserializeDocumentCloudWatchLoggingOptionDescriptions(&sv.CloudWatchLoggingOptionDescriptions, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteApplicationInputProcessingConfigurationOutput(v **DeleteApplicationInputProcessingConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DeleteApplicationInputProcessingConfigurationOutput if *v == nil { sv = &DeleteApplicationInputProcessingConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteApplicationOutput(v **DeleteApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DeleteApplicationOutput if *v == nil { sv = &DeleteApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteApplicationOutputOutput(v **DeleteApplicationOutputOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DeleteApplicationOutputOutput if *v == nil { sv = &DeleteApplicationOutputOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteApplicationReferenceDataSourceOutput(v **DeleteApplicationReferenceDataSourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DeleteApplicationReferenceDataSourceOutput if *v == nil { sv = &DeleteApplicationReferenceDataSourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteApplicationSnapshotOutput(v **DeleteApplicationSnapshotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DeleteApplicationSnapshotOutput if *v == nil { sv = &DeleteApplicationSnapshotOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDeleteApplicationVpcConfigurationOutput(v **DeleteApplicationVpcConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DeleteApplicationVpcConfigurationOutput if *v == nil { sv = &DeleteApplicationVpcConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationVersionId": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected ApplicationVersionId to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.ApplicationVersionId = ptr.Int64(i64) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeApplicationOutput(v **DescribeApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeApplicationOutput if *v == nil { sv = &DescribeApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationDetail": if err := awsAwsjson11_deserializeDocumentApplicationDetail(&sv.ApplicationDetail, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeApplicationSnapshotOutput(v **DescribeApplicationSnapshotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeApplicationSnapshotOutput if *v == nil { sv = &DescribeApplicationSnapshotOutput{} } else { sv = *v } for key, value := range shape { switch key { case "SnapshotDetails": if err := awsAwsjson11_deserializeDocumentSnapshotDetails(&sv.SnapshotDetails, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDescribeApplicationVersionOutput(v **DescribeApplicationVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeApplicationVersionOutput if *v == nil { sv = &DescribeApplicationVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationVersionDetail": if err := awsAwsjson11_deserializeDocumentApplicationDetail(&sv.ApplicationVersionDetail, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentDiscoverInputSchemaOutput(v **DiscoverInputSchemaOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DiscoverInputSchemaOutput if *v == nil { sv = &DiscoverInputSchemaOutput{} } else { sv = *v } for key, value := range shape { switch key { case "InputSchema": if err := awsAwsjson11_deserializeDocumentSourceSchema(&sv.InputSchema, value); err != nil { return err } case "ParsedInputRecords": if err := awsAwsjson11_deserializeDocumentParsedInputRecords(&sv.ParsedInputRecords, value); err != nil { return err } case "ProcessedInputRecords": if err := awsAwsjson11_deserializeDocumentProcessedInputRecords(&sv.ProcessedInputRecords, value); err != nil { return err } case "RawInputRecords": if err := awsAwsjson11_deserializeDocumentRawInputRecords(&sv.RawInputRecords, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListApplicationSnapshotsOutput(v **ListApplicationSnapshotsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListApplicationSnapshotsOutput if *v == nil { sv = &ListApplicationSnapshotsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "SnapshotSummaries": if err := awsAwsjson11_deserializeDocumentSnapshotSummaries(&sv.SnapshotSummaries, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListApplicationsOutput(v **ListApplicationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListApplicationsOutput if *v == nil { sv = &ListApplicationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationSummaries": if err := awsAwsjson11_deserializeDocumentApplicationSummaries(&sv.ApplicationSummaries, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListApplicationVersionsOutput(v **ListApplicationVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListApplicationVersionsOutput if *v == nil { sv = &ListApplicationVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationVersionSummaries": if err := awsAwsjson11_deserializeDocumentApplicationVersionSummaries(&sv.ApplicationVersionSummaries, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Tags": if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentRollbackApplicationOutput(v **RollbackApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *RollbackApplicationOutput if *v == nil { sv = &RollbackApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationDetail": if err := awsAwsjson11_deserializeDocumentApplicationDetail(&sv.ApplicationDetail, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentStartApplicationOutput(v **StartApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *StartApplicationOutput if *v == nil { sv = &StartApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentStopApplicationOutput(v **StopApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *StopApplicationOutput if *v == nil { sv = &StopApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentTagResourceOutput(v **TagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *TagResourceOutput if *v == nil { sv = &TagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUntagResourceOutput(v **UntagResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *UntagResourceOutput if *v == nil { sv = &UntagResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateApplicationMaintenanceConfigurationOutput(v **UpdateApplicationMaintenanceConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *UpdateApplicationMaintenanceConfigurationOutput if *v == nil { sv = &UpdateApplicationMaintenanceConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ApplicationARN = ptr.String(jtv) } case "ApplicationMaintenanceConfigurationDescription": if err := awsAwsjson11_deserializeDocumentApplicationMaintenanceConfigurationDescription(&sv.ApplicationMaintenanceConfigurationDescription, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsAwsjson11_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *UpdateApplicationOutput if *v == nil { sv = &UpdateApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ApplicationDetail": if err := awsAwsjson11_deserializeDocumentApplicationDetail(&sv.ApplicationDetail, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil }
9,745
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package kinesisanalyticsv2 provides the API client, operations, and parameter // types for Amazon Kinesis Analytics. // // Amazon Kinesis Data Analytics is a fully managed service that you can use to // process and analyze streaming data using Java, SQL, or Scala. The service // enables you to quickly author and run Java, SQL, or Scala code against streaming // sources to perform time series analytics, feed real-time dashboards, and create // real-time metrics. package kinesisanalyticsv2
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "kinesisanalytics" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package kinesisanalyticsv2 // goModuleVersion is the tagged release for this module const goModuleVersion = "1.17.0"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "path" ) type awsAwsjson11_serializeOpAddApplicationCloudWatchLoggingOption struct { } func (*awsAwsjson11_serializeOpAddApplicationCloudWatchLoggingOption) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddApplicationCloudWatchLoggingOption) 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.(*AddApplicationCloudWatchLoggingOptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.AddApplicationCloudWatchLoggingOption") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddApplicationCloudWatchLoggingOptionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAddApplicationInput struct { } func (*awsAwsjson11_serializeOpAddApplicationInput) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddApplicationInput) 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.(*AddApplicationInputInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.AddApplicationInput") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddApplicationInputInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAddApplicationInputProcessingConfiguration struct { } func (*awsAwsjson11_serializeOpAddApplicationInputProcessingConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddApplicationInputProcessingConfiguration) 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.(*AddApplicationInputProcessingConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.AddApplicationInputProcessingConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddApplicationInputProcessingConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAddApplicationOutput struct { } func (*awsAwsjson11_serializeOpAddApplicationOutput) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddApplicationOutput) 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.(*AddApplicationOutputInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.AddApplicationOutput") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddApplicationOutputInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAddApplicationReferenceDataSource struct { } func (*awsAwsjson11_serializeOpAddApplicationReferenceDataSource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddApplicationReferenceDataSource) 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.(*AddApplicationReferenceDataSourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.AddApplicationReferenceDataSource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddApplicationReferenceDataSourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpAddApplicationVpcConfiguration struct { } func (*awsAwsjson11_serializeOpAddApplicationVpcConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpAddApplicationVpcConfiguration) 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.(*AddApplicationVpcConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.AddApplicationVpcConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentAddApplicationVpcConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateApplication struct { } func (*awsAwsjson11_serializeOpCreateApplication) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateApplication) 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.(*CreateApplicationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.CreateApplication") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateApplicationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateApplicationPresignedUrl struct { } func (*awsAwsjson11_serializeOpCreateApplicationPresignedUrl) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateApplicationPresignedUrl) 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.(*CreateApplicationPresignedUrlInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.CreateApplicationPresignedUrl") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateApplicationPresignedUrlInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpCreateApplicationSnapshot struct { } func (*awsAwsjson11_serializeOpCreateApplicationSnapshot) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpCreateApplicationSnapshot) 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.(*CreateApplicationSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.CreateApplicationSnapshot") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentCreateApplicationSnapshotInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteApplication struct { } func (*awsAwsjson11_serializeOpDeleteApplication) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteApplication) 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.(*DeleteApplicationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DeleteApplication") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteApplicationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteApplicationCloudWatchLoggingOption struct { } func (*awsAwsjson11_serializeOpDeleteApplicationCloudWatchLoggingOption) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteApplicationCloudWatchLoggingOption) 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.(*DeleteApplicationCloudWatchLoggingOptionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DeleteApplicationCloudWatchLoggingOption") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteApplicationCloudWatchLoggingOptionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteApplicationInputProcessingConfiguration struct { } func (*awsAwsjson11_serializeOpDeleteApplicationInputProcessingConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteApplicationInputProcessingConfiguration) 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.(*DeleteApplicationInputProcessingConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DeleteApplicationInputProcessingConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteApplicationInputProcessingConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteApplicationOutput struct { } func (*awsAwsjson11_serializeOpDeleteApplicationOutput) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteApplicationOutput) 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.(*DeleteApplicationOutputInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DeleteApplicationOutput") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteApplicationOutputInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteApplicationReferenceDataSource struct { } func (*awsAwsjson11_serializeOpDeleteApplicationReferenceDataSource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteApplicationReferenceDataSource) 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.(*DeleteApplicationReferenceDataSourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DeleteApplicationReferenceDataSource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteApplicationReferenceDataSourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteApplicationSnapshot struct { } func (*awsAwsjson11_serializeOpDeleteApplicationSnapshot) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteApplicationSnapshot) 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.(*DeleteApplicationSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DeleteApplicationSnapshot") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteApplicationSnapshotInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDeleteApplicationVpcConfiguration struct { } func (*awsAwsjson11_serializeOpDeleteApplicationVpcConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDeleteApplicationVpcConfiguration) 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.(*DeleteApplicationVpcConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DeleteApplicationVpcConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDeleteApplicationVpcConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeApplication struct { } func (*awsAwsjson11_serializeOpDescribeApplication) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeApplication) 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.(*DescribeApplicationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DescribeApplication") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeApplicationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeApplicationSnapshot struct { } func (*awsAwsjson11_serializeOpDescribeApplicationSnapshot) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeApplicationSnapshot) 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.(*DescribeApplicationSnapshotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DescribeApplicationSnapshot") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeApplicationSnapshotInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDescribeApplicationVersion struct { } func (*awsAwsjson11_serializeOpDescribeApplicationVersion) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDescribeApplicationVersion) 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.(*DescribeApplicationVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DescribeApplicationVersion") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDescribeApplicationVersionInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpDiscoverInputSchema struct { } func (*awsAwsjson11_serializeOpDiscoverInputSchema) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpDiscoverInputSchema) 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.(*DiscoverInputSchemaInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.DiscoverInputSchema") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentDiscoverInputSchemaInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListApplications struct { } func (*awsAwsjson11_serializeOpListApplications) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListApplications) 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.(*ListApplicationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.ListApplications") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListApplicationsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListApplicationSnapshots struct { } func (*awsAwsjson11_serializeOpListApplicationSnapshots) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListApplicationSnapshots) 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.(*ListApplicationSnapshotsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.ListApplicationSnapshots") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListApplicationSnapshotsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListApplicationVersions struct { } func (*awsAwsjson11_serializeOpListApplicationVersions) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListApplicationVersions) 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.(*ListApplicationVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.ListApplicationVersions") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListApplicationVersionsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpListTagsForResource struct { } func (*awsAwsjson11_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.ListTagsForResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpRollbackApplication struct { } func (*awsAwsjson11_serializeOpRollbackApplication) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpRollbackApplication) 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.(*RollbackApplicationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.RollbackApplication") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentRollbackApplicationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpStartApplication struct { } func (*awsAwsjson11_serializeOpStartApplication) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpStartApplication) 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.(*StartApplicationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.StartApplication") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentStartApplicationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpStopApplication struct { } func (*awsAwsjson11_serializeOpStopApplication) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpStopApplication) 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.(*StopApplicationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.StopApplication") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentStopApplicationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpTagResource struct { } func (*awsAwsjson11_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.TagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUntagResource struct { } func (*awsAwsjson11_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.UntagResource") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateApplication struct { } func (*awsAwsjson11_serializeOpUpdateApplication) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateApplication) 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.(*UpdateApplicationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.UpdateApplication") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateApplicationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } type awsAwsjson11_serializeOpUpdateApplicationMaintenanceConfiguration struct { } func (*awsAwsjson11_serializeOpUpdateApplicationMaintenanceConfiguration) ID() string { return "OperationSerializer" } func (m *awsAwsjson11_serializeOpUpdateApplicationMaintenanceConfiguration) 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.(*UpdateApplicationMaintenanceConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } operationPath := "/" if len(request.Request.URL.Path) == 0 { request.Request.URL.Path = operationPath } else { request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { request.Request.URL.Path += "/" } } request.Request.Method = "POST" httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") httpBindingEncoder.SetHeader("X-Amz-Target").String("KinesisAnalytics_20180523.UpdateApplicationMaintenanceConfiguration") jsonEncoder := smithyjson.NewEncoder() if err := awsAwsjson11_serializeOpDocumentUpdateApplicationMaintenanceConfigurationInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsAwsjson11_serializeDocumentApplicationCodeConfiguration(v *types.ApplicationCodeConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CodeContent != nil { ok := object.Key("CodeContent") if err := awsAwsjson11_serializeDocumentCodeContent(v.CodeContent, ok); err != nil { return err } } if len(v.CodeContentType) > 0 { ok := object.Key("CodeContentType") ok.String(string(v.CodeContentType)) } return nil } func awsAwsjson11_serializeDocumentApplicationCodeConfigurationUpdate(v *types.ApplicationCodeConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.CodeContentTypeUpdate) > 0 { ok := object.Key("CodeContentTypeUpdate") ok.String(string(v.CodeContentTypeUpdate)) } if v.CodeContentUpdate != nil { ok := object.Key("CodeContentUpdate") if err := awsAwsjson11_serializeDocumentCodeContentUpdate(v.CodeContentUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentApplicationConfiguration(v *types.ApplicationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationCodeConfiguration != nil { ok := object.Key("ApplicationCodeConfiguration") if err := awsAwsjson11_serializeDocumentApplicationCodeConfiguration(v.ApplicationCodeConfiguration, ok); err != nil { return err } } if v.ApplicationSnapshotConfiguration != nil { ok := object.Key("ApplicationSnapshotConfiguration") if err := awsAwsjson11_serializeDocumentApplicationSnapshotConfiguration(v.ApplicationSnapshotConfiguration, ok); err != nil { return err } } if v.EnvironmentProperties != nil { ok := object.Key("EnvironmentProperties") if err := awsAwsjson11_serializeDocumentEnvironmentProperties(v.EnvironmentProperties, ok); err != nil { return err } } if v.FlinkApplicationConfiguration != nil { ok := object.Key("FlinkApplicationConfiguration") if err := awsAwsjson11_serializeDocumentFlinkApplicationConfiguration(v.FlinkApplicationConfiguration, ok); err != nil { return err } } if v.SqlApplicationConfiguration != nil { ok := object.Key("SqlApplicationConfiguration") if err := awsAwsjson11_serializeDocumentSqlApplicationConfiguration(v.SqlApplicationConfiguration, ok); err != nil { return err } } if v.VpcConfigurations != nil { ok := object.Key("VpcConfigurations") if err := awsAwsjson11_serializeDocumentVpcConfigurations(v.VpcConfigurations, ok); err != nil { return err } } if v.ZeppelinApplicationConfiguration != nil { ok := object.Key("ZeppelinApplicationConfiguration") if err := awsAwsjson11_serializeDocumentZeppelinApplicationConfiguration(v.ZeppelinApplicationConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentApplicationConfigurationUpdate(v *types.ApplicationConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationCodeConfigurationUpdate != nil { ok := object.Key("ApplicationCodeConfigurationUpdate") if err := awsAwsjson11_serializeDocumentApplicationCodeConfigurationUpdate(v.ApplicationCodeConfigurationUpdate, ok); err != nil { return err } } if v.ApplicationSnapshotConfigurationUpdate != nil { ok := object.Key("ApplicationSnapshotConfigurationUpdate") if err := awsAwsjson11_serializeDocumentApplicationSnapshotConfigurationUpdate(v.ApplicationSnapshotConfigurationUpdate, ok); err != nil { return err } } if v.EnvironmentPropertyUpdates != nil { ok := object.Key("EnvironmentPropertyUpdates") if err := awsAwsjson11_serializeDocumentEnvironmentPropertyUpdates(v.EnvironmentPropertyUpdates, ok); err != nil { return err } } if v.FlinkApplicationConfigurationUpdate != nil { ok := object.Key("FlinkApplicationConfigurationUpdate") if err := awsAwsjson11_serializeDocumentFlinkApplicationConfigurationUpdate(v.FlinkApplicationConfigurationUpdate, ok); err != nil { return err } } if v.SqlApplicationConfigurationUpdate != nil { ok := object.Key("SqlApplicationConfigurationUpdate") if err := awsAwsjson11_serializeDocumentSqlApplicationConfigurationUpdate(v.SqlApplicationConfigurationUpdate, ok); err != nil { return err } } if v.VpcConfigurationUpdates != nil { ok := object.Key("VpcConfigurationUpdates") if err := awsAwsjson11_serializeDocumentVpcConfigurationUpdates(v.VpcConfigurationUpdates, ok); err != nil { return err } } if v.ZeppelinApplicationConfigurationUpdate != nil { ok := object.Key("ZeppelinApplicationConfigurationUpdate") if err := awsAwsjson11_serializeDocumentZeppelinApplicationConfigurationUpdate(v.ZeppelinApplicationConfigurationUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentApplicationMaintenanceConfigurationUpdate(v *types.ApplicationMaintenanceConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationMaintenanceWindowStartTimeUpdate != nil { ok := object.Key("ApplicationMaintenanceWindowStartTimeUpdate") ok.String(*v.ApplicationMaintenanceWindowStartTimeUpdate) } return nil } func awsAwsjson11_serializeDocumentApplicationRestoreConfiguration(v *types.ApplicationRestoreConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ApplicationRestoreType) > 0 { ok := object.Key("ApplicationRestoreType") ok.String(string(v.ApplicationRestoreType)) } if v.SnapshotName != nil { ok := object.Key("SnapshotName") ok.String(*v.SnapshotName) } return nil } func awsAwsjson11_serializeDocumentApplicationSnapshotConfiguration(v *types.ApplicationSnapshotConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SnapshotsEnabled != nil { ok := object.Key("SnapshotsEnabled") ok.Boolean(*v.SnapshotsEnabled) } return nil } func awsAwsjson11_serializeDocumentApplicationSnapshotConfigurationUpdate(v *types.ApplicationSnapshotConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SnapshotsEnabledUpdate != nil { ok := object.Key("SnapshotsEnabledUpdate") ok.Boolean(*v.SnapshotsEnabledUpdate) } return nil } func awsAwsjson11_serializeDocumentCatalogConfiguration(v *types.CatalogConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GlueDataCatalogConfiguration != nil { ok := object.Key("GlueDataCatalogConfiguration") if err := awsAwsjson11_serializeDocumentGlueDataCatalogConfiguration(v.GlueDataCatalogConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCatalogConfigurationUpdate(v *types.CatalogConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.GlueDataCatalogConfigurationUpdate != nil { ok := object.Key("GlueDataCatalogConfigurationUpdate") if err := awsAwsjson11_serializeDocumentGlueDataCatalogConfigurationUpdate(v.GlueDataCatalogConfigurationUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCheckpointConfiguration(v *types.CheckpointConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CheckpointingEnabled != nil { ok := object.Key("CheckpointingEnabled") ok.Boolean(*v.CheckpointingEnabled) } if v.CheckpointInterval != nil { ok := object.Key("CheckpointInterval") ok.Long(*v.CheckpointInterval) } if len(v.ConfigurationType) > 0 { ok := object.Key("ConfigurationType") ok.String(string(v.ConfigurationType)) } if v.MinPauseBetweenCheckpoints != nil { ok := object.Key("MinPauseBetweenCheckpoints") ok.Long(*v.MinPauseBetweenCheckpoints) } return nil } func awsAwsjson11_serializeDocumentCheckpointConfigurationUpdate(v *types.CheckpointConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CheckpointingEnabledUpdate != nil { ok := object.Key("CheckpointingEnabledUpdate") ok.Boolean(*v.CheckpointingEnabledUpdate) } if v.CheckpointIntervalUpdate != nil { ok := object.Key("CheckpointIntervalUpdate") ok.Long(*v.CheckpointIntervalUpdate) } if len(v.ConfigurationTypeUpdate) > 0 { ok := object.Key("ConfigurationTypeUpdate") ok.String(string(v.ConfigurationTypeUpdate)) } if v.MinPauseBetweenCheckpointsUpdate != nil { ok := object.Key("MinPauseBetweenCheckpointsUpdate") ok.Long(*v.MinPauseBetweenCheckpointsUpdate) } return nil } func awsAwsjson11_serializeDocumentCloudWatchLoggingOption(v *types.CloudWatchLoggingOption, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.LogStreamARN != nil { ok := object.Key("LogStreamARN") ok.String(*v.LogStreamARN) } return nil } func awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v []types.CloudWatchLoggingOption, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOption(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCloudWatchLoggingOptionUpdate(v *types.CloudWatchLoggingOptionUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CloudWatchLoggingOptionId != nil { ok := object.Key("CloudWatchLoggingOptionId") ok.String(*v.CloudWatchLoggingOptionId) } if v.LogStreamARNUpdate != nil { ok := object.Key("LogStreamARNUpdate") ok.String(*v.LogStreamARNUpdate) } return nil } func awsAwsjson11_serializeDocumentCloudWatchLoggingOptionUpdates(v []types.CloudWatchLoggingOptionUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptionUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCodeContent(v *types.CodeContent, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.S3ContentLocation != nil { ok := object.Key("S3ContentLocation") if err := awsAwsjson11_serializeDocumentS3ContentLocation(v.S3ContentLocation, ok); err != nil { return err } } if v.TextContent != nil { ok := object.Key("TextContent") ok.String(*v.TextContent) } if v.ZipFileContent != nil { ok := object.Key("ZipFileContent") ok.Base64EncodeBytes(v.ZipFileContent) } return nil } func awsAwsjson11_serializeDocumentCodeContentUpdate(v *types.CodeContentUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.S3ContentLocationUpdate != nil { ok := object.Key("S3ContentLocationUpdate") if err := awsAwsjson11_serializeDocumentS3ContentLocationUpdate(v.S3ContentLocationUpdate, ok); err != nil { return err } } if v.TextContentUpdate != nil { ok := object.Key("TextContentUpdate") ok.String(*v.TextContentUpdate) } if v.ZipFileContentUpdate != nil { ok := object.Key("ZipFileContentUpdate") ok.Base64EncodeBytes(v.ZipFileContentUpdate) } return nil } func awsAwsjson11_serializeDocumentCSVMappingParameters(v *types.CSVMappingParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RecordColumnDelimiter != nil { ok := object.Key("RecordColumnDelimiter") ok.String(*v.RecordColumnDelimiter) } if v.RecordRowDelimiter != nil { ok := object.Key("RecordRowDelimiter") ok.String(*v.RecordRowDelimiter) } return nil } func awsAwsjson11_serializeDocumentCustomArtifactConfiguration(v *types.CustomArtifactConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ArtifactType) > 0 { ok := object.Key("ArtifactType") ok.String(string(v.ArtifactType)) } if v.MavenReference != nil { ok := object.Key("MavenReference") if err := awsAwsjson11_serializeDocumentMavenReference(v.MavenReference, ok); err != nil { return err } } if v.S3ContentLocation != nil { ok := object.Key("S3ContentLocation") if err := awsAwsjson11_serializeDocumentS3ContentLocation(v.S3ContentLocation, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentCustomArtifactsConfigurationList(v []types.CustomArtifactConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentCustomArtifactConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDeployAsApplicationConfiguration(v *types.DeployAsApplicationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.S3ContentLocation != nil { ok := object.Key("S3ContentLocation") if err := awsAwsjson11_serializeDocumentS3ContentBaseLocation(v.S3ContentLocation, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDeployAsApplicationConfigurationUpdate(v *types.DeployAsApplicationConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.S3ContentLocationUpdate != nil { ok := object.Key("S3ContentLocationUpdate") if err := awsAwsjson11_serializeDocumentS3ContentBaseLocationUpdate(v.S3ContentLocationUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentDestinationSchema(v *types.DestinationSchema, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.RecordFormatType) > 0 { ok := object.Key("RecordFormatType") ok.String(string(v.RecordFormatType)) } return nil } func awsAwsjson11_serializeDocumentEnvironmentProperties(v *types.EnvironmentProperties, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PropertyGroups != nil { ok := object.Key("PropertyGroups") if err := awsAwsjson11_serializeDocumentPropertyGroups(v.PropertyGroups, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentEnvironmentPropertyUpdates(v *types.EnvironmentPropertyUpdates, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PropertyGroups != nil { ok := object.Key("PropertyGroups") if err := awsAwsjson11_serializeDocumentPropertyGroups(v.PropertyGroups, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentFlinkApplicationConfiguration(v *types.FlinkApplicationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CheckpointConfiguration != nil { ok := object.Key("CheckpointConfiguration") if err := awsAwsjson11_serializeDocumentCheckpointConfiguration(v.CheckpointConfiguration, ok); err != nil { return err } } if v.MonitoringConfiguration != nil { ok := object.Key("MonitoringConfiguration") if err := awsAwsjson11_serializeDocumentMonitoringConfiguration(v.MonitoringConfiguration, ok); err != nil { return err } } if v.ParallelismConfiguration != nil { ok := object.Key("ParallelismConfiguration") if err := awsAwsjson11_serializeDocumentParallelismConfiguration(v.ParallelismConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentFlinkApplicationConfigurationUpdate(v *types.FlinkApplicationConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CheckpointConfigurationUpdate != nil { ok := object.Key("CheckpointConfigurationUpdate") if err := awsAwsjson11_serializeDocumentCheckpointConfigurationUpdate(v.CheckpointConfigurationUpdate, ok); err != nil { return err } } if v.MonitoringConfigurationUpdate != nil { ok := object.Key("MonitoringConfigurationUpdate") if err := awsAwsjson11_serializeDocumentMonitoringConfigurationUpdate(v.MonitoringConfigurationUpdate, ok); err != nil { return err } } if v.ParallelismConfigurationUpdate != nil { ok := object.Key("ParallelismConfigurationUpdate") if err := awsAwsjson11_serializeDocumentParallelismConfigurationUpdate(v.ParallelismConfigurationUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentFlinkRunConfiguration(v *types.FlinkRunConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AllowNonRestoredState != nil { ok := object.Key("AllowNonRestoredState") ok.Boolean(*v.AllowNonRestoredState) } return nil } func awsAwsjson11_serializeDocumentGlueDataCatalogConfiguration(v *types.GlueDataCatalogConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DatabaseARN != nil { ok := object.Key("DatabaseARN") ok.String(*v.DatabaseARN) } return nil } func awsAwsjson11_serializeDocumentGlueDataCatalogConfigurationUpdate(v *types.GlueDataCatalogConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DatabaseARNUpdate != nil { ok := object.Key("DatabaseARNUpdate") ok.String(*v.DatabaseARNUpdate) } return nil } func awsAwsjson11_serializeDocumentInput(v *types.Input, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InputParallelism != nil { ok := object.Key("InputParallelism") if err := awsAwsjson11_serializeDocumentInputParallelism(v.InputParallelism, ok); err != nil { return err } } if v.InputProcessingConfiguration != nil { ok := object.Key("InputProcessingConfiguration") if err := awsAwsjson11_serializeDocumentInputProcessingConfiguration(v.InputProcessingConfiguration, ok); err != nil { return err } } if v.InputSchema != nil { ok := object.Key("InputSchema") if err := awsAwsjson11_serializeDocumentSourceSchema(v.InputSchema, ok); err != nil { return err } } if v.KinesisFirehoseInput != nil { ok := object.Key("KinesisFirehoseInput") if err := awsAwsjson11_serializeDocumentKinesisFirehoseInput(v.KinesisFirehoseInput, ok); err != nil { return err } } if v.KinesisStreamsInput != nil { ok := object.Key("KinesisStreamsInput") if err := awsAwsjson11_serializeDocumentKinesisStreamsInput(v.KinesisStreamsInput, ok); err != nil { return err } } if v.NamePrefix != nil { ok := object.Key("NamePrefix") ok.String(*v.NamePrefix) } return nil } func awsAwsjson11_serializeDocumentInputLambdaProcessor(v *types.InputLambdaProcessor, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeDocumentInputLambdaProcessorUpdate(v *types.InputLambdaProcessorUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARNUpdate != nil { ok := object.Key("ResourceARNUpdate") ok.String(*v.ResourceARNUpdate) } return nil } func awsAwsjson11_serializeDocumentInputParallelism(v *types.InputParallelism, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Count != nil { ok := object.Key("Count") ok.Integer(*v.Count) } return nil } func awsAwsjson11_serializeDocumentInputParallelismUpdate(v *types.InputParallelismUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CountUpdate != nil { ok := object.Key("CountUpdate") ok.Integer(*v.CountUpdate) } return nil } func awsAwsjson11_serializeDocumentInputProcessingConfiguration(v *types.InputProcessingConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InputLambdaProcessor != nil { ok := object.Key("InputLambdaProcessor") if err := awsAwsjson11_serializeDocumentInputLambdaProcessor(v.InputLambdaProcessor, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentInputProcessingConfigurationUpdate(v *types.InputProcessingConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InputLambdaProcessorUpdate != nil { ok := object.Key("InputLambdaProcessorUpdate") if err := awsAwsjson11_serializeDocumentInputLambdaProcessorUpdate(v.InputLambdaProcessorUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentInputs(v []types.Input, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentInput(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentInputSchemaUpdate(v *types.InputSchemaUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RecordColumnUpdates != nil { ok := object.Key("RecordColumnUpdates") if err := awsAwsjson11_serializeDocumentRecordColumns(v.RecordColumnUpdates, ok); err != nil { return err } } if v.RecordEncodingUpdate != nil { ok := object.Key("RecordEncodingUpdate") ok.String(*v.RecordEncodingUpdate) } if v.RecordFormatUpdate != nil { ok := object.Key("RecordFormatUpdate") if err := awsAwsjson11_serializeDocumentRecordFormat(v.RecordFormatUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentInputStartingPositionConfiguration(v *types.InputStartingPositionConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.InputStartingPosition) > 0 { ok := object.Key("InputStartingPosition") ok.String(string(v.InputStartingPosition)) } return nil } func awsAwsjson11_serializeDocumentInputUpdate(v *types.InputUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InputId != nil { ok := object.Key("InputId") ok.String(*v.InputId) } if v.InputParallelismUpdate != nil { ok := object.Key("InputParallelismUpdate") if err := awsAwsjson11_serializeDocumentInputParallelismUpdate(v.InputParallelismUpdate, ok); err != nil { return err } } if v.InputProcessingConfigurationUpdate != nil { ok := object.Key("InputProcessingConfigurationUpdate") if err := awsAwsjson11_serializeDocumentInputProcessingConfigurationUpdate(v.InputProcessingConfigurationUpdate, ok); err != nil { return err } } if v.InputSchemaUpdate != nil { ok := object.Key("InputSchemaUpdate") if err := awsAwsjson11_serializeDocumentInputSchemaUpdate(v.InputSchemaUpdate, ok); err != nil { return err } } if v.KinesisFirehoseInputUpdate != nil { ok := object.Key("KinesisFirehoseInputUpdate") if err := awsAwsjson11_serializeDocumentKinesisFirehoseInputUpdate(v.KinesisFirehoseInputUpdate, ok); err != nil { return err } } if v.KinesisStreamsInputUpdate != nil { ok := object.Key("KinesisStreamsInputUpdate") if err := awsAwsjson11_serializeDocumentKinesisStreamsInputUpdate(v.KinesisStreamsInputUpdate, ok); err != nil { return err } } if v.NamePrefixUpdate != nil { ok := object.Key("NamePrefixUpdate") ok.String(*v.NamePrefixUpdate) } return nil } func awsAwsjson11_serializeDocumentInputUpdates(v []types.InputUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentInputUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentJSONMappingParameters(v *types.JSONMappingParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RecordRowPath != nil { ok := object.Key("RecordRowPath") ok.String(*v.RecordRowPath) } return nil } func awsAwsjson11_serializeDocumentKinesisFirehoseInput(v *types.KinesisFirehoseInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeDocumentKinesisFirehoseInputUpdate(v *types.KinesisFirehoseInputUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARNUpdate != nil { ok := object.Key("ResourceARNUpdate") ok.String(*v.ResourceARNUpdate) } return nil } func awsAwsjson11_serializeDocumentKinesisFirehoseOutput(v *types.KinesisFirehoseOutput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeDocumentKinesisFirehoseOutputUpdate(v *types.KinesisFirehoseOutputUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARNUpdate != nil { ok := object.Key("ResourceARNUpdate") ok.String(*v.ResourceARNUpdate) } return nil } func awsAwsjson11_serializeDocumentKinesisStreamsInput(v *types.KinesisStreamsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeDocumentKinesisStreamsInputUpdate(v *types.KinesisStreamsInputUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARNUpdate != nil { ok := object.Key("ResourceARNUpdate") ok.String(*v.ResourceARNUpdate) } return nil } func awsAwsjson11_serializeDocumentKinesisStreamsOutput(v *types.KinesisStreamsOutput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeDocumentKinesisStreamsOutputUpdate(v *types.KinesisStreamsOutputUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARNUpdate != nil { ok := object.Key("ResourceARNUpdate") ok.String(*v.ResourceARNUpdate) } return nil } func awsAwsjson11_serializeDocumentLambdaOutput(v *types.LambdaOutput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeDocumentLambdaOutputUpdate(v *types.LambdaOutputUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARNUpdate != nil { ok := object.Key("ResourceARNUpdate") ok.String(*v.ResourceARNUpdate) } return nil } func awsAwsjson11_serializeDocumentMappingParameters(v *types.MappingParameters, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CSVMappingParameters != nil { ok := object.Key("CSVMappingParameters") if err := awsAwsjson11_serializeDocumentCSVMappingParameters(v.CSVMappingParameters, ok); err != nil { return err } } if v.JSONMappingParameters != nil { ok := object.Key("JSONMappingParameters") if err := awsAwsjson11_serializeDocumentJSONMappingParameters(v.JSONMappingParameters, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentMavenReference(v *types.MavenReference, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ArtifactId != nil { ok := object.Key("ArtifactId") ok.String(*v.ArtifactId) } if v.GroupId != nil { ok := object.Key("GroupId") ok.String(*v.GroupId) } if v.Version != nil { ok := object.Key("Version") ok.String(*v.Version) } return nil } func awsAwsjson11_serializeDocumentMonitoringConfiguration(v *types.MonitoringConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ConfigurationType) > 0 { ok := object.Key("ConfigurationType") ok.String(string(v.ConfigurationType)) } if len(v.LogLevel) > 0 { ok := object.Key("LogLevel") ok.String(string(v.LogLevel)) } if len(v.MetricsLevel) > 0 { ok := object.Key("MetricsLevel") ok.String(string(v.MetricsLevel)) } return nil } func awsAwsjson11_serializeDocumentMonitoringConfigurationUpdate(v *types.MonitoringConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ConfigurationTypeUpdate) > 0 { ok := object.Key("ConfigurationTypeUpdate") ok.String(string(v.ConfigurationTypeUpdate)) } if len(v.LogLevelUpdate) > 0 { ok := object.Key("LogLevelUpdate") ok.String(string(v.LogLevelUpdate)) } if len(v.MetricsLevelUpdate) > 0 { ok := object.Key("MetricsLevelUpdate") ok.String(string(v.MetricsLevelUpdate)) } return nil } func awsAwsjson11_serializeDocumentOutput(v *types.Output, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationSchema != nil { ok := object.Key("DestinationSchema") if err := awsAwsjson11_serializeDocumentDestinationSchema(v.DestinationSchema, ok); err != nil { return err } } if v.KinesisFirehoseOutput != nil { ok := object.Key("KinesisFirehoseOutput") if err := awsAwsjson11_serializeDocumentKinesisFirehoseOutput(v.KinesisFirehoseOutput, ok); err != nil { return err } } if v.KinesisStreamsOutput != nil { ok := object.Key("KinesisStreamsOutput") if err := awsAwsjson11_serializeDocumentKinesisStreamsOutput(v.KinesisStreamsOutput, ok); err != nil { return err } } if v.LambdaOutput != nil { ok := object.Key("LambdaOutput") if err := awsAwsjson11_serializeDocumentLambdaOutput(v.LambdaOutput, ok); err != nil { return err } } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } return nil } func awsAwsjson11_serializeDocumentOutputs(v []types.Output, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentOutput(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentOutputUpdate(v *types.OutputUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationSchemaUpdate != nil { ok := object.Key("DestinationSchemaUpdate") if err := awsAwsjson11_serializeDocumentDestinationSchema(v.DestinationSchemaUpdate, ok); err != nil { return err } } if v.KinesisFirehoseOutputUpdate != nil { ok := object.Key("KinesisFirehoseOutputUpdate") if err := awsAwsjson11_serializeDocumentKinesisFirehoseOutputUpdate(v.KinesisFirehoseOutputUpdate, ok); err != nil { return err } } if v.KinesisStreamsOutputUpdate != nil { ok := object.Key("KinesisStreamsOutputUpdate") if err := awsAwsjson11_serializeDocumentKinesisStreamsOutputUpdate(v.KinesisStreamsOutputUpdate, ok); err != nil { return err } } if v.LambdaOutputUpdate != nil { ok := object.Key("LambdaOutputUpdate") if err := awsAwsjson11_serializeDocumentLambdaOutputUpdate(v.LambdaOutputUpdate, ok); err != nil { return err } } if v.NameUpdate != nil { ok := object.Key("NameUpdate") ok.String(*v.NameUpdate) } if v.OutputId != nil { ok := object.Key("OutputId") ok.String(*v.OutputId) } return nil } func awsAwsjson11_serializeDocumentOutputUpdates(v []types.OutputUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentOutputUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentParallelismConfiguration(v *types.ParallelismConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AutoScalingEnabled != nil { ok := object.Key("AutoScalingEnabled") ok.Boolean(*v.AutoScalingEnabled) } if len(v.ConfigurationType) > 0 { ok := object.Key("ConfigurationType") ok.String(string(v.ConfigurationType)) } if v.Parallelism != nil { ok := object.Key("Parallelism") ok.Integer(*v.Parallelism) } if v.ParallelismPerKPU != nil { ok := object.Key("ParallelismPerKPU") ok.Integer(*v.ParallelismPerKPU) } return nil } func awsAwsjson11_serializeDocumentParallelismConfigurationUpdate(v *types.ParallelismConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AutoScalingEnabledUpdate != nil { ok := object.Key("AutoScalingEnabledUpdate") ok.Boolean(*v.AutoScalingEnabledUpdate) } if len(v.ConfigurationTypeUpdate) > 0 { ok := object.Key("ConfigurationTypeUpdate") ok.String(string(v.ConfigurationTypeUpdate)) } if v.ParallelismPerKPUUpdate != nil { ok := object.Key("ParallelismPerKPUUpdate") ok.Integer(*v.ParallelismPerKPUUpdate) } if v.ParallelismUpdate != nil { ok := object.Key("ParallelismUpdate") ok.Integer(*v.ParallelismUpdate) } return nil } func awsAwsjson11_serializeDocumentPropertyGroup(v *types.PropertyGroup, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PropertyGroupId != nil { ok := object.Key("PropertyGroupId") ok.String(*v.PropertyGroupId) } if v.PropertyMap != nil { ok := object.Key("PropertyMap") if err := awsAwsjson11_serializeDocumentPropertyMap(v.PropertyMap, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentPropertyGroups(v []types.PropertyGroup, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentPropertyGroup(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentPropertyMap(v map[string]string, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.String(v[key]) } return nil } func awsAwsjson11_serializeDocumentRecordColumn(v *types.RecordColumn, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Mapping != nil { ok := object.Key("Mapping") ok.String(*v.Mapping) } if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) } if v.SqlType != nil { ok := object.Key("SqlType") ok.String(*v.SqlType) } return nil } func awsAwsjson11_serializeDocumentRecordColumns(v []types.RecordColumn, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentRecordColumn(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRecordFormat(v *types.RecordFormat, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MappingParameters != nil { ok := object.Key("MappingParameters") if err := awsAwsjson11_serializeDocumentMappingParameters(v.MappingParameters, ok); err != nil { return err } } if len(v.RecordFormatType) > 0 { ok := object.Key("RecordFormatType") ok.String(string(v.RecordFormatType)) } return nil } func awsAwsjson11_serializeDocumentReferenceDataSource(v *types.ReferenceDataSource, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ReferenceSchema != nil { ok := object.Key("ReferenceSchema") if err := awsAwsjson11_serializeDocumentSourceSchema(v.ReferenceSchema, ok); err != nil { return err } } if v.S3ReferenceDataSource != nil { ok := object.Key("S3ReferenceDataSource") if err := awsAwsjson11_serializeDocumentS3ReferenceDataSource(v.S3ReferenceDataSource, ok); err != nil { return err } } if v.TableName != nil { ok := object.Key("TableName") ok.String(*v.TableName) } return nil } func awsAwsjson11_serializeDocumentReferenceDataSources(v []types.ReferenceDataSource, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentReferenceDataSource(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentReferenceDataSourceUpdate(v *types.ReferenceDataSourceUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ReferenceId != nil { ok := object.Key("ReferenceId") ok.String(*v.ReferenceId) } if v.ReferenceSchemaUpdate != nil { ok := object.Key("ReferenceSchemaUpdate") if err := awsAwsjson11_serializeDocumentSourceSchema(v.ReferenceSchemaUpdate, ok); err != nil { return err } } if v.S3ReferenceDataSourceUpdate != nil { ok := object.Key("S3ReferenceDataSourceUpdate") if err := awsAwsjson11_serializeDocumentS3ReferenceDataSourceUpdate(v.S3ReferenceDataSourceUpdate, ok); err != nil { return err } } if v.TableNameUpdate != nil { ok := object.Key("TableNameUpdate") ok.String(*v.TableNameUpdate) } return nil } func awsAwsjson11_serializeDocumentReferenceDataSourceUpdates(v []types.ReferenceDataSourceUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentReferenceDataSourceUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRunConfiguration(v *types.RunConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationRestoreConfiguration != nil { ok := object.Key("ApplicationRestoreConfiguration") if err := awsAwsjson11_serializeDocumentApplicationRestoreConfiguration(v.ApplicationRestoreConfiguration, ok); err != nil { return err } } if v.FlinkRunConfiguration != nil { ok := object.Key("FlinkRunConfiguration") if err := awsAwsjson11_serializeDocumentFlinkRunConfiguration(v.FlinkRunConfiguration, ok); err != nil { return err } } if v.SqlRunConfigurations != nil { ok := object.Key("SqlRunConfigurations") if err := awsAwsjson11_serializeDocumentSqlRunConfigurations(v.SqlRunConfigurations, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentRunConfigurationUpdate(v *types.RunConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationRestoreConfiguration != nil { ok := object.Key("ApplicationRestoreConfiguration") if err := awsAwsjson11_serializeDocumentApplicationRestoreConfiguration(v.ApplicationRestoreConfiguration, ok); err != nil { return err } } if v.FlinkRunConfiguration != nil { ok := object.Key("FlinkRunConfiguration") if err := awsAwsjson11_serializeDocumentFlinkRunConfiguration(v.FlinkRunConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentS3Configuration(v *types.S3Configuration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BucketARN != nil { ok := object.Key("BucketARN") ok.String(*v.BucketARN) } if v.FileKey != nil { ok := object.Key("FileKey") ok.String(*v.FileKey) } return nil } func awsAwsjson11_serializeDocumentS3ContentBaseLocation(v *types.S3ContentBaseLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BasePath != nil { ok := object.Key("BasePath") ok.String(*v.BasePath) } if v.BucketARN != nil { ok := object.Key("BucketARN") ok.String(*v.BucketARN) } return nil } func awsAwsjson11_serializeDocumentS3ContentBaseLocationUpdate(v *types.S3ContentBaseLocationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BasePathUpdate != nil { ok := object.Key("BasePathUpdate") ok.String(*v.BasePathUpdate) } if v.BucketARNUpdate != nil { ok := object.Key("BucketARNUpdate") ok.String(*v.BucketARNUpdate) } return nil } func awsAwsjson11_serializeDocumentS3ContentLocation(v *types.S3ContentLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BucketARN != nil { ok := object.Key("BucketARN") ok.String(*v.BucketARN) } if v.FileKey != nil { ok := object.Key("FileKey") ok.String(*v.FileKey) } if v.ObjectVersion != nil { ok := object.Key("ObjectVersion") ok.String(*v.ObjectVersion) } return nil } func awsAwsjson11_serializeDocumentS3ContentLocationUpdate(v *types.S3ContentLocationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BucketARNUpdate != nil { ok := object.Key("BucketARNUpdate") ok.String(*v.BucketARNUpdate) } if v.FileKeyUpdate != nil { ok := object.Key("FileKeyUpdate") ok.String(*v.FileKeyUpdate) } if v.ObjectVersionUpdate != nil { ok := object.Key("ObjectVersionUpdate") ok.String(*v.ObjectVersionUpdate) } return nil } func awsAwsjson11_serializeDocumentS3ReferenceDataSource(v *types.S3ReferenceDataSource, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BucketARN != nil { ok := object.Key("BucketARN") ok.String(*v.BucketARN) } if v.FileKey != nil { ok := object.Key("FileKey") ok.String(*v.FileKey) } return nil } func awsAwsjson11_serializeDocumentS3ReferenceDataSourceUpdate(v *types.S3ReferenceDataSourceUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BucketARNUpdate != nil { ok := object.Key("BucketARNUpdate") ok.String(*v.BucketARNUpdate) } if v.FileKeyUpdate != nil { ok := object.Key("FileKeyUpdate") ok.String(*v.FileKeyUpdate) } return nil } func awsAwsjson11_serializeDocumentSecurityGroupIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentSourceSchema(v *types.SourceSchema, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RecordColumns != nil { ok := object.Key("RecordColumns") if err := awsAwsjson11_serializeDocumentRecordColumns(v.RecordColumns, ok); err != nil { return err } } if v.RecordEncoding != nil { ok := object.Key("RecordEncoding") ok.String(*v.RecordEncoding) } if v.RecordFormat != nil { ok := object.Key("RecordFormat") if err := awsAwsjson11_serializeDocumentRecordFormat(v.RecordFormat, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSqlApplicationConfiguration(v *types.SqlApplicationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Inputs != nil { ok := object.Key("Inputs") if err := awsAwsjson11_serializeDocumentInputs(v.Inputs, ok); err != nil { return err } } if v.Outputs != nil { ok := object.Key("Outputs") if err := awsAwsjson11_serializeDocumentOutputs(v.Outputs, ok); err != nil { return err } } if v.ReferenceDataSources != nil { ok := object.Key("ReferenceDataSources") if err := awsAwsjson11_serializeDocumentReferenceDataSources(v.ReferenceDataSources, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSqlApplicationConfigurationUpdate(v *types.SqlApplicationConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InputUpdates != nil { ok := object.Key("InputUpdates") if err := awsAwsjson11_serializeDocumentInputUpdates(v.InputUpdates, ok); err != nil { return err } } if v.OutputUpdates != nil { ok := object.Key("OutputUpdates") if err := awsAwsjson11_serializeDocumentOutputUpdates(v.OutputUpdates, ok); err != nil { return err } } if v.ReferenceDataSourceUpdates != nil { ok := object.Key("ReferenceDataSourceUpdates") if err := awsAwsjson11_serializeDocumentReferenceDataSourceUpdates(v.ReferenceDataSourceUpdates, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSqlRunConfiguration(v *types.SqlRunConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InputId != nil { ok := object.Key("InputId") ok.String(*v.InputId) } if v.InputStartingPositionConfiguration != nil { ok := object.Key("InputStartingPositionConfiguration") if err := awsAwsjson11_serializeDocumentInputStartingPositionConfiguration(v.InputStartingPositionConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSqlRunConfigurations(v []types.SqlRunConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentSqlRunConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentSubnetIds(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsAwsjson11_serializeDocumentTagKeys(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsAwsjson11_serializeDocumentTags(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentVpcConfiguration(v *types.VpcConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SecurityGroupIds != nil { ok := object.Key("SecurityGroupIds") if err := awsAwsjson11_serializeDocumentSecurityGroupIds(v.SecurityGroupIds, ok); err != nil { return err } } if v.SubnetIds != nil { ok := object.Key("SubnetIds") if err := awsAwsjson11_serializeDocumentSubnetIds(v.SubnetIds, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentVpcConfigurations(v []types.VpcConfiguration, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentVpcConfiguration(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentVpcConfigurationUpdate(v *types.VpcConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.SecurityGroupIdUpdates != nil { ok := object.Key("SecurityGroupIdUpdates") if err := awsAwsjson11_serializeDocumentSecurityGroupIds(v.SecurityGroupIdUpdates, ok); err != nil { return err } } if v.SubnetIdUpdates != nil { ok := object.Key("SubnetIdUpdates") if err := awsAwsjson11_serializeDocumentSubnetIds(v.SubnetIdUpdates, ok); err != nil { return err } } if v.VpcConfigurationId != nil { ok := object.Key("VpcConfigurationId") ok.String(*v.VpcConfigurationId) } return nil } func awsAwsjson11_serializeDocumentVpcConfigurationUpdates(v []types.VpcConfigurationUpdate, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsAwsjson11_serializeDocumentVpcConfigurationUpdate(&v[i], av); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentZeppelinApplicationConfiguration(v *types.ZeppelinApplicationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CatalogConfiguration != nil { ok := object.Key("CatalogConfiguration") if err := awsAwsjson11_serializeDocumentCatalogConfiguration(v.CatalogConfiguration, ok); err != nil { return err } } if v.CustomArtifactsConfiguration != nil { ok := object.Key("CustomArtifactsConfiguration") if err := awsAwsjson11_serializeDocumentCustomArtifactsConfigurationList(v.CustomArtifactsConfiguration, ok); err != nil { return err } } if v.DeployAsApplicationConfiguration != nil { ok := object.Key("DeployAsApplicationConfiguration") if err := awsAwsjson11_serializeDocumentDeployAsApplicationConfiguration(v.DeployAsApplicationConfiguration, ok); err != nil { return err } } if v.MonitoringConfiguration != nil { ok := object.Key("MonitoringConfiguration") if err := awsAwsjson11_serializeDocumentZeppelinMonitoringConfiguration(v.MonitoringConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentZeppelinApplicationConfigurationUpdate(v *types.ZeppelinApplicationConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CatalogConfigurationUpdate != nil { ok := object.Key("CatalogConfigurationUpdate") if err := awsAwsjson11_serializeDocumentCatalogConfigurationUpdate(v.CatalogConfigurationUpdate, ok); err != nil { return err } } if v.CustomArtifactsConfigurationUpdate != nil { ok := object.Key("CustomArtifactsConfigurationUpdate") if err := awsAwsjson11_serializeDocumentCustomArtifactsConfigurationList(v.CustomArtifactsConfigurationUpdate, ok); err != nil { return err } } if v.DeployAsApplicationConfigurationUpdate != nil { ok := object.Key("DeployAsApplicationConfigurationUpdate") if err := awsAwsjson11_serializeDocumentDeployAsApplicationConfigurationUpdate(v.DeployAsApplicationConfigurationUpdate, ok); err != nil { return err } } if v.MonitoringConfigurationUpdate != nil { ok := object.Key("MonitoringConfigurationUpdate") if err := awsAwsjson11_serializeDocumentZeppelinMonitoringConfigurationUpdate(v.MonitoringConfigurationUpdate, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeDocumentZeppelinMonitoringConfiguration(v *types.ZeppelinMonitoringConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.LogLevel) > 0 { ok := object.Key("LogLevel") ok.String(string(v.LogLevel)) } return nil } func awsAwsjson11_serializeDocumentZeppelinMonitoringConfigurationUpdate(v *types.ZeppelinMonitoringConfigurationUpdate, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.LogLevelUpdate) > 0 { ok := object.Key("LogLevelUpdate") ok.String(string(v.LogLevelUpdate)) } return nil } func awsAwsjson11_serializeOpDocumentAddApplicationCloudWatchLoggingOptionInput(v *AddApplicationCloudWatchLoggingOptionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CloudWatchLoggingOption != nil { ok := object.Key("CloudWatchLoggingOption") if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOption(v.CloudWatchLoggingOption, ok); err != nil { return err } } if v.ConditionalToken != nil { ok := object.Key("ConditionalToken") ok.String(*v.ConditionalToken) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } return nil } func awsAwsjson11_serializeOpDocumentAddApplicationInputInput(v *AddApplicationInputInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.Input != nil { ok := object.Key("Input") if err := awsAwsjson11_serializeDocumentInput(v.Input, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentAddApplicationInputProcessingConfigurationInput(v *AddApplicationInputProcessingConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.InputId != nil { ok := object.Key("InputId") ok.String(*v.InputId) } if v.InputProcessingConfiguration != nil { ok := object.Key("InputProcessingConfiguration") if err := awsAwsjson11_serializeDocumentInputProcessingConfiguration(v.InputProcessingConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentAddApplicationOutputInput(v *AddApplicationOutputInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.Output != nil { ok := object.Key("Output") if err := awsAwsjson11_serializeDocumentOutput(v.Output, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentAddApplicationReferenceDataSourceInput(v *AddApplicationReferenceDataSourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.ReferenceDataSource != nil { ok := object.Key("ReferenceDataSource") if err := awsAwsjson11_serializeDocumentReferenceDataSource(v.ReferenceDataSource, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentAddApplicationVpcConfigurationInput(v *AddApplicationVpcConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.ConditionalToken != nil { ok := object.Key("ConditionalToken") ok.String(*v.ConditionalToken) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.VpcConfiguration != nil { ok := object.Key("VpcConfiguration") if err := awsAwsjson11_serializeDocumentVpcConfiguration(v.VpcConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateApplicationInput(v *CreateApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationConfiguration != nil { ok := object.Key("ApplicationConfiguration") if err := awsAwsjson11_serializeDocumentApplicationConfiguration(v.ApplicationConfiguration, ok); err != nil { return err } } if v.ApplicationDescription != nil { ok := object.Key("ApplicationDescription") ok.String(*v.ApplicationDescription) } if len(v.ApplicationMode) > 0 { ok := object.Key("ApplicationMode") ok.String(string(v.ApplicationMode)) } if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CloudWatchLoggingOptions != nil { ok := object.Key("CloudWatchLoggingOptions") if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptions(v.CloudWatchLoggingOptions, ok); err != nil { return err } } if len(v.RuntimeEnvironment) > 0 { ok := object.Key("RuntimeEnvironment") ok.String(string(v.RuntimeEnvironment)) } if v.ServiceExecutionRole != nil { ok := object.Key("ServiceExecutionRole") ok.String(*v.ServiceExecutionRole) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentCreateApplicationPresignedUrlInput(v *CreateApplicationPresignedUrlInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.SessionExpirationDurationInSeconds != nil { ok := object.Key("SessionExpirationDurationInSeconds") ok.Long(*v.SessionExpirationDurationInSeconds) } if len(v.UrlType) > 0 { ok := object.Key("UrlType") ok.String(string(v.UrlType)) } return nil } func awsAwsjson11_serializeOpDocumentCreateApplicationSnapshotInput(v *CreateApplicationSnapshotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.SnapshotName != nil { ok := object.Key("SnapshotName") ok.String(*v.SnapshotName) } return nil } func awsAwsjson11_serializeOpDocumentDeleteApplicationCloudWatchLoggingOptionInput(v *DeleteApplicationCloudWatchLoggingOptionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CloudWatchLoggingOptionId != nil { ok := object.Key("CloudWatchLoggingOptionId") ok.String(*v.CloudWatchLoggingOptionId) } if v.ConditionalToken != nil { ok := object.Key("ConditionalToken") ok.String(*v.ConditionalToken) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteApplicationInput(v *DeleteApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CreateTimestamp != nil { ok := object.Key("CreateTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.CreateTimestamp)) } return nil } func awsAwsjson11_serializeOpDocumentDeleteApplicationInputProcessingConfigurationInput(v *DeleteApplicationInputProcessingConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.InputId != nil { ok := object.Key("InputId") ok.String(*v.InputId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteApplicationOutputInput(v *DeleteApplicationOutputInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.OutputId != nil { ok := object.Key("OutputId") ok.String(*v.OutputId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteApplicationReferenceDataSourceInput(v *DeleteApplicationReferenceDataSourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.ReferenceId != nil { ok := object.Key("ReferenceId") ok.String(*v.ReferenceId) } return nil } func awsAwsjson11_serializeOpDocumentDeleteApplicationSnapshotInput(v *DeleteApplicationSnapshotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.SnapshotCreationTimestamp != nil { ok := object.Key("SnapshotCreationTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.SnapshotCreationTimestamp)) } if v.SnapshotName != nil { ok := object.Key("SnapshotName") ok.String(*v.SnapshotName) } return nil } func awsAwsjson11_serializeOpDocumentDeleteApplicationVpcConfigurationInput(v *DeleteApplicationVpcConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.ConditionalToken != nil { ok := object.Key("ConditionalToken") ok.String(*v.ConditionalToken) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.VpcConfigurationId != nil { ok := object.Key("VpcConfigurationId") ok.String(*v.VpcConfigurationId) } return nil } func awsAwsjson11_serializeOpDocumentDescribeApplicationInput(v *DescribeApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.IncludeAdditionalDetails != nil { ok := object.Key("IncludeAdditionalDetails") ok.Boolean(*v.IncludeAdditionalDetails) } return nil } func awsAwsjson11_serializeOpDocumentDescribeApplicationSnapshotInput(v *DescribeApplicationSnapshotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.SnapshotName != nil { ok := object.Key("SnapshotName") ok.String(*v.SnapshotName) } return nil } func awsAwsjson11_serializeOpDocumentDescribeApplicationVersionInput(v *DescribeApplicationVersionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.ApplicationVersionId != nil { ok := object.Key("ApplicationVersionId") ok.Long(*v.ApplicationVersionId) } return nil } func awsAwsjson11_serializeOpDocumentDiscoverInputSchemaInput(v *DiscoverInputSchemaInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InputProcessingConfiguration != nil { ok := object.Key("InputProcessingConfiguration") if err := awsAwsjson11_serializeDocumentInputProcessingConfiguration(v.InputProcessingConfiguration, ok); err != nil { return err } } if v.InputStartingPositionConfiguration != nil { ok := object.Key("InputStartingPositionConfiguration") if err := awsAwsjson11_serializeDocumentInputStartingPositionConfiguration(v.InputStartingPositionConfiguration, ok); err != nil { return err } } if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.S3Configuration != nil { ok := object.Key("S3Configuration") if err := awsAwsjson11_serializeDocumentS3Configuration(v.S3Configuration, ok); err != nil { return err } } if v.ServiceExecutionRole != nil { ok := object.Key("ServiceExecutionRole") ok.String(*v.ServiceExecutionRole) } return nil } func awsAwsjson11_serializeOpDocumentListApplicationsInput(v *ListApplicationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListApplicationSnapshotsInput(v *ListApplicationSnapshotsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListApplicationVersionsInput(v *ListApplicationVersionsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.Limit != nil { ok := object.Key("Limit") ok.Integer(*v.Limit) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } func awsAwsjson11_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } func awsAwsjson11_serializeOpDocumentRollbackApplicationInput(v *RollbackApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } return nil } func awsAwsjson11_serializeOpDocumentStartApplicationInput(v *StartApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.RunConfiguration != nil { ok := object.Key("RunConfiguration") if err := awsAwsjson11_serializeDocumentRunConfiguration(v.RunConfiguration, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentStopApplicationInput(v *StopApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.Force != nil { ok := object.Key("Force") ok.Boolean(*v.Force) } return nil } func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.Tags != nil { ok := object.Key("Tags") if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.TagKeys != nil { ok := object.Key("TagKeys") if err := awsAwsjson11_serializeDocumentTagKeys(v.TagKeys, ok); err != nil { return err } } return nil } func awsAwsjson11_serializeOpDocumentUpdateApplicationInput(v *UpdateApplicationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationConfigurationUpdate != nil { ok := object.Key("ApplicationConfigurationUpdate") if err := awsAwsjson11_serializeDocumentApplicationConfigurationUpdate(v.ApplicationConfigurationUpdate, ok); err != nil { return err } } if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } if v.CloudWatchLoggingOptionUpdates != nil { ok := object.Key("CloudWatchLoggingOptionUpdates") if err := awsAwsjson11_serializeDocumentCloudWatchLoggingOptionUpdates(v.CloudWatchLoggingOptionUpdates, ok); err != nil { return err } } if v.ConditionalToken != nil { ok := object.Key("ConditionalToken") ok.String(*v.ConditionalToken) } if v.CurrentApplicationVersionId != nil { ok := object.Key("CurrentApplicationVersionId") ok.Long(*v.CurrentApplicationVersionId) } if v.RunConfigurationUpdate != nil { ok := object.Key("RunConfigurationUpdate") if err := awsAwsjson11_serializeDocumentRunConfigurationUpdate(v.RunConfigurationUpdate, ok); err != nil { return err } } if v.ServiceExecutionRoleUpdate != nil { ok := object.Key("ServiceExecutionRoleUpdate") ok.String(*v.ServiceExecutionRoleUpdate) } return nil } func awsAwsjson11_serializeOpDocumentUpdateApplicationMaintenanceConfigurationInput(v *UpdateApplicationMaintenanceConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApplicationMaintenanceConfigurationUpdate != nil { ok := object.Key("ApplicationMaintenanceConfigurationUpdate") if err := awsAwsjson11_serializeDocumentApplicationMaintenanceConfigurationUpdate(v.ApplicationMaintenanceConfigurationUpdate, ok); err != nil { return err } } if v.ApplicationName != nil { ok := object.Key("ApplicationName") ok.String(*v.ApplicationName) } return nil }
4,381
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisanalyticsv2 import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisanalyticsv2/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpAddApplicationCloudWatchLoggingOption struct { } func (*validateOpAddApplicationCloudWatchLoggingOption) ID() string { return "OperationInputValidation" } func (m *validateOpAddApplicationCloudWatchLoggingOption) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddApplicationCloudWatchLoggingOptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddApplicationCloudWatchLoggingOptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddApplicationInput struct { } func (*validateOpAddApplicationInput) ID() string { return "OperationInputValidation" } func (m *validateOpAddApplicationInput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddApplicationInputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddApplicationInputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddApplicationInputProcessingConfiguration struct { } func (*validateOpAddApplicationInputProcessingConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpAddApplicationInputProcessingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddApplicationInputProcessingConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddApplicationInputProcessingConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddApplicationOutput struct { } func (*validateOpAddApplicationOutput) ID() string { return "OperationInputValidation" } func (m *validateOpAddApplicationOutput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddApplicationOutputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddApplicationOutputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddApplicationReferenceDataSource struct { } func (*validateOpAddApplicationReferenceDataSource) ID() string { return "OperationInputValidation" } func (m *validateOpAddApplicationReferenceDataSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddApplicationReferenceDataSourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddApplicationReferenceDataSourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpAddApplicationVpcConfiguration struct { } func (*validateOpAddApplicationVpcConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpAddApplicationVpcConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*AddApplicationVpcConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpAddApplicationVpcConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateApplication struct { } func (*validateOpCreateApplication) ID() string { return "OperationInputValidation" } func (m *validateOpCreateApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateApplicationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateApplicationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateApplicationPresignedUrl struct { } func (*validateOpCreateApplicationPresignedUrl) ID() string { return "OperationInputValidation" } func (m *validateOpCreateApplicationPresignedUrl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateApplicationPresignedUrlInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateApplicationPresignedUrlInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateApplicationSnapshot struct { } func (*validateOpCreateApplicationSnapshot) ID() string { return "OperationInputValidation" } func (m *validateOpCreateApplicationSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateApplicationSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateApplicationSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteApplicationCloudWatchLoggingOption struct { } func (*validateOpDeleteApplicationCloudWatchLoggingOption) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteApplicationCloudWatchLoggingOption) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteApplicationCloudWatchLoggingOptionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteApplicationCloudWatchLoggingOptionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteApplication struct { } func (*validateOpDeleteApplication) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteApplicationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteApplicationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteApplicationInputProcessingConfiguration struct { } func (*validateOpDeleteApplicationInputProcessingConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteApplicationInputProcessingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteApplicationInputProcessingConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteApplicationInputProcessingConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteApplicationOutput struct { } func (*validateOpDeleteApplicationOutput) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteApplicationOutput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteApplicationOutputInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteApplicationOutputInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteApplicationReferenceDataSource struct { } func (*validateOpDeleteApplicationReferenceDataSource) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteApplicationReferenceDataSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteApplicationReferenceDataSourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteApplicationReferenceDataSourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteApplicationSnapshot struct { } func (*validateOpDeleteApplicationSnapshot) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteApplicationSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteApplicationSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteApplicationSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteApplicationVpcConfiguration struct { } func (*validateOpDeleteApplicationVpcConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteApplicationVpcConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteApplicationVpcConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteApplicationVpcConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeApplication struct { } func (*validateOpDescribeApplication) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeApplicationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeApplicationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeApplicationSnapshot struct { } func (*validateOpDescribeApplicationSnapshot) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeApplicationSnapshot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeApplicationSnapshotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeApplicationSnapshotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDescribeApplicationVersion struct { } func (*validateOpDescribeApplicationVersion) ID() string { return "OperationInputValidation" } func (m *validateOpDescribeApplicationVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DescribeApplicationVersionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDescribeApplicationVersionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDiscoverInputSchema struct { } func (*validateOpDiscoverInputSchema) ID() string { return "OperationInputValidation" } func (m *validateOpDiscoverInputSchema) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DiscoverInputSchemaInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDiscoverInputSchemaInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListApplicationSnapshots struct { } func (*validateOpListApplicationSnapshots) ID() string { return "OperationInputValidation" } func (m *validateOpListApplicationSnapshots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListApplicationSnapshotsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListApplicationSnapshotsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListApplicationVersions struct { } func (*validateOpListApplicationVersions) ID() string { return "OperationInputValidation" } func (m *validateOpListApplicationVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListApplicationVersionsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListApplicationVersionsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpRollbackApplication struct { } func (*validateOpRollbackApplication) ID() string { return "OperationInputValidation" } func (m *validateOpRollbackApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*RollbackApplicationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpRollbackApplicationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartApplication struct { } func (*validateOpStartApplication) ID() string { return "OperationInputValidation" } func (m *validateOpStartApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartApplicationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartApplicationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStopApplication struct { } func (*validateOpStopApplication) ID() string { return "OperationInputValidation" } func (m *validateOpStopApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StopApplicationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStopApplicationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateApplication struct { } func (*validateOpUpdateApplication) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateApplicationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateApplicationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateApplicationMaintenanceConfiguration struct { } func (*validateOpUpdateApplicationMaintenanceConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateApplicationMaintenanceConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateApplicationMaintenanceConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateApplicationMaintenanceConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpAddApplicationCloudWatchLoggingOptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddApplicationCloudWatchLoggingOption{}, middleware.After) } func addOpAddApplicationInputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddApplicationInput{}, middleware.After) } func addOpAddApplicationInputProcessingConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddApplicationInputProcessingConfiguration{}, middleware.After) } func addOpAddApplicationOutputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddApplicationOutput{}, middleware.After) } func addOpAddApplicationReferenceDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddApplicationReferenceDataSource{}, middleware.After) } func addOpAddApplicationVpcConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddApplicationVpcConfiguration{}, middleware.After) } func addOpCreateApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateApplication{}, middleware.After) } func addOpCreateApplicationPresignedUrlValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateApplicationPresignedUrl{}, middleware.After) } func addOpCreateApplicationSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateApplicationSnapshot{}, middleware.After) } func addOpDeleteApplicationCloudWatchLoggingOptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApplicationCloudWatchLoggingOption{}, middleware.After) } func addOpDeleteApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApplication{}, middleware.After) } func addOpDeleteApplicationInputProcessingConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApplicationInputProcessingConfiguration{}, middleware.After) } func addOpDeleteApplicationOutputValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApplicationOutput{}, middleware.After) } func addOpDeleteApplicationReferenceDataSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApplicationReferenceDataSource{}, middleware.After) } func addOpDeleteApplicationSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApplicationSnapshot{}, middleware.After) } func addOpDeleteApplicationVpcConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteApplicationVpcConfiguration{}, middleware.After) } func addOpDescribeApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeApplication{}, middleware.After) } func addOpDescribeApplicationSnapshotValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeApplicationSnapshot{}, middleware.After) } func addOpDescribeApplicationVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeApplicationVersion{}, middleware.After) } func addOpDiscoverInputSchemaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDiscoverInputSchema{}, middleware.After) } func addOpListApplicationSnapshotsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListApplicationSnapshots{}, middleware.After) } func addOpListApplicationVersionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListApplicationVersions{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpRollbackApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRollbackApplication{}, middleware.After) } func addOpStartApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartApplication{}, middleware.After) } func addOpStopApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStopApplication{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUpdateApplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateApplication{}, middleware.After) } func addOpUpdateApplicationMaintenanceConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateApplicationMaintenanceConfiguration{}, middleware.After) } func validateApplicationCodeConfiguration(v *types.ApplicationCodeConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplicationCodeConfiguration"} if v.CodeContent != nil { if err := validateCodeContent(v.CodeContent); err != nil { invalidParams.AddNested("CodeContent", err.(smithy.InvalidParamsError)) } } if len(v.CodeContentType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("CodeContentType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateApplicationConfiguration(v *types.ApplicationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplicationConfiguration"} if v.SqlApplicationConfiguration != nil { if err := validateSqlApplicationConfiguration(v.SqlApplicationConfiguration); err != nil { invalidParams.AddNested("SqlApplicationConfiguration", err.(smithy.InvalidParamsError)) } } if v.FlinkApplicationConfiguration != nil { if err := validateFlinkApplicationConfiguration(v.FlinkApplicationConfiguration); err != nil { invalidParams.AddNested("FlinkApplicationConfiguration", err.(smithy.InvalidParamsError)) } } if v.EnvironmentProperties != nil { if err := validateEnvironmentProperties(v.EnvironmentProperties); err != nil { invalidParams.AddNested("EnvironmentProperties", err.(smithy.InvalidParamsError)) } } if v.ApplicationCodeConfiguration != nil { if err := validateApplicationCodeConfiguration(v.ApplicationCodeConfiguration); err != nil { invalidParams.AddNested("ApplicationCodeConfiguration", err.(smithy.InvalidParamsError)) } } if v.ApplicationSnapshotConfiguration != nil { if err := validateApplicationSnapshotConfiguration(v.ApplicationSnapshotConfiguration); err != nil { invalidParams.AddNested("ApplicationSnapshotConfiguration", err.(smithy.InvalidParamsError)) } } if v.VpcConfigurations != nil { if err := validateVpcConfigurations(v.VpcConfigurations); err != nil { invalidParams.AddNested("VpcConfigurations", err.(smithy.InvalidParamsError)) } } if v.ZeppelinApplicationConfiguration != nil { if err := validateZeppelinApplicationConfiguration(v.ZeppelinApplicationConfiguration); err != nil { invalidParams.AddNested("ZeppelinApplicationConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateApplicationConfigurationUpdate(v *types.ApplicationConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplicationConfigurationUpdate"} if v.SqlApplicationConfigurationUpdate != nil { if err := validateSqlApplicationConfigurationUpdate(v.SqlApplicationConfigurationUpdate); err != nil { invalidParams.AddNested("SqlApplicationConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if v.EnvironmentPropertyUpdates != nil { if err := validateEnvironmentPropertyUpdates(v.EnvironmentPropertyUpdates); err != nil { invalidParams.AddNested("EnvironmentPropertyUpdates", err.(smithy.InvalidParamsError)) } } if v.ApplicationSnapshotConfigurationUpdate != nil { if err := validateApplicationSnapshotConfigurationUpdate(v.ApplicationSnapshotConfigurationUpdate); err != nil { invalidParams.AddNested("ApplicationSnapshotConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if v.VpcConfigurationUpdates != nil { if err := validateVpcConfigurationUpdates(v.VpcConfigurationUpdates); err != nil { invalidParams.AddNested("VpcConfigurationUpdates", err.(smithy.InvalidParamsError)) } } if v.ZeppelinApplicationConfigurationUpdate != nil { if err := validateZeppelinApplicationConfigurationUpdate(v.ZeppelinApplicationConfigurationUpdate); err != nil { invalidParams.AddNested("ZeppelinApplicationConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateApplicationMaintenanceConfigurationUpdate(v *types.ApplicationMaintenanceConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplicationMaintenanceConfigurationUpdate"} if v.ApplicationMaintenanceWindowStartTimeUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationMaintenanceWindowStartTimeUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateApplicationRestoreConfiguration(v *types.ApplicationRestoreConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplicationRestoreConfiguration"} if len(v.ApplicationRestoreType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ApplicationRestoreType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateApplicationSnapshotConfiguration(v *types.ApplicationSnapshotConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplicationSnapshotConfiguration"} if v.SnapshotsEnabled == nil { invalidParams.Add(smithy.NewErrParamRequired("SnapshotsEnabled")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateApplicationSnapshotConfigurationUpdate(v *types.ApplicationSnapshotConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ApplicationSnapshotConfigurationUpdate"} if v.SnapshotsEnabledUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("SnapshotsEnabledUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCatalogConfiguration(v *types.CatalogConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CatalogConfiguration"} if v.GlueDataCatalogConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("GlueDataCatalogConfiguration")) } else if v.GlueDataCatalogConfiguration != nil { if err := validateGlueDataCatalogConfiguration(v.GlueDataCatalogConfiguration); err != nil { invalidParams.AddNested("GlueDataCatalogConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCatalogConfigurationUpdate(v *types.CatalogConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CatalogConfigurationUpdate"} if v.GlueDataCatalogConfigurationUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("GlueDataCatalogConfigurationUpdate")) } else if v.GlueDataCatalogConfigurationUpdate != nil { if err := validateGlueDataCatalogConfigurationUpdate(v.GlueDataCatalogConfigurationUpdate); err != nil { invalidParams.AddNested("GlueDataCatalogConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCheckpointConfiguration(v *types.CheckpointConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CheckpointConfiguration"} if len(v.ConfigurationType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ConfigurationType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCloudWatchLoggingOption(v *types.CloudWatchLoggingOption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CloudWatchLoggingOption"} if v.LogStreamARN == nil { invalidParams.Add(smithy.NewErrParamRequired("LogStreamARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCloudWatchLoggingOptions(v []types.CloudWatchLoggingOption) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CloudWatchLoggingOptions"} for i := range v { if err := validateCloudWatchLoggingOption(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCloudWatchLoggingOptionUpdate(v *types.CloudWatchLoggingOptionUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CloudWatchLoggingOptionUpdate"} if v.CloudWatchLoggingOptionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CloudWatchLoggingOptionId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCloudWatchLoggingOptionUpdates(v []types.CloudWatchLoggingOptionUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CloudWatchLoggingOptionUpdates"} for i := range v { if err := validateCloudWatchLoggingOptionUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCodeContent(v *types.CodeContent) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CodeContent"} if v.S3ContentLocation != nil { if err := validateS3ContentLocation(v.S3ContentLocation); err != nil { invalidParams.AddNested("S3ContentLocation", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCSVMappingParameters(v *types.CSVMappingParameters) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CSVMappingParameters"} if v.RecordRowDelimiter == nil { invalidParams.Add(smithy.NewErrParamRequired("RecordRowDelimiter")) } if v.RecordColumnDelimiter == nil { invalidParams.Add(smithy.NewErrParamRequired("RecordColumnDelimiter")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCustomArtifactConfiguration(v *types.CustomArtifactConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CustomArtifactConfiguration"} if len(v.ArtifactType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ArtifactType")) } if v.S3ContentLocation != nil { if err := validateS3ContentLocation(v.S3ContentLocation); err != nil { invalidParams.AddNested("S3ContentLocation", err.(smithy.InvalidParamsError)) } } if v.MavenReference != nil { if err := validateMavenReference(v.MavenReference); err != nil { invalidParams.AddNested("MavenReference", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateCustomArtifactsConfigurationList(v []types.CustomArtifactConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CustomArtifactsConfigurationList"} for i := range v { if err := validateCustomArtifactConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDeployAsApplicationConfiguration(v *types.DeployAsApplicationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeployAsApplicationConfiguration"} if v.S3ContentLocation == nil { invalidParams.Add(smithy.NewErrParamRequired("S3ContentLocation")) } else if v.S3ContentLocation != nil { if err := validateS3ContentBaseLocation(v.S3ContentLocation); err != nil { invalidParams.AddNested("S3ContentLocation", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateDestinationSchema(v *types.DestinationSchema) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DestinationSchema"} if len(v.RecordFormatType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RecordFormatType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEnvironmentProperties(v *types.EnvironmentProperties) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EnvironmentProperties"} if v.PropertyGroups == nil { invalidParams.Add(smithy.NewErrParamRequired("PropertyGroups")) } else if v.PropertyGroups != nil { if err := validatePropertyGroups(v.PropertyGroups); err != nil { invalidParams.AddNested("PropertyGroups", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateEnvironmentPropertyUpdates(v *types.EnvironmentPropertyUpdates) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EnvironmentPropertyUpdates"} if v.PropertyGroups == nil { invalidParams.Add(smithy.NewErrParamRequired("PropertyGroups")) } else if v.PropertyGroups != nil { if err := validatePropertyGroups(v.PropertyGroups); err != nil { invalidParams.AddNested("PropertyGroups", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFlinkApplicationConfiguration(v *types.FlinkApplicationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FlinkApplicationConfiguration"} if v.CheckpointConfiguration != nil { if err := validateCheckpointConfiguration(v.CheckpointConfiguration); err != nil { invalidParams.AddNested("CheckpointConfiguration", err.(smithy.InvalidParamsError)) } } if v.MonitoringConfiguration != nil { if err := validateMonitoringConfiguration(v.MonitoringConfiguration); err != nil { invalidParams.AddNested("MonitoringConfiguration", err.(smithy.InvalidParamsError)) } } if v.ParallelismConfiguration != nil { if err := validateParallelismConfiguration(v.ParallelismConfiguration); err != nil { invalidParams.AddNested("ParallelismConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGlueDataCatalogConfiguration(v *types.GlueDataCatalogConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GlueDataCatalogConfiguration"} if v.DatabaseARN == nil { invalidParams.Add(smithy.NewErrParamRequired("DatabaseARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateGlueDataCatalogConfigurationUpdate(v *types.GlueDataCatalogConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GlueDataCatalogConfigurationUpdate"} if v.DatabaseARNUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("DatabaseARNUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInput(v *types.Input) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Input"} if v.NamePrefix == nil { invalidParams.Add(smithy.NewErrParamRequired("NamePrefix")) } if v.InputProcessingConfiguration != nil { if err := validateInputProcessingConfiguration(v.InputProcessingConfiguration); err != nil { invalidParams.AddNested("InputProcessingConfiguration", err.(smithy.InvalidParamsError)) } } if v.KinesisStreamsInput != nil { if err := validateKinesisStreamsInput(v.KinesisStreamsInput); err != nil { invalidParams.AddNested("KinesisStreamsInput", err.(smithy.InvalidParamsError)) } } if v.KinesisFirehoseInput != nil { if err := validateKinesisFirehoseInput(v.KinesisFirehoseInput); err != nil { invalidParams.AddNested("KinesisFirehoseInput", err.(smithy.InvalidParamsError)) } } if v.InputSchema == nil { invalidParams.Add(smithy.NewErrParamRequired("InputSchema")) } else if v.InputSchema != nil { if err := validateSourceSchema(v.InputSchema); err != nil { invalidParams.AddNested("InputSchema", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputLambdaProcessor(v *types.InputLambdaProcessor) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputLambdaProcessor"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputLambdaProcessorUpdate(v *types.InputLambdaProcessorUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputLambdaProcessorUpdate"} if v.ResourceARNUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARNUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputParallelismUpdate(v *types.InputParallelismUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputParallelismUpdate"} if v.CountUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("CountUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputProcessingConfiguration(v *types.InputProcessingConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputProcessingConfiguration"} if v.InputLambdaProcessor == nil { invalidParams.Add(smithy.NewErrParamRequired("InputLambdaProcessor")) } else if v.InputLambdaProcessor != nil { if err := validateInputLambdaProcessor(v.InputLambdaProcessor); err != nil { invalidParams.AddNested("InputLambdaProcessor", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputProcessingConfigurationUpdate(v *types.InputProcessingConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputProcessingConfigurationUpdate"} if v.InputLambdaProcessorUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("InputLambdaProcessorUpdate")) } else if v.InputLambdaProcessorUpdate != nil { if err := validateInputLambdaProcessorUpdate(v.InputLambdaProcessorUpdate); err != nil { invalidParams.AddNested("InputLambdaProcessorUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputs(v []types.Input) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Inputs"} for i := range v { if err := validateInput(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputSchemaUpdate(v *types.InputSchemaUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputSchemaUpdate"} if v.RecordFormatUpdate != nil { if err := validateRecordFormat(v.RecordFormatUpdate); err != nil { invalidParams.AddNested("RecordFormatUpdate", err.(smithy.InvalidParamsError)) } } if v.RecordColumnUpdates != nil { if err := validateRecordColumns(v.RecordColumnUpdates); err != nil { invalidParams.AddNested("RecordColumnUpdates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputUpdate(v *types.InputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputUpdate"} if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if v.InputProcessingConfigurationUpdate != nil { if err := validateInputProcessingConfigurationUpdate(v.InputProcessingConfigurationUpdate); err != nil { invalidParams.AddNested("InputProcessingConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if v.KinesisStreamsInputUpdate != nil { if err := validateKinesisStreamsInputUpdate(v.KinesisStreamsInputUpdate); err != nil { invalidParams.AddNested("KinesisStreamsInputUpdate", err.(smithy.InvalidParamsError)) } } if v.KinesisFirehoseInputUpdate != nil { if err := validateKinesisFirehoseInputUpdate(v.KinesisFirehoseInputUpdate); err != nil { invalidParams.AddNested("KinesisFirehoseInputUpdate", err.(smithy.InvalidParamsError)) } } if v.InputSchemaUpdate != nil { if err := validateInputSchemaUpdate(v.InputSchemaUpdate); err != nil { invalidParams.AddNested("InputSchemaUpdate", err.(smithy.InvalidParamsError)) } } if v.InputParallelismUpdate != nil { if err := validateInputParallelismUpdate(v.InputParallelismUpdate); err != nil { invalidParams.AddNested("InputParallelismUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateInputUpdates(v []types.InputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "InputUpdates"} for i := range v { if err := validateInputUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateJSONMappingParameters(v *types.JSONMappingParameters) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "JSONMappingParameters"} if v.RecordRowPath == nil { invalidParams.Add(smithy.NewErrParamRequired("RecordRowPath")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisFirehoseInput(v *types.KinesisFirehoseInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisFirehoseInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisFirehoseInputUpdate(v *types.KinesisFirehoseInputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisFirehoseInputUpdate"} if v.ResourceARNUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARNUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisFirehoseOutput(v *types.KinesisFirehoseOutput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisFirehoseOutput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisFirehoseOutputUpdate(v *types.KinesisFirehoseOutputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisFirehoseOutputUpdate"} if v.ResourceARNUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARNUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisStreamsInput(v *types.KinesisStreamsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisStreamsInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisStreamsInputUpdate(v *types.KinesisStreamsInputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisStreamsInputUpdate"} if v.ResourceARNUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARNUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisStreamsOutput(v *types.KinesisStreamsOutput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisStreamsOutput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateKinesisStreamsOutputUpdate(v *types.KinesisStreamsOutputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "KinesisStreamsOutputUpdate"} if v.ResourceARNUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARNUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateLambdaOutput(v *types.LambdaOutput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LambdaOutput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateLambdaOutputUpdate(v *types.LambdaOutputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "LambdaOutputUpdate"} if v.ResourceARNUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARNUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMappingParameters(v *types.MappingParameters) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MappingParameters"} if v.JSONMappingParameters != nil { if err := validateJSONMappingParameters(v.JSONMappingParameters); err != nil { invalidParams.AddNested("JSONMappingParameters", err.(smithy.InvalidParamsError)) } } if v.CSVMappingParameters != nil { if err := validateCSVMappingParameters(v.CSVMappingParameters); err != nil { invalidParams.AddNested("CSVMappingParameters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMavenReference(v *types.MavenReference) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MavenReference"} if v.GroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("GroupId")) } if v.ArtifactId == nil { invalidParams.Add(smithy.NewErrParamRequired("ArtifactId")) } if v.Version == nil { invalidParams.Add(smithy.NewErrParamRequired("Version")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMonitoringConfiguration(v *types.MonitoringConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MonitoringConfiguration"} if len(v.ConfigurationType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ConfigurationType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutput(v *types.Output) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Output"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.KinesisStreamsOutput != nil { if err := validateKinesisStreamsOutput(v.KinesisStreamsOutput); err != nil { invalidParams.AddNested("KinesisStreamsOutput", err.(smithy.InvalidParamsError)) } } if v.KinesisFirehoseOutput != nil { if err := validateKinesisFirehoseOutput(v.KinesisFirehoseOutput); err != nil { invalidParams.AddNested("KinesisFirehoseOutput", err.(smithy.InvalidParamsError)) } } if v.LambdaOutput != nil { if err := validateLambdaOutput(v.LambdaOutput); err != nil { invalidParams.AddNested("LambdaOutput", err.(smithy.InvalidParamsError)) } } if v.DestinationSchema == nil { invalidParams.Add(smithy.NewErrParamRequired("DestinationSchema")) } else if v.DestinationSchema != nil { if err := validateDestinationSchema(v.DestinationSchema); err != nil { invalidParams.AddNested("DestinationSchema", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutputs(v []types.Output) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Outputs"} for i := range v { if err := validateOutput(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutputUpdate(v *types.OutputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OutputUpdate"} if v.OutputId == nil { invalidParams.Add(smithy.NewErrParamRequired("OutputId")) } if v.KinesisStreamsOutputUpdate != nil { if err := validateKinesisStreamsOutputUpdate(v.KinesisStreamsOutputUpdate); err != nil { invalidParams.AddNested("KinesisStreamsOutputUpdate", err.(smithy.InvalidParamsError)) } } if v.KinesisFirehoseOutputUpdate != nil { if err := validateKinesisFirehoseOutputUpdate(v.KinesisFirehoseOutputUpdate); err != nil { invalidParams.AddNested("KinesisFirehoseOutputUpdate", err.(smithy.InvalidParamsError)) } } if v.LambdaOutputUpdate != nil { if err := validateLambdaOutputUpdate(v.LambdaOutputUpdate); err != nil { invalidParams.AddNested("LambdaOutputUpdate", err.(smithy.InvalidParamsError)) } } if v.DestinationSchemaUpdate != nil { if err := validateDestinationSchema(v.DestinationSchemaUpdate); err != nil { invalidParams.AddNested("DestinationSchemaUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOutputUpdates(v []types.OutputUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "OutputUpdates"} for i := range v { if err := validateOutputUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateParallelismConfiguration(v *types.ParallelismConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ParallelismConfiguration"} if len(v.ConfigurationType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ConfigurationType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePropertyGroup(v *types.PropertyGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PropertyGroup"} if v.PropertyGroupId == nil { invalidParams.Add(smithy.NewErrParamRequired("PropertyGroupId")) } if v.PropertyMap == nil { invalidParams.Add(smithy.NewErrParamRequired("PropertyMap")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validatePropertyGroups(v []types.PropertyGroup) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "PropertyGroups"} for i := range v { if err := validatePropertyGroup(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRecordColumn(v *types.RecordColumn) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RecordColumn"} if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } if v.SqlType == nil { invalidParams.Add(smithy.NewErrParamRequired("SqlType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRecordColumns(v []types.RecordColumn) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RecordColumns"} for i := range v { if err := validateRecordColumn(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRecordFormat(v *types.RecordFormat) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RecordFormat"} if len(v.RecordFormatType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RecordFormatType")) } if v.MappingParameters != nil { if err := validateMappingParameters(v.MappingParameters); err != nil { invalidParams.AddNested("MappingParameters", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateReferenceDataSource(v *types.ReferenceDataSource) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ReferenceDataSource"} if v.TableName == nil { invalidParams.Add(smithy.NewErrParamRequired("TableName")) } if v.ReferenceSchema == nil { invalidParams.Add(smithy.NewErrParamRequired("ReferenceSchema")) } else if v.ReferenceSchema != nil { if err := validateSourceSchema(v.ReferenceSchema); err != nil { invalidParams.AddNested("ReferenceSchema", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateReferenceDataSources(v []types.ReferenceDataSource) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ReferenceDataSources"} for i := range v { if err := validateReferenceDataSource(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateReferenceDataSourceUpdate(v *types.ReferenceDataSourceUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ReferenceDataSourceUpdate"} if v.ReferenceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ReferenceId")) } if v.ReferenceSchemaUpdate != nil { if err := validateSourceSchema(v.ReferenceSchemaUpdate); err != nil { invalidParams.AddNested("ReferenceSchemaUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateReferenceDataSourceUpdates(v []types.ReferenceDataSourceUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ReferenceDataSourceUpdates"} for i := range v { if err := validateReferenceDataSourceUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRunConfiguration(v *types.RunConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RunConfiguration"} if v.SqlRunConfigurations != nil { if err := validateSqlRunConfigurations(v.SqlRunConfigurations); err != nil { invalidParams.AddNested("SqlRunConfigurations", err.(smithy.InvalidParamsError)) } } if v.ApplicationRestoreConfiguration != nil { if err := validateApplicationRestoreConfiguration(v.ApplicationRestoreConfiguration); err != nil { invalidParams.AddNested("ApplicationRestoreConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRunConfigurationUpdate(v *types.RunConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RunConfigurationUpdate"} if v.ApplicationRestoreConfiguration != nil { if err := validateApplicationRestoreConfiguration(v.ApplicationRestoreConfiguration); err != nil { invalidParams.AddNested("ApplicationRestoreConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateS3Configuration(v *types.S3Configuration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "S3Configuration"} if v.BucketARN == nil { invalidParams.Add(smithy.NewErrParamRequired("BucketARN")) } if v.FileKey == nil { invalidParams.Add(smithy.NewErrParamRequired("FileKey")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateS3ContentBaseLocation(v *types.S3ContentBaseLocation) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "S3ContentBaseLocation"} if v.BucketARN == nil { invalidParams.Add(smithy.NewErrParamRequired("BucketARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateS3ContentLocation(v *types.S3ContentLocation) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "S3ContentLocation"} if v.BucketARN == nil { invalidParams.Add(smithy.NewErrParamRequired("BucketARN")) } if v.FileKey == nil { invalidParams.Add(smithy.NewErrParamRequired("FileKey")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSourceSchema(v *types.SourceSchema) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SourceSchema"} if v.RecordFormat == nil { invalidParams.Add(smithy.NewErrParamRequired("RecordFormat")) } else if v.RecordFormat != nil { if err := validateRecordFormat(v.RecordFormat); err != nil { invalidParams.AddNested("RecordFormat", err.(smithy.InvalidParamsError)) } } if v.RecordColumns == nil { invalidParams.Add(smithy.NewErrParamRequired("RecordColumns")) } else if v.RecordColumns != nil { if err := validateRecordColumns(v.RecordColumns); err != nil { invalidParams.AddNested("RecordColumns", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSqlApplicationConfiguration(v *types.SqlApplicationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SqlApplicationConfiguration"} if v.Inputs != nil { if err := validateInputs(v.Inputs); err != nil { invalidParams.AddNested("Inputs", err.(smithy.InvalidParamsError)) } } if v.Outputs != nil { if err := validateOutputs(v.Outputs); err != nil { invalidParams.AddNested("Outputs", err.(smithy.InvalidParamsError)) } } if v.ReferenceDataSources != nil { if err := validateReferenceDataSources(v.ReferenceDataSources); err != nil { invalidParams.AddNested("ReferenceDataSources", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSqlApplicationConfigurationUpdate(v *types.SqlApplicationConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SqlApplicationConfigurationUpdate"} if v.InputUpdates != nil { if err := validateInputUpdates(v.InputUpdates); err != nil { invalidParams.AddNested("InputUpdates", err.(smithy.InvalidParamsError)) } } if v.OutputUpdates != nil { if err := validateOutputUpdates(v.OutputUpdates); err != nil { invalidParams.AddNested("OutputUpdates", err.(smithy.InvalidParamsError)) } } if v.ReferenceDataSourceUpdates != nil { if err := validateReferenceDataSourceUpdates(v.ReferenceDataSourceUpdates); err != nil { invalidParams.AddNested("ReferenceDataSourceUpdates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSqlRunConfiguration(v *types.SqlRunConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SqlRunConfiguration"} if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if v.InputStartingPositionConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("InputStartingPositionConfiguration")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateSqlRunConfigurations(v []types.SqlRunConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "SqlRunConfigurations"} for i := range v { if err := validateSqlRunConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTags(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tags"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateVpcConfiguration(v *types.VpcConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "VpcConfiguration"} if v.SubnetIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SubnetIds")) } if v.SecurityGroupIds == nil { invalidParams.Add(smithy.NewErrParamRequired("SecurityGroupIds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateVpcConfigurations(v []types.VpcConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "VpcConfigurations"} for i := range v { if err := validateVpcConfiguration(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateVpcConfigurationUpdate(v *types.VpcConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "VpcConfigurationUpdate"} if v.VpcConfigurationId == nil { invalidParams.Add(smithy.NewErrParamRequired("VpcConfigurationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateVpcConfigurationUpdates(v []types.VpcConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "VpcConfigurationUpdates"} for i := range v { if err := validateVpcConfigurationUpdate(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateZeppelinApplicationConfiguration(v *types.ZeppelinApplicationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ZeppelinApplicationConfiguration"} if v.MonitoringConfiguration != nil { if err := validateZeppelinMonitoringConfiguration(v.MonitoringConfiguration); err != nil { invalidParams.AddNested("MonitoringConfiguration", err.(smithy.InvalidParamsError)) } } if v.CatalogConfiguration != nil { if err := validateCatalogConfiguration(v.CatalogConfiguration); err != nil { invalidParams.AddNested("CatalogConfiguration", err.(smithy.InvalidParamsError)) } } if v.DeployAsApplicationConfiguration != nil { if err := validateDeployAsApplicationConfiguration(v.DeployAsApplicationConfiguration); err != nil { invalidParams.AddNested("DeployAsApplicationConfiguration", err.(smithy.InvalidParamsError)) } } if v.CustomArtifactsConfiguration != nil { if err := validateCustomArtifactsConfigurationList(v.CustomArtifactsConfiguration); err != nil { invalidParams.AddNested("CustomArtifactsConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateZeppelinApplicationConfigurationUpdate(v *types.ZeppelinApplicationConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ZeppelinApplicationConfigurationUpdate"} if v.MonitoringConfigurationUpdate != nil { if err := validateZeppelinMonitoringConfigurationUpdate(v.MonitoringConfigurationUpdate); err != nil { invalidParams.AddNested("MonitoringConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if v.CatalogConfigurationUpdate != nil { if err := validateCatalogConfigurationUpdate(v.CatalogConfigurationUpdate); err != nil { invalidParams.AddNested("CatalogConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if v.CustomArtifactsConfigurationUpdate != nil { if err := validateCustomArtifactsConfigurationList(v.CustomArtifactsConfigurationUpdate); err != nil { invalidParams.AddNested("CustomArtifactsConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateZeppelinMonitoringConfiguration(v *types.ZeppelinMonitoringConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ZeppelinMonitoringConfiguration"} if len(v.LogLevel) == 0 { invalidParams.Add(smithy.NewErrParamRequired("LogLevel")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateZeppelinMonitoringConfigurationUpdate(v *types.ZeppelinMonitoringConfigurationUpdate) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ZeppelinMonitoringConfigurationUpdate"} if len(v.LogLevelUpdate) == 0 { invalidParams.Add(smithy.NewErrParamRequired("LogLevelUpdate")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddApplicationCloudWatchLoggingOptionInput(v *AddApplicationCloudWatchLoggingOptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddApplicationCloudWatchLoggingOptionInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CloudWatchLoggingOption == nil { invalidParams.Add(smithy.NewErrParamRequired("CloudWatchLoggingOption")) } else if v.CloudWatchLoggingOption != nil { if err := validateCloudWatchLoggingOption(v.CloudWatchLoggingOption); err != nil { invalidParams.AddNested("CloudWatchLoggingOption", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddApplicationInputInput(v *AddApplicationInputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddApplicationInputInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if v.Input == nil { invalidParams.Add(smithy.NewErrParamRequired("Input")) } else if v.Input != nil { if err := validateInput(v.Input); err != nil { invalidParams.AddNested("Input", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddApplicationInputProcessingConfigurationInput(v *AddApplicationInputProcessingConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddApplicationInputProcessingConfigurationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if v.InputProcessingConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("InputProcessingConfiguration")) } else if v.InputProcessingConfiguration != nil { if err := validateInputProcessingConfiguration(v.InputProcessingConfiguration); err != nil { invalidParams.AddNested("InputProcessingConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddApplicationOutputInput(v *AddApplicationOutputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddApplicationOutputInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if v.Output == nil { invalidParams.Add(smithy.NewErrParamRequired("Output")) } else if v.Output != nil { if err := validateOutput(v.Output); err != nil { invalidParams.AddNested("Output", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddApplicationReferenceDataSourceInput(v *AddApplicationReferenceDataSourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddApplicationReferenceDataSourceInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if v.ReferenceDataSource == nil { invalidParams.Add(smithy.NewErrParamRequired("ReferenceDataSource")) } else if v.ReferenceDataSource != nil { if err := validateReferenceDataSource(v.ReferenceDataSource); err != nil { invalidParams.AddNested("ReferenceDataSource", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpAddApplicationVpcConfigurationInput(v *AddApplicationVpcConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "AddApplicationVpcConfigurationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.VpcConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("VpcConfiguration")) } else if v.VpcConfiguration != nil { if err := validateVpcConfiguration(v.VpcConfiguration); err != nil { invalidParams.AddNested("VpcConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateApplicationInput(v *CreateApplicationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateApplicationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if len(v.RuntimeEnvironment) == 0 { invalidParams.Add(smithy.NewErrParamRequired("RuntimeEnvironment")) } if v.ServiceExecutionRole == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceExecutionRole")) } if v.ApplicationConfiguration != nil { if err := validateApplicationConfiguration(v.ApplicationConfiguration); err != nil { invalidParams.AddNested("ApplicationConfiguration", err.(smithy.InvalidParamsError)) } } if v.CloudWatchLoggingOptions != nil { if err := validateCloudWatchLoggingOptions(v.CloudWatchLoggingOptions); err != nil { invalidParams.AddNested("CloudWatchLoggingOptions", err.(smithy.InvalidParamsError)) } } if v.Tags != nil { if err := validateTags(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateApplicationPresignedUrlInput(v *CreateApplicationPresignedUrlInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateApplicationPresignedUrlInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if len(v.UrlType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("UrlType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateApplicationSnapshotInput(v *CreateApplicationSnapshotInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateApplicationSnapshotInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.SnapshotName == nil { invalidParams.Add(smithy.NewErrParamRequired("SnapshotName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteApplicationCloudWatchLoggingOptionInput(v *DeleteApplicationCloudWatchLoggingOptionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationCloudWatchLoggingOptionInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CloudWatchLoggingOptionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CloudWatchLoggingOptionId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteApplicationInput(v *DeleteApplicationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CreateTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("CreateTimestamp")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteApplicationInputProcessingConfigurationInput(v *DeleteApplicationInputProcessingConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationInputProcessingConfigurationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if v.InputId == nil { invalidParams.Add(smithy.NewErrParamRequired("InputId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteApplicationOutputInput(v *DeleteApplicationOutputInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationOutputInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if v.OutputId == nil { invalidParams.Add(smithy.NewErrParamRequired("OutputId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteApplicationReferenceDataSourceInput(v *DeleteApplicationReferenceDataSourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationReferenceDataSourceInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if v.ReferenceId == nil { invalidParams.Add(smithy.NewErrParamRequired("ReferenceId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteApplicationSnapshotInput(v *DeleteApplicationSnapshotInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationSnapshotInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.SnapshotName == nil { invalidParams.Add(smithy.NewErrParamRequired("SnapshotName")) } if v.SnapshotCreationTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("SnapshotCreationTimestamp")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteApplicationVpcConfigurationInput(v *DeleteApplicationVpcConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteApplicationVpcConfigurationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.VpcConfigurationId == nil { invalidParams.Add(smithy.NewErrParamRequired("VpcConfigurationId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeApplicationInput(v *DescribeApplicationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeApplicationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeApplicationSnapshotInput(v *DescribeApplicationSnapshotInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeApplicationSnapshotInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.SnapshotName == nil { invalidParams.Add(smithy.NewErrParamRequired("SnapshotName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDescribeApplicationVersionInput(v *DescribeApplicationVersionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DescribeApplicationVersionInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.ApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationVersionId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDiscoverInputSchemaInput(v *DiscoverInputSchemaInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DiscoverInputSchemaInput"} if v.ServiceExecutionRole == nil { invalidParams.Add(smithy.NewErrParamRequired("ServiceExecutionRole")) } if v.S3Configuration != nil { if err := validateS3Configuration(v.S3Configuration); err != nil { invalidParams.AddNested("S3Configuration", err.(smithy.InvalidParamsError)) } } if v.InputProcessingConfiguration != nil { if err := validateInputProcessingConfiguration(v.InputProcessingConfiguration); err != nil { invalidParams.AddNested("InputProcessingConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListApplicationSnapshotsInput(v *ListApplicationSnapshotsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListApplicationSnapshotsInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListApplicationVersionsInput(v *ListApplicationVersionsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListApplicationVersionsInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpRollbackApplicationInput(v *RollbackApplicationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RollbackApplicationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.CurrentApplicationVersionId == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentApplicationVersionId")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartApplicationInput(v *StartApplicationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartApplicationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.RunConfiguration != nil { if err := validateRunConfiguration(v.RunConfiguration); err != nil { invalidParams.AddNested("RunConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStopApplicationInput(v *StopApplicationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StopApplicationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTags(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.TagKeys == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateApplicationInput(v *UpdateApplicationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateApplicationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.ApplicationConfigurationUpdate != nil { if err := validateApplicationConfigurationUpdate(v.ApplicationConfigurationUpdate); err != nil { invalidParams.AddNested("ApplicationConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if v.RunConfigurationUpdate != nil { if err := validateRunConfigurationUpdate(v.RunConfigurationUpdate); err != nil { invalidParams.AddNested("RunConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if v.CloudWatchLoggingOptionUpdates != nil { if err := validateCloudWatchLoggingOptionUpdates(v.CloudWatchLoggingOptionUpdates); err != nil { invalidParams.AddNested("CloudWatchLoggingOptionUpdates", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateApplicationMaintenanceConfigurationInput(v *UpdateApplicationMaintenanceConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateApplicationMaintenanceConfigurationInput"} if v.ApplicationName == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationName")) } if v.ApplicationMaintenanceConfigurationUpdate == nil { invalidParams.Add(smithy.NewErrParamRequired("ApplicationMaintenanceConfigurationUpdate")) } else if v.ApplicationMaintenanceConfigurationUpdate != nil { if err := validateApplicationMaintenanceConfigurationUpdate(v.ApplicationMaintenanceConfigurationUpdate); err != nil { invalidParams.AddNested("ApplicationMaintenanceConfigurationUpdate", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
2,961
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver Kinesis Analytics V2 endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisanalytics.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisanalytics-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisanalytics-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisanalytics.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisanalytics.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisanalytics-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisanalytics-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisanalytics.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "cn-northwest-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisanalytics-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisanalytics.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisanalytics-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisanalytics.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisanalytics-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisanalytics.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisanalytics-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisanalytics.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisanalytics.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisanalytics-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisanalytics-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisanalytics.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "us-gov-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, }, }, }
396
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type ApplicationMode string // Enum values for ApplicationMode const ( ApplicationModeStreaming ApplicationMode = "STREAMING" ApplicationModeInteractive ApplicationMode = "INTERACTIVE" ) // Values returns all known values for ApplicationMode. 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 (ApplicationMode) Values() []ApplicationMode { return []ApplicationMode{ "STREAMING", "INTERACTIVE", } } type ApplicationRestoreType string // Enum values for ApplicationRestoreType const ( ApplicationRestoreTypeSkipRestoreFromSnapshot ApplicationRestoreType = "SKIP_RESTORE_FROM_SNAPSHOT" ApplicationRestoreTypeRestoreFromLatestSnapshot ApplicationRestoreType = "RESTORE_FROM_LATEST_SNAPSHOT" ApplicationRestoreTypeRestoreFromCustomSnapshot ApplicationRestoreType = "RESTORE_FROM_CUSTOM_SNAPSHOT" ) // Values returns all known values for ApplicationRestoreType. 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 (ApplicationRestoreType) Values() []ApplicationRestoreType { return []ApplicationRestoreType{ "SKIP_RESTORE_FROM_SNAPSHOT", "RESTORE_FROM_LATEST_SNAPSHOT", "RESTORE_FROM_CUSTOM_SNAPSHOT", } } type ApplicationStatus string // Enum values for ApplicationStatus const ( ApplicationStatusDeleting ApplicationStatus = "DELETING" ApplicationStatusStarting ApplicationStatus = "STARTING" ApplicationStatusStopping ApplicationStatus = "STOPPING" ApplicationStatusReady ApplicationStatus = "READY" ApplicationStatusRunning ApplicationStatus = "RUNNING" ApplicationStatusUpdating ApplicationStatus = "UPDATING" ApplicationStatusAutoscaling ApplicationStatus = "AUTOSCALING" ApplicationStatusForceStopping ApplicationStatus = "FORCE_STOPPING" ApplicationStatusRollingBack ApplicationStatus = "ROLLING_BACK" ApplicationStatusMaintenance ApplicationStatus = "MAINTENANCE" ApplicationStatusRolledBack ApplicationStatus = "ROLLED_BACK" ) // Values returns all known values for ApplicationStatus. 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 (ApplicationStatus) Values() []ApplicationStatus { return []ApplicationStatus{ "DELETING", "STARTING", "STOPPING", "READY", "RUNNING", "UPDATING", "AUTOSCALING", "FORCE_STOPPING", "ROLLING_BACK", "MAINTENANCE", "ROLLED_BACK", } } type ArtifactType string // Enum values for ArtifactType const ( ArtifactTypeUdf ArtifactType = "UDF" ArtifactTypeDependencyJar ArtifactType = "DEPENDENCY_JAR" ) // Values returns all known values for ArtifactType. 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 (ArtifactType) Values() []ArtifactType { return []ArtifactType{ "UDF", "DEPENDENCY_JAR", } } type CodeContentType string // Enum values for CodeContentType const ( CodeContentTypePlaintext CodeContentType = "PLAINTEXT" CodeContentTypeZipfile CodeContentType = "ZIPFILE" ) // Values returns all known values for CodeContentType. 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 (CodeContentType) Values() []CodeContentType { return []CodeContentType{ "PLAINTEXT", "ZIPFILE", } } type ConfigurationType string // Enum values for ConfigurationType const ( ConfigurationTypeDefault ConfigurationType = "DEFAULT" ConfigurationTypeCustom ConfigurationType = "CUSTOM" ) // Values returns all known values for ConfigurationType. 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 (ConfigurationType) Values() []ConfigurationType { return []ConfigurationType{ "DEFAULT", "CUSTOM", } } type InputStartingPosition string // Enum values for InputStartingPosition const ( InputStartingPositionNow InputStartingPosition = "NOW" InputStartingPositionTrimHorizon InputStartingPosition = "TRIM_HORIZON" InputStartingPositionLastStoppedPoint InputStartingPosition = "LAST_STOPPED_POINT" ) // Values returns all known values for InputStartingPosition. 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 (InputStartingPosition) Values() []InputStartingPosition { return []InputStartingPosition{ "NOW", "TRIM_HORIZON", "LAST_STOPPED_POINT", } } type LogLevel string // Enum values for LogLevel const ( LogLevelInfo LogLevel = "INFO" LogLevelWarn LogLevel = "WARN" LogLevelError LogLevel = "ERROR" LogLevelDebug LogLevel = "DEBUG" ) // Values returns all known values for LogLevel. 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 (LogLevel) Values() []LogLevel { return []LogLevel{ "INFO", "WARN", "ERROR", "DEBUG", } } type MetricsLevel string // Enum values for MetricsLevel const ( MetricsLevelApplication MetricsLevel = "APPLICATION" MetricsLevelTask MetricsLevel = "TASK" MetricsLevelOperator MetricsLevel = "OPERATOR" MetricsLevelParallelism MetricsLevel = "PARALLELISM" ) // Values returns all known values for MetricsLevel. 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 (MetricsLevel) Values() []MetricsLevel { return []MetricsLevel{ "APPLICATION", "TASK", "OPERATOR", "PARALLELISM", } } type RecordFormatType string // Enum values for RecordFormatType const ( RecordFormatTypeJson RecordFormatType = "JSON" RecordFormatTypeCsv RecordFormatType = "CSV" ) // Values returns all known values for RecordFormatType. 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 (RecordFormatType) Values() []RecordFormatType { return []RecordFormatType{ "JSON", "CSV", } } type RuntimeEnvironment string // Enum values for RuntimeEnvironment const ( RuntimeEnvironmentSql10 RuntimeEnvironment = "SQL-1_0" RuntimeEnvironmentFlink16 RuntimeEnvironment = "FLINK-1_6" RuntimeEnvironmentFlink18 RuntimeEnvironment = "FLINK-1_8" RuntimeEnvironmentZeppelinFlink10 RuntimeEnvironment = "ZEPPELIN-FLINK-1_0" RuntimeEnvironmentFlink111 RuntimeEnvironment = "FLINK-1_11" RuntimeEnvironmentFlink113 RuntimeEnvironment = "FLINK-1_13" RuntimeEnvironmentZeppelinFlink20 RuntimeEnvironment = "ZEPPELIN-FLINK-2_0" RuntimeEnvironmentFlink115 RuntimeEnvironment = "FLINK-1_15" RuntimeEnvironmentZeppelinFlink30 RuntimeEnvironment = "ZEPPELIN-FLINK-3_0" ) // Values returns all known values for RuntimeEnvironment. 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 (RuntimeEnvironment) Values() []RuntimeEnvironment { return []RuntimeEnvironment{ "SQL-1_0", "FLINK-1_6", "FLINK-1_8", "ZEPPELIN-FLINK-1_0", "FLINK-1_11", "FLINK-1_13", "ZEPPELIN-FLINK-2_0", "FLINK-1_15", "ZEPPELIN-FLINK-3_0", } } type SnapshotStatus string // Enum values for SnapshotStatus const ( SnapshotStatusCreating SnapshotStatus = "CREATING" SnapshotStatusReady SnapshotStatus = "READY" SnapshotStatusDeleting SnapshotStatus = "DELETING" SnapshotStatusFailed SnapshotStatus = "FAILED" ) // Values returns all known values for SnapshotStatus. 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 (SnapshotStatus) Values() []SnapshotStatus { return []SnapshotStatus{ "CREATING", "READY", "DELETING", "FAILED", } } type UrlType string // Enum values for UrlType const ( UrlTypeFlinkDashboardUrl UrlType = "FLINK_DASHBOARD_URL" UrlTypeZeppelinUiUrl UrlType = "ZEPPELIN_UI_URL" ) // Values returns all known values for UrlType. 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 (UrlType) Values() []UrlType { return []UrlType{ "FLINK_DASHBOARD_URL", "ZEPPELIN_UI_URL", } }
286
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // The user-provided application code (query) is not valid. This can be a simple // syntax error. type CodeValidationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *CodeValidationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *CodeValidationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *CodeValidationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "CodeValidationException" } return *e.ErrorCodeOverride } func (e *CodeValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Exception thrown as a result of concurrent modifications to an application. // This error can be the result of attempting to modify an application without // using the current application ID. type ConcurrentModificationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ConcurrentModificationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ConcurrentModificationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ConcurrentModificationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ConcurrentModificationException" } return *e.ErrorCodeOverride } func (e *ConcurrentModificationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The user-provided application configuration is not valid. type InvalidApplicationConfigurationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidApplicationConfigurationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidApplicationConfigurationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidApplicationConfigurationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidApplicationConfigurationException" } return *e.ErrorCodeOverride } func (e *InvalidApplicationConfigurationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The specified input parameter value is not valid. type InvalidArgumentException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidArgumentException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidArgumentException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidArgumentException" } return *e.ErrorCodeOverride } func (e *InvalidArgumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request JSON is not valid for the operation. type InvalidRequestException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidRequestException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidRequestException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidRequestException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidRequestException" } return *e.ErrorCodeOverride } func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The number of allowed resources has been exceeded. type LimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *LimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *LimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *LimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "LimitExceededException" } return *e.ErrorCodeOverride } func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The application is not available for this operation. type ResourceInUseException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceInUseException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceInUseException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceInUseException" } return *e.ErrorCodeOverride } func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Specified application can't be found. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Discovery failed to get a record from the streaming source because of the // Kinesis Streams ProvisionedThroughputExceededException . For more information, // see GetRecords (http://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.html) // in the Amazon Kinesis Streams API Reference. type ResourceProvisionedThroughputExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceProvisionedThroughputExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceProvisionedThroughputExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceProvisionedThroughputExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceProvisionedThroughputExceededException" } return *e.ErrorCodeOverride } func (e *ResourceProvisionedThroughputExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The service cannot complete the request. type ServiceUnavailableException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ServiceUnavailableException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ServiceUnavailableException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ServiceUnavailableException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ServiceUnavailableException" } return *e.ErrorCodeOverride } func (e *ServiceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } // Application created with too many tags, or too many tags added to an // application. Note that the maximum number of application tags includes system // tags. The maximum number of user-defined application tags is 50. type TooManyTagsException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *TooManyTagsException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *TooManyTagsException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *TooManyTagsException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "TooManyTagsException" } return *e.ErrorCodeOverride } func (e *TooManyTagsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The data format is not valid. Kinesis Data Analytics cannot detect the schema // for the given streaming source. type UnableToDetectSchemaException struct { Message *string ErrorCodeOverride *string RawInputRecords []string ProcessedInputRecords []string noSmithyDocumentSerde } func (e *UnableToDetectSchemaException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnableToDetectSchemaException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnableToDetectSchemaException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnableToDetectSchemaException" } return *e.ErrorCodeOverride } func (e *UnableToDetectSchemaException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The request was rejected because a specified parameter is not supported or a // specified resource is not valid for this operation. type UnsupportedOperationException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnsupportedOperationException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnsupportedOperationException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnsupportedOperationException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnsupportedOperationException" } return *e.ErrorCodeOverride } func (e *UnsupportedOperationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
364
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // Describes code configuration for an application. type ApplicationCodeConfiguration struct { // Specifies whether the code content is in text or zip format. // // This member is required. CodeContentType CodeContentType // The location and type of the application code. CodeContent *CodeContent noSmithyDocumentSerde } // Describes code configuration for an application. type ApplicationCodeConfigurationDescription struct { // Specifies whether the code content is in text or zip format. // // This member is required. CodeContentType CodeContentType // Describes details about the location and format of the application code. CodeContentDescription *CodeContentDescription noSmithyDocumentSerde } // Describes code configuration updates for an application. This is supported for // a Flink-based Kinesis Data Analytics application or a SQL-based Kinesis Data // Analytics application. type ApplicationCodeConfigurationUpdate struct { // Describes updates to the code content type. CodeContentTypeUpdate CodeContentType // Describes updates to the code content of an application. CodeContentUpdate *CodeContentUpdate noSmithyDocumentSerde } // Specifies the creation parameters for a Kinesis Data Analytics application. type ApplicationConfiguration struct { // The code location and type parameters for a Flink-based Kinesis Data Analytics // application. ApplicationCodeConfiguration *ApplicationCodeConfiguration // Describes whether snapshots are enabled for a Flink-based Kinesis Data // Analytics application. ApplicationSnapshotConfiguration *ApplicationSnapshotConfiguration // Describes execution properties for a Flink-based Kinesis Data Analytics // application. EnvironmentProperties *EnvironmentProperties // The creation and update parameters for a Flink-based Kinesis Data Analytics // application. FlinkApplicationConfiguration *FlinkApplicationConfiguration // The creation and update parameters for a SQL-based Kinesis Data Analytics // application. SqlApplicationConfiguration *SqlApplicationConfiguration // The array of descriptions of VPC configurations available to the application. VpcConfigurations []VpcConfiguration // The configuration parameters for a Kinesis Data Analytics Studio notebook. ZeppelinApplicationConfiguration *ZeppelinApplicationConfiguration noSmithyDocumentSerde } // Describes details about the application code and starting parameters for a // Kinesis Data Analytics application. type ApplicationConfigurationDescription struct { // The details about the application code for a Flink-based Kinesis Data Analytics // application. ApplicationCodeConfigurationDescription *ApplicationCodeConfigurationDescription // Describes whether snapshots are enabled for a Flink-based Kinesis Data // Analytics application. ApplicationSnapshotConfigurationDescription *ApplicationSnapshotConfigurationDescription // Describes execution properties for a Flink-based Kinesis Data Analytics // application. EnvironmentPropertyDescriptions *EnvironmentPropertyDescriptions // The details about a Flink-based Kinesis Data Analytics application. FlinkApplicationConfigurationDescription *FlinkApplicationConfigurationDescription // The details about the starting properties for a Kinesis Data Analytics // application. RunConfigurationDescription *RunConfigurationDescription // The details about inputs, outputs, and reference data sources for a SQL-based // Kinesis Data Analytics application. SqlApplicationConfigurationDescription *SqlApplicationConfigurationDescription // The array of descriptions of VPC configurations available to the application. VpcConfigurationDescriptions []VpcConfigurationDescription // The configuration parameters for a Kinesis Data Analytics Studio notebook. ZeppelinApplicationConfigurationDescription *ZeppelinApplicationConfigurationDescription noSmithyDocumentSerde } // Describes updates to an application's configuration. type ApplicationConfigurationUpdate struct { // Describes updates to an application's code configuration. ApplicationCodeConfigurationUpdate *ApplicationCodeConfigurationUpdate // Describes whether snapshots are enabled for a Flink-based Kinesis Data // Analytics application. ApplicationSnapshotConfigurationUpdate *ApplicationSnapshotConfigurationUpdate // Describes updates to the environment properties for a Flink-based Kinesis Data // Analytics application. EnvironmentPropertyUpdates *EnvironmentPropertyUpdates // Describes updates to a Flink-based Kinesis Data Analytics application's // configuration. FlinkApplicationConfigurationUpdate *FlinkApplicationConfigurationUpdate // Describes updates to a SQL-based Kinesis Data Analytics application's // configuration. SqlApplicationConfigurationUpdate *SqlApplicationConfigurationUpdate // Updates to the array of descriptions of VPC configurations available to the // application. VpcConfigurationUpdates []VpcConfigurationUpdate // Updates to the configuration of a Kinesis Data Analytics Studio notebook. ZeppelinApplicationConfigurationUpdate *ZeppelinApplicationConfigurationUpdate noSmithyDocumentSerde } // Describes the application, including the application Amazon Resource Name // (ARN), status, latest version, and input and output configurations. type ApplicationDetail struct { // The ARN of the application. // // This member is required. ApplicationARN *string // The name of the application. // // This member is required. ApplicationName *string // The status of the application. // // This member is required. ApplicationStatus ApplicationStatus // Provides the current application version. Kinesis Data Analytics updates the // ApplicationVersionId each time you update the application. // // This member is required. ApplicationVersionId *int64 // The runtime environment for the application. // // This member is required. RuntimeEnvironment RuntimeEnvironment // Describes details about the application code and starting parameters for a // Kinesis Data Analytics application. ApplicationConfigurationDescription *ApplicationConfigurationDescription // The description of the application. ApplicationDescription *string // The details of the maintenance configuration for the application. ApplicationMaintenanceConfigurationDescription *ApplicationMaintenanceConfigurationDescription // To create a Kinesis Data Analytics Studio notebook, you must set the mode to // INTERACTIVE . However, for a Kinesis Data Analytics for Apache Flink // application, the mode is optional. ApplicationMode ApplicationMode // If you reverted the application using RollbackApplication , the application // version when RollbackApplication was called. ApplicationVersionRolledBackFrom *int64 // The version to which you want to roll back the application. ApplicationVersionRolledBackTo *int64 // The previous application version before the latest application update. // RollbackApplication reverts the application to this version. ApplicationVersionUpdatedFrom *int64 // Describes the application Amazon CloudWatch logging options. CloudWatchLoggingOptionDescriptions []CloudWatchLoggingOptionDescription // A value you use to implement strong concurrency for application updates. ConditionalToken *string // The current timestamp when the application was created. CreateTimestamp *time.Time // The current timestamp when the application was last updated. LastUpdateTimestamp *time.Time // Specifies the IAM role that the application uses to access external resources. ServiceExecutionRole *string noSmithyDocumentSerde } // The details of the maintenance configuration for the application. type ApplicationMaintenanceConfigurationDescription struct { // The end time for the maintenance window. // // This member is required. ApplicationMaintenanceWindowEndTime *string // The start time for the maintenance window. // // This member is required. ApplicationMaintenanceWindowStartTime *string noSmithyDocumentSerde } // Describes the updated maintenance configuration for the application. type ApplicationMaintenanceConfigurationUpdate struct { // The updated start time for the maintenance window. // // This member is required. ApplicationMaintenanceWindowStartTimeUpdate *string noSmithyDocumentSerde } // Specifies the method and snapshot to use when restarting an application using // previously saved application state. type ApplicationRestoreConfiguration struct { // Specifies how the application should be restored. // // This member is required. ApplicationRestoreType ApplicationRestoreType // The identifier of an existing snapshot of application state to use to restart // an application. The application uses this value if RESTORE_FROM_CUSTOM_SNAPSHOT // is specified for the ApplicationRestoreType . SnapshotName *string noSmithyDocumentSerde } // Describes whether snapshots are enabled for a Flink-based Kinesis Data // Analytics application. type ApplicationSnapshotConfiguration struct { // Describes whether snapshots are enabled for a Flink-based Kinesis Data // Analytics application. // // This member is required. SnapshotsEnabled *bool noSmithyDocumentSerde } // Describes whether snapshots are enabled for a Flink-based Kinesis Data // Analytics application. type ApplicationSnapshotConfigurationDescription struct { // Describes whether snapshots are enabled for a Flink-based Kinesis Data // Analytics application. // // This member is required. SnapshotsEnabled *bool noSmithyDocumentSerde } // Describes updates to whether snapshots are enabled for a Flink-based Kinesis // Data Analytics application. type ApplicationSnapshotConfigurationUpdate struct { // Describes updates to whether snapshots are enabled for an application. // // This member is required. SnapshotsEnabledUpdate *bool noSmithyDocumentSerde } // Provides application summary information, including the application Amazon // Resource Name (ARN), name, and status. type ApplicationSummary struct { // The ARN of the application. // // This member is required. ApplicationARN *string // The name of the application. // // This member is required. ApplicationName *string // The status of the application. // // This member is required. ApplicationStatus ApplicationStatus // Provides the current application version. // // This member is required. ApplicationVersionId *int64 // The runtime environment for the application. // // This member is required. RuntimeEnvironment RuntimeEnvironment // For a Kinesis Data Analytics for Apache Flink application, the mode is STREAMING // . For a Kinesis Data Analytics Studio notebook, it is INTERACTIVE . ApplicationMode ApplicationMode noSmithyDocumentSerde } // The summary of the application version. type ApplicationVersionSummary struct { // The status of the application. // // This member is required. ApplicationStatus ApplicationStatus // The ID of the application version. Kinesis Data Analytics updates the // ApplicationVersionId each time you update the application. // // This member is required. ApplicationVersionId *int64 noSmithyDocumentSerde } // The configuration parameters for the default Amazon Glue database. You use this // database for SQL queries that you write in a Kinesis Data Analytics Studio // notebook. type CatalogConfiguration struct { // The configuration parameters for the default Amazon Glue database. You use this // database for Apache Flink SQL queries and table API transforms that you write in // a Kinesis Data Analytics Studio notebook. // // This member is required. GlueDataCatalogConfiguration *GlueDataCatalogConfiguration noSmithyDocumentSerde } // The configuration parameters for the default Amazon Glue database. You use this // database for Apache Flink SQL queries and table API transforms that you write in // a Kinesis Data Analytics Studio notebook. type CatalogConfigurationDescription struct { // The configuration parameters for the default Amazon Glue database. You use this // database for SQL queries that you write in a Kinesis Data Analytics Studio // notebook. // // This member is required. GlueDataCatalogConfigurationDescription *GlueDataCatalogConfigurationDescription noSmithyDocumentSerde } // Updates to the configuration parameters for the default Amazon Glue database. // You use this database for SQL queries that you write in a Kinesis Data Analytics // Studio notebook. type CatalogConfigurationUpdate struct { // Updates to the configuration parameters for the default Amazon Glue database. // You use this database for SQL queries that you write in a Kinesis Data Analytics // Studio notebook. // // This member is required. GlueDataCatalogConfigurationUpdate *GlueDataCatalogConfigurationUpdate noSmithyDocumentSerde } // Describes an application's checkpointing configuration. Checkpointing is the // process of persisting application state for fault tolerance. For more // information, see Checkpoints for Fault Tolerance (https://ci.apache.org/projects/flink/flink-docs-release-1.8/concepts/programming-model.html#checkpoints-for-fault-tolerance) // in the Apache Flink Documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/) // . type CheckpointConfiguration struct { // Describes whether the application uses Kinesis Data Analytics' default // checkpointing behavior. You must set this property to CUSTOM in order to set // the CheckpointingEnabled , CheckpointInterval , or MinPauseBetweenCheckpoints // parameters. If this value is set to DEFAULT , the application will use the // following values, even if they are set to other values using APIs or application // code: // - CheckpointingEnabled: true // - CheckpointInterval: 60000 // - MinPauseBetweenCheckpoints: 5000 // // This member is required. ConfigurationType ConfigurationType // Describes the interval in milliseconds between checkpoint operations. If // CheckpointConfiguration.ConfigurationType is DEFAULT , the application will use // a CheckpointInterval value of 60000, even if this value is set to another value // using this API or in application code. CheckpointInterval *int64 // Describes whether checkpointing is enabled for a Flink-based Kinesis Data // Analytics application. If CheckpointConfiguration.ConfigurationType is DEFAULT , // the application will use a CheckpointingEnabled value of true , even if this // value is set to another value using this API or in application code. CheckpointingEnabled *bool // Describes the minimum time in milliseconds after a checkpoint operation // completes that a new checkpoint operation can start. If a checkpoint operation // takes longer than the CheckpointInterval , the application otherwise performs // continual checkpoint operations. For more information, see Tuning Checkpointing (https://ci.apache.org/projects/flink/flink-docs-release-1.8/ops/state/large_state_tuning.html#tuning-checkpointing) // in the Apache Flink Documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/) // . If CheckpointConfiguration.ConfigurationType is DEFAULT , the application will // use a MinPauseBetweenCheckpoints value of 5000, even if this value is set using // this API or in application code. MinPauseBetweenCheckpoints *int64 noSmithyDocumentSerde } // Describes checkpointing parameters for a Flink-based Kinesis Data Analytics // application. type CheckpointConfigurationDescription struct { // Describes the interval in milliseconds between checkpoint operations. If // CheckpointConfiguration.ConfigurationType is DEFAULT , the application will use // a CheckpointInterval value of 60000, even if this value is set to another value // using this API or in application code. CheckpointInterval *int64 // Describes whether checkpointing is enabled for a Flink-based Kinesis Data // Analytics application. If CheckpointConfiguration.ConfigurationType is DEFAULT , // the application will use a CheckpointingEnabled value of true , even if this // value is set to another value using this API or in application code. CheckpointingEnabled *bool // Describes whether the application uses the default checkpointing behavior in // Kinesis Data Analytics. If this value is set to DEFAULT , the application will // use the following values, even if they are set to other values using APIs or // application code: // - CheckpointingEnabled: true // - CheckpointInterval: 60000 // - MinPauseBetweenCheckpoints: 5000 ConfigurationType ConfigurationType // Describes the minimum time in milliseconds after a checkpoint operation // completes that a new checkpoint operation can start. If // CheckpointConfiguration.ConfigurationType is DEFAULT , the application will use // a MinPauseBetweenCheckpoints value of 5000, even if this value is set using // this API or in application code. MinPauseBetweenCheckpoints *int64 noSmithyDocumentSerde } // Describes updates to the checkpointing parameters for a Flink-based Kinesis // Data Analytics application. type CheckpointConfigurationUpdate struct { // Describes updates to the interval in milliseconds between checkpoint // operations. If CheckpointConfiguration.ConfigurationType is DEFAULT , the // application will use a CheckpointInterval value of 60000, even if this value is // set to another value using this API or in application code. CheckpointIntervalUpdate *int64 // Describes updates to whether checkpointing is enabled for an application. If // CheckpointConfiguration.ConfigurationType is DEFAULT , the application will use // a CheckpointingEnabled value of true , even if this value is set to another // value using this API or in application code. CheckpointingEnabledUpdate *bool // Describes updates to whether the application uses the default checkpointing // behavior of Kinesis Data Analytics. You must set this property to CUSTOM in // order to set the CheckpointingEnabled , CheckpointInterval , or // MinPauseBetweenCheckpoints parameters. If this value is set to DEFAULT , the // application will use the following values, even if they are set to other values // using APIs or application code: // - CheckpointingEnabled: true // - CheckpointInterval: 60000 // - MinPauseBetweenCheckpoints: 5000 ConfigurationTypeUpdate ConfigurationType // Describes updates to the minimum time in milliseconds after a checkpoint // operation completes that a new checkpoint operation can start. If // CheckpointConfiguration.ConfigurationType is DEFAULT , the application will use // a MinPauseBetweenCheckpoints value of 5000, even if this value is set using // this API or in application code. MinPauseBetweenCheckpointsUpdate *int64 noSmithyDocumentSerde } // Provides a description of Amazon CloudWatch logging options, including the log // stream Amazon Resource Name (ARN). type CloudWatchLoggingOption struct { // The ARN of the CloudWatch log to receive application messages. // // This member is required. LogStreamARN *string noSmithyDocumentSerde } // Describes the Amazon CloudWatch logging option. type CloudWatchLoggingOptionDescription struct { // The Amazon Resource Name (ARN) of the CloudWatch log to receive application // messages. // // This member is required. LogStreamARN *string // The ID of the CloudWatch logging option description. CloudWatchLoggingOptionId *string // The IAM ARN of the role to use to send application messages. Provided for // backward compatibility. Applications created with the current API version have // an application-level service execution role rather than a resource-level role. RoleARN *string noSmithyDocumentSerde } // Describes the Amazon CloudWatch logging option updates. type CloudWatchLoggingOptionUpdate struct { // The ID of the CloudWatch logging option to update // // This member is required. CloudWatchLoggingOptionId *string // The Amazon Resource Name (ARN) of the CloudWatch log to receive application // messages. LogStreamARNUpdate *string noSmithyDocumentSerde } // Specifies either the application code, or the location of the application code, // for a Flink-based Kinesis Data Analytics application. type CodeContent struct { // Information about the Amazon S3 bucket that contains the application code. S3ContentLocation *S3ContentLocation // The text-format code for a Flink-based Kinesis Data Analytics application. TextContent *string // The zip-format code for a Flink-based Kinesis Data Analytics application. ZipFileContent []byte noSmithyDocumentSerde } // Describes details about the code of a Kinesis Data Analytics application. type CodeContentDescription struct { // The checksum that can be used to validate zip-format code. CodeMD5 *string // The size in bytes of the application code. Can be used to validate zip-format // code. CodeSize *int64 // The S3 bucket Amazon Resource Name (ARN), file key, and object version of the // application code stored in Amazon S3. S3ApplicationCodeLocationDescription *S3ApplicationCodeLocationDescription // The text-format code TextContent *string noSmithyDocumentSerde } // Describes an update to the code of an application. Not supported for Apache // Zeppelin. type CodeContentUpdate struct { // Describes an update to the location of code for an application. S3ContentLocationUpdate *S3ContentLocationUpdate // Describes an update to the text code for an application. TextContentUpdate *string // Describes an update to the zipped code for an application. ZipFileContentUpdate []byte noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, provides additional mapping // information when the record format uses delimiters, such as CSV. For example, // the following sample records use CSV format, where the records use the '\n' as // the row delimiter and a comma (",") as the column delimiter: "name1", "address1" // // "name2", "address2" type CSVMappingParameters struct { // The column delimiter. For example, in a CSV format, a comma (",") is the // typical column delimiter. // // This member is required. RecordColumnDelimiter *string // The row delimiter. For example, in a CSV format, '\n' is the typical row // delimiter. // // This member is required. RecordRowDelimiter *string noSmithyDocumentSerde } // Specifies dependency JARs, as well as JAR files that contain user-defined // functions (UDF). type CustomArtifactConfiguration struct { // UDF stands for user-defined functions. This type of artifact must be in an S3 // bucket. A DEPENDENCY_JAR can be in either Maven or an S3 bucket. // // This member is required. ArtifactType ArtifactType // The parameters required to fully specify a Maven reference. MavenReference *MavenReference // For a Kinesis Data Analytics application provides a description of an Amazon S3 // object, including the Amazon Resource Name (ARN) of the S3 bucket, the name of // the Amazon S3 object that contains the data, and the version number of the // Amazon S3 object that contains the data. S3ContentLocation *S3ContentLocation noSmithyDocumentSerde } // Specifies a dependency JAR or a JAR of user-defined functions. type CustomArtifactConfigurationDescription struct { // UDF stands for user-defined functions. This type of artifact must be in an S3 // bucket. A DEPENDENCY_JAR can be in either Maven or an S3 bucket. ArtifactType ArtifactType // The parameters that are required to specify a Maven dependency. MavenReferenceDescription *MavenReference // For a Kinesis Data Analytics application provides a description of an Amazon S3 // object, including the Amazon Resource Name (ARN) of the S3 bucket, the name of // the Amazon S3 object that contains the data, and the version number of the // Amazon S3 object that contains the data. S3ContentLocationDescription *S3ContentLocation noSmithyDocumentSerde } // The information required to deploy a Kinesis Data Analytics Studio notebook as // an application with durable state. type DeployAsApplicationConfiguration struct { // The description of an Amazon S3 object that contains the Amazon Data Analytics // application, including the Amazon Resource Name (ARN) of the S3 bucket, the name // of the Amazon S3 object that contains the data, and the version number of the // Amazon S3 object that contains the data. // // This member is required. S3ContentLocation *S3ContentBaseLocation noSmithyDocumentSerde } // The configuration information required to deploy an Amazon Data Analytics // Studio notebook as an application with durable state. type DeployAsApplicationConfigurationDescription struct { // The location that holds the data required to specify an Amazon Data Analytics // application. // // This member is required. S3ContentLocationDescription *S3ContentBaseLocationDescription noSmithyDocumentSerde } // Updates to the configuration information required to deploy an Amazon Data // Analytics Studio notebook as an application with durable state. type DeployAsApplicationConfigurationUpdate struct { // Updates to the location that holds the data required to specify an Amazon Data // Analytics application. S3ContentLocationUpdate *S3ContentBaseLocationUpdate noSmithyDocumentSerde } // Describes the data format when records are written to the destination in a // SQL-based Kinesis Data Analytics application. type DestinationSchema struct { // Specifies the format of the records on the output stream. // // This member is required. RecordFormatType RecordFormatType noSmithyDocumentSerde } // Describes execution properties for a Flink-based Kinesis Data Analytics // application. type EnvironmentProperties struct { // Describes the execution property groups. // // This member is required. PropertyGroups []PropertyGroup noSmithyDocumentSerde } // Describes the execution properties for an Apache Flink runtime. type EnvironmentPropertyDescriptions struct { // Describes the execution property groups. PropertyGroupDescriptions []PropertyGroup noSmithyDocumentSerde } // Describes updates to the execution property groups for a Flink-based Kinesis // Data Analytics application or a Studio notebook. type EnvironmentPropertyUpdates struct { // Describes updates to the execution property groups. // // This member is required. PropertyGroups []PropertyGroup noSmithyDocumentSerde } // Describes configuration parameters for a Flink-based Kinesis Data Analytics // application or a Studio notebook. type FlinkApplicationConfiguration struct { // Describes an application's checkpointing configuration. Checkpointing is the // process of persisting application state for fault tolerance. For more // information, see Checkpoints for Fault Tolerance (https://ci.apache.org/projects/flink/flink-docs-release-1.8/concepts/programming-model.html#checkpoints-for-fault-tolerance) // in the Apache Flink Documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/) // . CheckpointConfiguration *CheckpointConfiguration // Describes configuration parameters for Amazon CloudWatch logging for an // application. MonitoringConfiguration *MonitoringConfiguration // Describes parameters for how an application executes multiple tasks // simultaneously. ParallelismConfiguration *ParallelismConfiguration noSmithyDocumentSerde } // Describes configuration parameters for a Flink-based Kinesis Data Analytics // application. type FlinkApplicationConfigurationDescription struct { // Describes an application's checkpointing configuration. Checkpointing is the // process of persisting application state for fault tolerance. CheckpointConfigurationDescription *CheckpointConfigurationDescription // The job plan for an application. For more information about the job plan, see // Jobs and Scheduling (https://ci.apache.org/projects/flink/flink-docs-release-1.8/internals/job_scheduling.html) // in the Apache Flink Documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/) // . To retrieve the job plan for the application, use the // DescribeApplicationRequest$IncludeAdditionalDetails parameter of the // DescribeApplication operation. JobPlanDescription *string // Describes configuration parameters for Amazon CloudWatch logging for an // application. MonitoringConfigurationDescription *MonitoringConfigurationDescription // Describes parameters for how an application executes multiple tasks // simultaneously. ParallelismConfigurationDescription *ParallelismConfigurationDescription noSmithyDocumentSerde } // Describes updates to the configuration parameters for a Flink-based Kinesis // Data Analytics application. type FlinkApplicationConfigurationUpdate struct { // Describes updates to an application's checkpointing configuration. // Checkpointing is the process of persisting application state for fault // tolerance. CheckpointConfigurationUpdate *CheckpointConfigurationUpdate // Describes updates to the configuration parameters for Amazon CloudWatch logging // for an application. MonitoringConfigurationUpdate *MonitoringConfigurationUpdate // Describes updates to the parameters for how an application executes multiple // tasks simultaneously. ParallelismConfigurationUpdate *ParallelismConfigurationUpdate noSmithyDocumentSerde } // Describes the starting parameters for a Flink-based Kinesis Data Analytics // application. type FlinkRunConfiguration struct { // When restoring from a snapshot, specifies whether the runtime is allowed to // skip a state that cannot be mapped to the new program. This will happen if the // program is updated between snapshots to remove stateful parameters, and state // data in the snapshot no longer corresponds to valid application data. For more // information, see Allowing Non-Restored State (https://ci.apache.org/projects/flink/flink-docs-release-1.8/ops/state/savepoints.html#allowing-non-restored-state) // in the Apache Flink documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/) // . This value defaults to false . If you update your application without // specifying this parameter, AllowNonRestoredState will be set to false , even if // it was previously set to true . AllowNonRestoredState *bool noSmithyDocumentSerde } // The configuration of the Glue Data Catalog that you use for Apache Flink SQL // queries and table API transforms that you write in an application. type GlueDataCatalogConfiguration struct { // The Amazon Resource Name (ARN) of the database. // // This member is required. DatabaseARN *string noSmithyDocumentSerde } // The configuration of the Glue Data Catalog that you use for Apache Flink SQL // queries and table API transforms that you write in an application. type GlueDataCatalogConfigurationDescription struct { // The Amazon Resource Name (ARN) of the database. // // This member is required. DatabaseARN *string noSmithyDocumentSerde } // Updates to the configuration of the Glue Data Catalog that you use for SQL // queries that you write in a Kinesis Data Analytics Studio notebook. type GlueDataCatalogConfigurationUpdate struct { // The updated Amazon Resource Name (ARN) of the database. // // This member is required. DatabaseARNUpdate *string noSmithyDocumentSerde } // When you configure the application input for a SQL-based Kinesis Data Analytics // application, you specify the streaming source, the in-application stream name // that is created, and the mapping between the two. type Input struct { // Describes the format of the data in the streaming source, and how each data // element maps to corresponding columns in the in-application stream that is being // created. Also used to describe the format of the reference data source. // // This member is required. InputSchema *SourceSchema // The name prefix to use when creating an in-application stream. Suppose that you // specify a prefix " MyInApplicationStream ." Kinesis Data Analytics then creates // one or more (as per the InputParallelism count you specified) in-application // streams with the names " MyInApplicationStream_001 ," " MyInApplicationStream_002 // ," and so on. // // This member is required. NamePrefix *string // Describes the number of in-application streams to create. InputParallelism *InputParallelism // The InputProcessingConfiguration for the input. An input processor transforms // records as they are received from the stream, before the application's SQL code // executes. Currently, the only input processing configuration available is // InputLambdaProcessor . InputProcessingConfiguration *InputProcessingConfiguration // If the streaming source is an Amazon Kinesis Data Firehose delivery stream, // identifies the delivery stream's ARN. KinesisFirehoseInput *KinesisFirehoseInput // If the streaming source is an Amazon Kinesis data stream, identifies the // stream's Amazon Resource Name (ARN). KinesisStreamsInput *KinesisStreamsInput noSmithyDocumentSerde } // Describes the application input configuration for a SQL-based Kinesis Data // Analytics application. type InputDescription struct { // Returns the in-application stream names that are mapped to the stream source. InAppStreamNames []string // The input ID that is associated with the application input. This is the ID that // Kinesis Data Analytics assigns to each input configuration that you add to your // application. InputId *string // Describes the configured parallelism (number of in-application streams mapped // to the streaming source). InputParallelism *InputParallelism // The description of the preprocessor that executes on records in this input // before the application's code is run. InputProcessingConfigurationDescription *InputProcessingConfigurationDescription // Describes the format of the data in the streaming source, and how each data // element maps to corresponding columns in the in-application stream that is being // created. InputSchema *SourceSchema // The point at which the application is configured to read from the input stream. InputStartingPositionConfiguration *InputStartingPositionConfiguration // If a Kinesis Data Firehose delivery stream is configured as a streaming source, // provides the delivery stream's ARN. KinesisFirehoseInputDescription *KinesisFirehoseInputDescription // If a Kinesis data stream is configured as a streaming source, provides the // Kinesis data stream's Amazon Resource Name (ARN). KinesisStreamsInputDescription *KinesisStreamsInputDescription // The in-application name prefix. NamePrefix *string noSmithyDocumentSerde } // An object that contains the Amazon Resource Name (ARN) of the Amazon Lambda // function that is used to preprocess records in the stream in a SQL-based Kinesis // Data Analytics application. type InputLambdaProcessor struct { // The ARN of the Amazon Lambda function that operates on records in the stream. // To specify an earlier version of the Lambda function than the latest, include // the Lambda function version in the Lambda function ARN. For more information // about Lambda ARNs, see Example ARNs: Amazon Lambda (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-lambda) // // This member is required. ResourceARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, an object that contains the // Amazon Resource Name (ARN) of the Amazon Lambda function that is used to // preprocess records in the stream. type InputLambdaProcessorDescription struct { // The ARN of the Amazon Lambda function that is used to preprocess the records in // the stream. To specify an earlier version of the Lambda function than the // latest, include the Lambda function version in the Lambda function ARN. For more // information about Lambda ARNs, see Example ARNs: Amazon Lambda (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-lambda) // // This member is required. ResourceARN *string // The ARN of the IAM role that is used to access the Amazon Lambda function. // Provided for backward compatibility. Applications that are created with the // current API version have an application-level service execution role rather than // a resource-level role. RoleARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, represents an update to the // InputLambdaProcessor that is used to preprocess the records in the stream. type InputLambdaProcessorUpdate struct { // The Amazon Resource Name (ARN) of the new Amazon Lambda function that is used // to preprocess the records in the stream. To specify an earlier version of the // Lambda function than the latest, include the Lambda function version in the // Lambda function ARN. For more information about Lambda ARNs, see Example ARNs: // Amazon Lambda (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-lambda) // // This member is required. ResourceARNUpdate *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the number of // in-application streams to create for a given streaming source. type InputParallelism struct { // The number of in-application streams to create. Count *int32 noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, provides updates to the // parallelism count. type InputParallelismUpdate struct { // The number of in-application streams to create for the specified streaming // source. // // This member is required. CountUpdate *int32 noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes a processor that // is used to preprocess the records in the stream before being processed by your // application code. Currently, the only input processor available is Amazon Lambda (https://docs.aws.amazon.com/lambda/) // . type InputProcessingConfiguration struct { // The InputLambdaProcessor that is used to preprocess the records in the stream // before being processed by your application code. // // This member is required. InputLambdaProcessor *InputLambdaProcessor noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, provides the configuration // information about an input processor. Currently, the only input processor // available is Amazon Lambda (https://docs.aws.amazon.com/lambda/) . type InputProcessingConfigurationDescription struct { // Provides configuration information about the associated // InputLambdaProcessorDescription InputLambdaProcessorDescription *InputLambdaProcessorDescription noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes updates to an // InputProcessingConfiguration . type InputProcessingConfigurationUpdate struct { // Provides update information for an InputLambdaProcessor . // // This member is required. InputLambdaProcessorUpdate *InputLambdaProcessorUpdate noSmithyDocumentSerde } // Describes updates for an SQL-based Kinesis Data Analytics application's input // schema. type InputSchemaUpdate struct { // A list of RecordColumn objects. Each object describes the mapping of the // streaming source element to the corresponding column in the in-application // stream. RecordColumnUpdates []RecordColumn // Specifies the encoding of the records in the streaming source; for example, // UTF-8. RecordEncodingUpdate *string // Specifies the format of the records on the streaming source. RecordFormatUpdate *RecordFormat noSmithyDocumentSerde } // Describes the point at which the application reads from the streaming source. type InputStartingPositionConfiguration struct { // The starting position on the stream. // - NOW - Start reading just after the most recent record in the stream, and // start at the request timestamp that the customer issued. // - TRIM_HORIZON - Start reading at the last untrimmed record in the stream, // which is the oldest record available in the stream. This option is not available // for an Amazon Kinesis Data Firehose delivery stream. // - LAST_STOPPED_POINT - Resume reading from where the application last stopped // reading. InputStartingPosition InputStartingPosition noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes updates to a // specific input configuration (identified by the InputId of an application). type InputUpdate struct { // The input ID of the application input to be updated. // // This member is required. InputId *string // Describes the parallelism updates (the number of in-application streams Kinesis // Data Analytics creates for the specific streaming source). InputParallelismUpdate *InputParallelismUpdate // Describes updates to an InputProcessingConfiguration . InputProcessingConfigurationUpdate *InputProcessingConfigurationUpdate // Describes the data format on the streaming source, and how record elements on // the streaming source map to columns of the in-application stream that is // created. InputSchemaUpdate *InputSchemaUpdate // If a Kinesis Data Firehose delivery stream is the streaming source to be // updated, provides an updated stream ARN. KinesisFirehoseInputUpdate *KinesisFirehoseInputUpdate // If a Kinesis data stream is the streaming source to be updated, provides an // updated stream Amazon Resource Name (ARN). KinesisStreamsInputUpdate *KinesisStreamsInputUpdate // The name prefix for in-application streams that Kinesis Data Analytics creates // for the specific streaming source. NamePrefixUpdate *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, provides additional mapping // information when JSON is the record format on the streaming source. type JSONMappingParameters struct { // The path to the top-level parent that contains the records. // // This member is required. RecordRowPath *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, identifies a Kinesis Data // Firehose delivery stream as the streaming source. You provide the delivery // stream's Amazon Resource Name (ARN). type KinesisFirehoseInput struct { // The Amazon Resource Name (ARN) of the delivery stream. // // This member is required. ResourceARN *string noSmithyDocumentSerde } // Describes the Amazon Kinesis Data Firehose delivery stream that is configured // as the streaming source in the application input configuration. type KinesisFirehoseInputDescription struct { // The Amazon Resource Name (ARN) of the delivery stream. // // This member is required. ResourceARN *string // The ARN of the IAM role that Kinesis Data Analytics assumes to access the // stream. Provided for backward compatibility. Applications that are created with // the current API version have an application-level service execution role rather // than a resource-level role. RoleARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, when updating application // input configuration, provides information about a Kinesis Data Firehose delivery // stream as the streaming source. type KinesisFirehoseInputUpdate struct { // The Amazon Resource Name (ARN) of the input delivery stream to read. // // This member is required. ResourceARNUpdate *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, when configuring // application output, identifies a Kinesis Data Firehose delivery stream as the // destination. You provide the stream Amazon Resource Name (ARN) of the delivery // stream. type KinesisFirehoseOutput struct { // The ARN of the destination delivery stream to write to. // // This member is required. ResourceARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application's output, describes the // Kinesis Data Firehose delivery stream that is configured as its destination. type KinesisFirehoseOutputDescription struct { // The Amazon Resource Name (ARN) of the delivery stream. // // This member is required. ResourceARN *string // The ARN of the IAM role that Kinesis Data Analytics can assume to access the // stream. Provided for backward compatibility. Applications that are created with // the current API version have an application-level service execution role rather // than a resource-level role. RoleARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, when updating an output // configuration using the UpdateApplication operation, provides information about // a Kinesis Data Firehose delivery stream that is configured as the destination. type KinesisFirehoseOutputUpdate struct { // The Amazon Resource Name (ARN) of the delivery stream to write to. // // This member is required. ResourceARNUpdate *string noSmithyDocumentSerde } // Identifies a Kinesis data stream as the streaming source. You provide the // stream's Amazon Resource Name (ARN). type KinesisStreamsInput struct { // The ARN of the input Kinesis data stream to read. // // This member is required. ResourceARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the Kinesis data // stream that is configured as the streaming source in the application input // configuration. type KinesisStreamsInputDescription struct { // The Amazon Resource Name (ARN) of the Kinesis data stream. // // This member is required. ResourceARN *string // The ARN of the IAM role that Kinesis Data Analytics can assume to access the // stream. Provided for backward compatibility. Applications that are created with // the current API version have an application-level service execution role rather // than a resource-level role. RoleARN *string noSmithyDocumentSerde } // When you update the input configuration for a SQL-based Kinesis Data Analytics // application, provides information about a Kinesis stream as the streaming // source. type KinesisStreamsInputUpdate struct { // The Amazon Resource Name (ARN) of the input Kinesis data stream to read. // // This member is required. ResourceARNUpdate *string noSmithyDocumentSerde } // When you configure a SQL-based Kinesis Data Analytics application's output, // identifies a Kinesis data stream as the destination. You provide the stream // Amazon Resource Name (ARN). type KinesisStreamsOutput struct { // The ARN of the destination Kinesis data stream to write to. // // This member is required. ResourceARN *string noSmithyDocumentSerde } // For an SQL-based Kinesis Data Analytics application's output, describes the // Kinesis data stream that is configured as its destination. type KinesisStreamsOutputDescription struct { // The Amazon Resource Name (ARN) of the Kinesis data stream. // // This member is required. ResourceARN *string // The ARN of the IAM role that Kinesis Data Analytics can assume to access the // stream. Provided for backward compatibility. Applications that are created with // the current API version have an application-level service execution role rather // than a resource-level role. RoleARN *string noSmithyDocumentSerde } // When you update a SQL-based Kinesis Data Analytics application's output // configuration using the UpdateApplication operation, provides information about // a Kinesis data stream that is configured as the destination. type KinesisStreamsOutputUpdate struct { // The Amazon Resource Name (ARN) of the Kinesis data stream where you want to // write the output. // // This member is required. ResourceARNUpdate *string noSmithyDocumentSerde } // When you configure a SQL-based Kinesis Data Analytics application's output, // identifies an Amazon Lambda function as the destination. You provide the // function Amazon Resource Name (ARN) of the Lambda function. type LambdaOutput struct { // The Amazon Resource Name (ARN) of the destination Lambda function to write to. // To specify an earlier version of the Lambda function than the latest, include // the Lambda function version in the Lambda function ARN. For more information // about Lambda ARNs, see Example ARNs: Amazon Lambda (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-lambda) // // This member is required. ResourceARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application's output, describes the // Amazon Lambda function that is configured as its destination. type LambdaOutputDescription struct { // The Amazon Resource Name (ARN) of the destination Lambda function. // // This member is required. ResourceARN *string // The ARN of the IAM role that Kinesis Data Analytics can assume to write to the // destination function. Provided for backward compatibility. Applications that are // created with the current API version have an application-level service execution // role rather than a resource-level role. RoleARN *string noSmithyDocumentSerde } // When you update an SQL-based Kinesis Data Analytics application's output // configuration using the UpdateApplication operation, provides information about // an Amazon Lambda function that is configured as the destination. type LambdaOutputUpdate struct { // The Amazon Resource Name (ARN) of the destination Amazon Lambda function. To // specify an earlier version of the Lambda function than the latest, include the // Lambda function version in the Lambda function ARN. For more information about // Lambda ARNs, see Example ARNs: Amazon Lambda (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arn-syntax-lambda) // // This member is required. ResourceARNUpdate *string noSmithyDocumentSerde } // When you configure a SQL-based Kinesis Data Analytics application's input at // the time of creating or updating an application, provides additional mapping // information specific to the record format (such as JSON, CSV, or record fields // delimited by some delimiter) on the streaming source. type MappingParameters struct { // Provides additional mapping information when the record format uses delimiters // (for example, CSV). CSVMappingParameters *CSVMappingParameters // Provides additional mapping information when JSON is the record format on the // streaming source. JSONMappingParameters *JSONMappingParameters noSmithyDocumentSerde } // The information required to specify a Maven reference. You can use Maven // references to specify dependency JAR files. type MavenReference struct { // The artifact ID of the Maven reference. // // This member is required. ArtifactId *string // The group ID of the Maven reference. // // This member is required. GroupId *string // The version of the Maven reference. // // This member is required. Version *string noSmithyDocumentSerde } // Describes configuration parameters for Amazon CloudWatch logging for an // application. For more information about CloudWatch logging, see Monitoring (https://docs.aws.amazon.com/kinesisanalytics/latest/java/monitoring-overview.html) // . type MonitoringConfiguration struct { // Describes whether to use the default CloudWatch logging configuration for an // application. You must set this property to CUSTOM in order to set the LogLevel // or MetricsLevel parameters. // // This member is required. ConfigurationType ConfigurationType // Describes the verbosity of the CloudWatch Logs for an application. LogLevel LogLevel // Describes the granularity of the CloudWatch Logs for an application. The // Parallelism level is not recommended for applications with a Parallelism over 64 // due to excessive costs. MetricsLevel MetricsLevel noSmithyDocumentSerde } // Describes configuration parameters for CloudWatch logging for an application. type MonitoringConfigurationDescription struct { // Describes whether to use the default CloudWatch logging configuration for an // application. ConfigurationType ConfigurationType // Describes the verbosity of the CloudWatch Logs for an application. LogLevel LogLevel // Describes the granularity of the CloudWatch Logs for an application. MetricsLevel MetricsLevel noSmithyDocumentSerde } // Describes updates to configuration parameters for Amazon CloudWatch logging for // an application. type MonitoringConfigurationUpdate struct { // Describes updates to whether to use the default CloudWatch logging // configuration for an application. You must set this property to CUSTOM in order // to set the LogLevel or MetricsLevel parameters. ConfigurationTypeUpdate ConfigurationType // Describes updates to the verbosity of the CloudWatch Logs for an application. LogLevelUpdate LogLevel // Describes updates to the granularity of the CloudWatch Logs for an application. // The Parallelism level is not recommended for applications with a Parallelism // over 64 due to excessive costs. MetricsLevelUpdate MetricsLevel noSmithyDocumentSerde } // Describes a SQL-based Kinesis Data Analytics application's output // configuration, in which you identify an in-application stream and a destination // where you want the in-application stream data to be written. The destination can // be a Kinesis data stream or a Kinesis Data Firehose delivery stream. type Output struct { // Describes the data format when records are written to the destination. // // This member is required. DestinationSchema *DestinationSchema // The name of the in-application stream. // // This member is required. Name *string // Identifies a Kinesis Data Firehose delivery stream as the destination. KinesisFirehoseOutput *KinesisFirehoseOutput // Identifies a Kinesis data stream as the destination. KinesisStreamsOutput *KinesisStreamsOutput // Identifies an Amazon Lambda function as the destination. LambdaOutput *LambdaOutput noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the application // output configuration, which includes the in-application stream name and the // destination where the stream data is written. The destination can be a Kinesis // data stream or a Kinesis Data Firehose delivery stream. type OutputDescription struct { // The data format used for writing data to the destination. DestinationSchema *DestinationSchema // Describes the Kinesis Data Firehose delivery stream that is configured as the // destination where output is written. KinesisFirehoseOutputDescription *KinesisFirehoseOutputDescription // Describes the Kinesis data stream that is configured as the destination where // output is written. KinesisStreamsOutputDescription *KinesisStreamsOutputDescription // Describes the Lambda function that is configured as the destination where // output is written. LambdaOutputDescription *LambdaOutputDescription // The name of the in-application stream that is configured as output. Name *string // A unique identifier for the output configuration. OutputId *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes updates to the // output configuration identified by the OutputId . type OutputUpdate struct { // Identifies the specific output configuration that you want to update. // // This member is required. OutputId *string // Describes the data format when records are written to the destination. DestinationSchemaUpdate *DestinationSchema // Describes a Kinesis Data Firehose delivery stream as the destination for the // output. KinesisFirehoseOutputUpdate *KinesisFirehoseOutputUpdate // Describes a Kinesis data stream as the destination for the output. KinesisStreamsOutputUpdate *KinesisStreamsOutputUpdate // Describes an Amazon Lambda function as the destination for the output. LambdaOutputUpdate *LambdaOutputUpdate // If you want to specify a different in-application stream for this output // configuration, use this field to specify the new in-application stream name. NameUpdate *string noSmithyDocumentSerde } // Describes parameters for how a Flink-based Kinesis Data Analytics application // executes multiple tasks simultaneously. For more information about parallelism, // see Parallel Execution (https://ci.apache.org/projects/flink/flink-docs-release-1.8/dev/parallel.html) // in the Apache Flink Documentation (https://ci.apache.org/projects/flink/flink-docs-release-1.8/) // . type ParallelismConfiguration struct { // Describes whether the application uses the default parallelism for the Kinesis // Data Analytics service. You must set this property to CUSTOM in order to change // your application's AutoScalingEnabled , Parallelism , or ParallelismPerKPU // properties. // // This member is required. ConfigurationType ConfigurationType // Describes whether the Kinesis Data Analytics service can increase the // parallelism of the application in response to increased throughput. AutoScalingEnabled *bool // Describes the initial number of parallel tasks that a Flink-based Kinesis Data // Analytics application can perform. If AutoScalingEnabled is set to True, // Kinesis Data Analytics increases the CurrentParallelism value in response to // application load. The service can increase the CurrentParallelism value up to // the maximum parallelism, which is ParalellismPerKPU times the maximum KPUs for // the application. The maximum KPUs for an application is 32 by default, and can // be increased by requesting a limit increase. If application load is reduced, the // service can reduce the CurrentParallelism value down to the Parallelism setting. Parallelism *int32 // Describes the number of parallel tasks that a Flink-based Kinesis Data // Analytics application can perform per Kinesis Processing Unit (KPU) used by the // application. For more information about KPUs, see Amazon Kinesis Data Analytics // Pricing (http://aws.amazon.com/kinesis/data-analytics/pricing/) . ParallelismPerKPU *int32 noSmithyDocumentSerde } // Describes parameters for how a Flink-based Kinesis Data Analytics application // executes multiple tasks simultaneously. type ParallelismConfigurationDescription struct { // Describes whether the Kinesis Data Analytics service can increase the // parallelism of the application in response to increased throughput. AutoScalingEnabled *bool // Describes whether the application uses the default parallelism for the Kinesis // Data Analytics service. ConfigurationType ConfigurationType // Describes the current number of parallel tasks that a Flink-based Kinesis Data // Analytics application can perform. If AutoScalingEnabled is set to True, // Kinesis Data Analytics can increase this value in response to application load. // The service can increase this value up to the maximum parallelism, which is // ParalellismPerKPU times the maximum KPUs for the application. The maximum KPUs // for an application is 32 by default, and can be increased by requesting a limit // increase. If application load is reduced, the service can reduce the // CurrentParallelism value down to the Parallelism setting. CurrentParallelism *int32 // Describes the initial number of parallel tasks that a Flink-based Kinesis Data // Analytics application can perform. If AutoScalingEnabled is set to True, then // Kinesis Data Analytics can increase the CurrentParallelism value in response to // application load. The service can increase CurrentParallelism up to the maximum // parallelism, which is ParalellismPerKPU times the maximum KPUs for the // application. The maximum KPUs for an application is 32 by default, and can be // increased by requesting a limit increase. If application load is reduced, the // service can reduce the CurrentParallelism value down to the Parallelism setting. Parallelism *int32 // Describes the number of parallel tasks that a Flink-based Kinesis Data // Analytics application can perform per Kinesis Processing Unit (KPU) used by the // application. ParallelismPerKPU *int32 noSmithyDocumentSerde } // Describes updates to parameters for how an application executes multiple tasks // simultaneously. type ParallelismConfigurationUpdate struct { // Describes updates to whether the Kinesis Data Analytics service can increase // the parallelism of a Flink-based Kinesis Data Analytics application in response // to increased throughput. AutoScalingEnabledUpdate *bool // Describes updates to whether the application uses the default parallelism for // the Kinesis Data Analytics service, or if a custom parallelism is used. You must // set this property to CUSTOM in order to change your application's // AutoScalingEnabled , Parallelism , or ParallelismPerKPU properties. ConfigurationTypeUpdate ConfigurationType // Describes updates to the number of parallel tasks an application can perform // per Kinesis Processing Unit (KPU) used by the application. ParallelismPerKPUUpdate *int32 // Describes updates to the initial number of parallel tasks an application can // perform. If AutoScalingEnabled is set to True, then Kinesis Data Analytics can // increase the CurrentParallelism value in response to application load. The // service can increase CurrentParallelism up to the maximum parallelism, which is // ParalellismPerKPU times the maximum KPUs for the application. The maximum KPUs // for an application is 32 by default, and can be increased by requesting a limit // increase. If application load is reduced, the service will reduce // CurrentParallelism down to the Parallelism setting. ParallelismUpdate *int32 noSmithyDocumentSerde } // Property key-value pairs passed into an application. type PropertyGroup struct { // Describes the key of an application execution property key-value pair. // // This member is required. PropertyGroupId *string // Describes the value of an application execution property key-value pair. // // This member is required. PropertyMap map[string]string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the mapping of // each data element in the streaming source to the corresponding column in the // in-application stream. Also used to describe the format of the reference data // source. type RecordColumn struct { // The name of the column that is created in the in-application input stream or // reference table. // // This member is required. Name *string // The type of column created in the in-application input stream or reference // table. // // This member is required. SqlType *string // A reference to the data element in the streaming input or the reference data // source. Mapping *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the record format // and relevant mapping information that should be applied to schematize the // records on the stream. type RecordFormat struct { // The type of record format. // // This member is required. RecordFormatType RecordFormatType // When you configure application input at the time of creating or updating an // application, provides additional mapping information specific to the record // format (such as JSON, CSV, or record fields delimited by some delimiter) on the // streaming source. MappingParameters *MappingParameters noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the reference // data source by providing the source information (Amazon S3 bucket name and // object key name), the resulting in-application table name that is created, and // the necessary schema to map the data elements in the Amazon S3 object to the // in-application table. type ReferenceDataSource struct { // Describes the format of the data in the streaming source, and how each data // element maps to corresponding columns created in the in-application stream. // // This member is required. ReferenceSchema *SourceSchema // The name of the in-application table to create. // // This member is required. TableName *string // Identifies the S3 bucket and object that contains the reference data. A Kinesis // Data Analytics application loads reference data only once. If the data changes, // you call the UpdateApplication operation to trigger reloading of data into your // application. S3ReferenceDataSource *S3ReferenceDataSource noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the reference // data source configured for an application. type ReferenceDataSourceDescription struct { // The ID of the reference data source. This is the ID that Kinesis Data Analytics // assigns when you add the reference data source to your application using the // CreateApplication or UpdateApplication operation. // // This member is required. ReferenceId *string // Provides the Amazon S3 bucket name, the object key name that contains the // reference data. // // This member is required. S3ReferenceDataSourceDescription *S3ReferenceDataSourceDescription // The in-application table name created by the specific reference data source // configuration. // // This member is required. TableName *string // Describes the format of the data in the streaming source, and how each data // element maps to corresponding columns created in the in-application stream. ReferenceSchema *SourceSchema noSmithyDocumentSerde } // When you update a reference data source configuration for a SQL-based Kinesis // Data Analytics application, this object provides all the updated values (such as // the source bucket name and object key name), the in-application table name that // is created, and updated mapping information that maps the data in the Amazon S3 // object to the in-application reference table that is created. type ReferenceDataSourceUpdate struct { // The ID of the reference data source that is being updated. You can use the // DescribeApplication operation to get this value. // // This member is required. ReferenceId *string // Describes the format of the data in the streaming source, and how each data // element maps to corresponding columns created in the in-application stream. ReferenceSchemaUpdate *SourceSchema // Describes the S3 bucket name, object key name, and IAM role that Kinesis Data // Analytics can assume to read the Amazon S3 object on your behalf and populate // the in-application reference table. S3ReferenceDataSourceUpdate *S3ReferenceDataSourceUpdate // The in-application table name that is created by this update. TableNameUpdate *string noSmithyDocumentSerde } // Describes the starting parameters for an Kinesis Data Analytics application. type RunConfiguration struct { // Describes the restore behavior of a restarting application. ApplicationRestoreConfiguration *ApplicationRestoreConfiguration // Describes the starting parameters for a Flink-based Kinesis Data Analytics // application. FlinkRunConfiguration *FlinkRunConfiguration // Describes the starting parameters for a SQL-based Kinesis Data Analytics // application application. SqlRunConfigurations []SqlRunConfiguration noSmithyDocumentSerde } // Describes the starting properties for a Kinesis Data Analytics application. type RunConfigurationDescription struct { // Describes the restore behavior of a restarting application. ApplicationRestoreConfigurationDescription *ApplicationRestoreConfiguration // Describes the starting parameters for a Flink-based Kinesis Data Analytics // application. FlinkRunConfigurationDescription *FlinkRunConfiguration noSmithyDocumentSerde } // Describes the updates to the starting parameters for a Kinesis Data Analytics // application. type RunConfigurationUpdate struct { // Describes updates to the restore behavior of a restarting application. ApplicationRestoreConfiguration *ApplicationRestoreConfiguration // Describes the starting parameters for a Flink-based Kinesis Data Analytics // application. FlinkRunConfiguration *FlinkRunConfiguration noSmithyDocumentSerde } // Describes the location of an application's code stored in an S3 bucket. type S3ApplicationCodeLocationDescription struct { // The Amazon Resource Name (ARN) for the S3 bucket containing the application // code. // // This member is required. BucketARN *string // The file key for the object containing the application code. // // This member is required. FileKey *string // The version of the object containing the application code. ObjectVersion *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, provides a description of // an Amazon S3 data source, including the Amazon Resource Name (ARN) of the S3 // bucket and the name of the Amazon S3 object that contains the data. type S3Configuration struct { // The ARN of the S3 bucket that contains the data. // // This member is required. BucketARN *string // The name of the object that contains the data. // // This member is required. FileKey *string noSmithyDocumentSerde } // The S3 bucket that holds the application information. type S3ContentBaseLocation struct { // The Amazon Resource Name (ARN) of the S3 bucket. // // This member is required. BucketARN *string // The base path for the S3 bucket. BasePath *string noSmithyDocumentSerde } // The description of the S3 base location that holds the application. type S3ContentBaseLocationDescription struct { // The Amazon Resource Name (ARN) of the S3 bucket. // // This member is required. BucketARN *string // The base path for the S3 bucket. BasePath *string noSmithyDocumentSerde } // The information required to update the S3 base location that holds the // application. type S3ContentBaseLocationUpdate struct { // The updated S3 bucket path. BasePathUpdate *string // The updated Amazon Resource Name (ARN) of the S3 bucket. BucketARNUpdate *string noSmithyDocumentSerde } // For a Kinesis Data Analytics application provides a description of an Amazon S3 // object, including the Amazon Resource Name (ARN) of the S3 bucket, the name of // the Amazon S3 object that contains the data, and the version number of the // Amazon S3 object that contains the data. type S3ContentLocation struct { // The Amazon Resource Name (ARN) for the S3 bucket containing the application // code. // // This member is required. BucketARN *string // The file key for the object containing the application code. // // This member is required. FileKey *string // The version of the object containing the application code. ObjectVersion *string noSmithyDocumentSerde } // Describes an update for the Amazon S3 code content location for an application. type S3ContentLocationUpdate struct { // The new Amazon Resource Name (ARN) for the S3 bucket containing the application // code. BucketARNUpdate *string // The new file key for the object containing the application code. FileKeyUpdate *string // The new version of the object containing the application code. ObjectVersionUpdate *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, identifies the Amazon S3 // bucket and object that contains the reference data. A Kinesis Data Analytics // application loads reference data only once. If the data changes, you call the // UpdateApplication operation to trigger reloading of data into your application. type S3ReferenceDataSource struct { // The Amazon Resource Name (ARN) of the S3 bucket. BucketARN *string // The object key name containing the reference data. FileKey *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, provides the bucket name // and object key name that stores the reference data. type S3ReferenceDataSourceDescription struct { // The Amazon Resource Name (ARN) of the S3 bucket. // // This member is required. BucketARN *string // Amazon S3 object key name. // // This member is required. FileKey *string // The ARN of the IAM role that Kinesis Data Analytics can assume to read the // Amazon S3 object on your behalf to populate the in-application reference table. // Provided for backward compatibility. Applications that are created with the // current API version have an application-level service execution role rather than // a resource-level role. ReferenceRoleARN *string noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the Amazon S3 // bucket name and object key name for an in-application reference table. type S3ReferenceDataSourceUpdate struct { // The Amazon Resource Name (ARN) of the S3 bucket. BucketARNUpdate *string // The object key name. FileKeyUpdate *string noSmithyDocumentSerde } // Provides details about a snapshot of application state. type SnapshotDetails struct { // The current application version ID when the snapshot was created. // // This member is required. ApplicationVersionId *int64 // The identifier for the application snapshot. // // This member is required. SnapshotName *string // The status of the application snapshot. // // This member is required. SnapshotStatus SnapshotStatus // The timestamp of the application snapshot. SnapshotCreationTimestamp *time.Time noSmithyDocumentSerde } // For a SQL-based Kinesis Data Analytics application, describes the format of the // data in the streaming source, and how each data element maps to corresponding // columns created in the in-application stream. type SourceSchema struct { // A list of RecordColumn objects. // // This member is required. RecordColumns []RecordColumn // Specifies the format of the records on the streaming source. // // This member is required. RecordFormat *RecordFormat // Specifies the encoding of the records in the streaming source. For example, // UTF-8. RecordEncoding *string noSmithyDocumentSerde } // Describes the inputs, outputs, and reference data sources for a SQL-based // Kinesis Data Analytics application. type SqlApplicationConfiguration struct { // The array of Input objects describing the input streams used by the application. Inputs []Input // The array of Output objects describing the destination streams used by the // application. Outputs []Output // The array of ReferenceDataSource objects describing the reference data sources // used by the application. ReferenceDataSources []ReferenceDataSource noSmithyDocumentSerde } // Describes the inputs, outputs, and reference data sources for a SQL-based // Kinesis Data Analytics application. type SqlApplicationConfigurationDescription struct { // The array of InputDescription objects describing the input streams used by the // application. InputDescriptions []InputDescription // The array of OutputDescription objects describing the destination streams used // by the application. OutputDescriptions []OutputDescription // The array of ReferenceDataSourceDescription objects describing the reference // data sources used by the application. ReferenceDataSourceDescriptions []ReferenceDataSourceDescription noSmithyDocumentSerde } // Describes updates to the input streams, destination streams, and reference data // sources for a SQL-based Kinesis Data Analytics application. type SqlApplicationConfigurationUpdate struct { // The array of InputUpdate objects describing the new input streams used by the // application. InputUpdates []InputUpdate // The array of OutputUpdate objects describing the new destination streams used // by the application. OutputUpdates []OutputUpdate // The array of ReferenceDataSourceUpdate objects describing the new reference // data sources used by the application. ReferenceDataSourceUpdates []ReferenceDataSourceUpdate noSmithyDocumentSerde } // Describes the starting parameters for a SQL-based Kinesis Data Analytics // application. type SqlRunConfiguration struct { // The input source ID. You can get this ID by calling the DescribeApplication // operation. // // This member is required. InputId *string // The point at which you want the application to start processing records from // the streaming source. // // This member is required. InputStartingPositionConfiguration *InputStartingPositionConfiguration noSmithyDocumentSerde } // A key-value pair (the value is optional) that you can define and assign to // Amazon resources. If you specify a tag that already exists, the tag value is // replaced with the value that you specify in the request. Note that the maximum // number of application tags includes system tags. The maximum number of // user-defined application tags is 50. For more information, see Using Tagging (https://docs.aws.amazon.com/kinesisanalytics/latest/java/how-tagging.html) // . type Tag struct { // The key of the key-value tag. // // This member is required. Key *string // The value of the key-value tag. The value is optional. Value *string noSmithyDocumentSerde } // Describes the parameters of a VPC used by the application. type VpcConfiguration struct { // The array of SecurityGroup (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SecurityGroup.html) // IDs used by the VPC configuration. // // This member is required. SecurityGroupIds []string // The array of Subnet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Subnet.html) // IDs used by the VPC configuration. // // This member is required. SubnetIds []string noSmithyDocumentSerde } // Describes the parameters of a VPC used by the application. type VpcConfigurationDescription struct { // The array of SecurityGroup (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SecurityGroup.html) // IDs used by the VPC configuration. // // This member is required. SecurityGroupIds []string // The array of Subnet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Subnet.html) // IDs used by the VPC configuration. // // This member is required. SubnetIds []string // The ID of the VPC configuration. // // This member is required. VpcConfigurationId *string // The ID of the associated VPC. // // This member is required. VpcId *string noSmithyDocumentSerde } // Describes updates to the VPC configuration used by the application. type VpcConfigurationUpdate struct { // Describes an update to the ID of the VPC configuration. // // This member is required. VpcConfigurationId *string // Describes updates to the array of SecurityGroup (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SecurityGroup.html) // IDs used by the VPC configuration. SecurityGroupIdUpdates []string // Describes updates to the array of Subnet (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Subnet.html) // IDs used by the VPC configuration. SubnetIdUpdates []string noSmithyDocumentSerde } // The configuration of a Kinesis Data Analytics Studio notebook. type ZeppelinApplicationConfiguration struct { // The Amazon Glue Data Catalog that you use in queries in a Kinesis Data // Analytics Studio notebook. CatalogConfiguration *CatalogConfiguration // Custom artifacts are dependency JARs and user-defined functions (UDF). CustomArtifactsConfiguration []CustomArtifactConfiguration // The information required to deploy a Kinesis Data Analytics Studio notebook as // an application with durable state. DeployAsApplicationConfiguration *DeployAsApplicationConfiguration // The monitoring configuration of a Kinesis Data Analytics Studio notebook. MonitoringConfiguration *ZeppelinMonitoringConfiguration noSmithyDocumentSerde } // The configuration of a Kinesis Data Analytics Studio notebook. type ZeppelinApplicationConfigurationDescription struct { // The monitoring configuration of a Kinesis Data Analytics Studio notebook. // // This member is required. MonitoringConfigurationDescription *ZeppelinMonitoringConfigurationDescription // The Amazon Glue Data Catalog that is associated with the Kinesis Data Analytics // Studio notebook. CatalogConfigurationDescription *CatalogConfigurationDescription // Custom artifacts are dependency JARs and user-defined functions (UDF). CustomArtifactsConfigurationDescription []CustomArtifactConfigurationDescription // The parameters required to deploy a Kinesis Data Analytics Studio notebook as // an application with durable state. DeployAsApplicationConfigurationDescription *DeployAsApplicationConfigurationDescription noSmithyDocumentSerde } // Updates to the configuration of Kinesis Data Analytics Studio notebook. type ZeppelinApplicationConfigurationUpdate struct { // Updates to the configuration of the Amazon Glue Data Catalog that is associated // with the Kinesis Data Analytics Studio notebook. CatalogConfigurationUpdate *CatalogConfigurationUpdate // Updates to the customer artifacts. Custom artifacts are dependency JAR files // and user-defined functions (UDF). CustomArtifactsConfigurationUpdate []CustomArtifactConfiguration // Updates to the configuration information required to deploy an Amazon Data // Analytics Studio notebook as an application with durable state. DeployAsApplicationConfigurationUpdate *DeployAsApplicationConfigurationUpdate // Updates to the monitoring configuration of a Kinesis Data Analytics Studio // notebook. MonitoringConfigurationUpdate *ZeppelinMonitoringConfigurationUpdate noSmithyDocumentSerde } // Describes configuration parameters for Amazon CloudWatch logging for a Kinesis // Data Analytics Studio notebook. For more information about CloudWatch logging, // see Monitoring (https://docs.aws.amazon.com/kinesisanalytics/latest/java/monitoring-overview.html) // . type ZeppelinMonitoringConfiguration struct { // The verbosity of the CloudWatch Logs for an application. // // This member is required. LogLevel LogLevel noSmithyDocumentSerde } // The monitoring configuration for Apache Zeppelin within a Kinesis Data // Analytics Studio notebook. type ZeppelinMonitoringConfigurationDescription struct { // Describes the verbosity of the CloudWatch Logs for an application. LogLevel LogLevel noSmithyDocumentSerde } // Updates to the monitoring configuration for Apache Zeppelin within a Kinesis // Data Analytics Studio notebook. type ZeppelinMonitoringConfigurationUpdate struct { // Updates to the logging level for Apache Zeppelin within a Kinesis Data // Analytics Studio notebook. // // This member is required. LogLevelUpdate LogLevel noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
2,364
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "Kinesis Video" const ServiceAPIVersion = "2017-09-30" // Client provides the API client to make operations call for Amazon Kinesis Video // Streams. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "kinesisvideo", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
435
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a signaling channel. CreateSignalingChannel is an asynchronous // operation. func (c *Client) CreateSignalingChannel(ctx context.Context, params *CreateSignalingChannelInput, optFns ...func(*Options)) (*CreateSignalingChannelOutput, error) { if params == nil { params = &CreateSignalingChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateSignalingChannel", params, optFns, c.addOperationCreateSignalingChannelMiddlewares) if err != nil { return nil, err } out := result.(*CreateSignalingChannelOutput) out.ResultMetadata = metadata return out, nil } type CreateSignalingChannelInput struct { // A name for the signaling channel that you are creating. It must be unique for // each Amazon Web Services account and Amazon Web Services Region. // // This member is required. ChannelName *string // A type of the signaling channel that you are creating. Currently, SINGLE_MASTER // is the only supported channel type. ChannelType types.ChannelType // A structure containing the configuration for the SINGLE_MASTER channel type. SingleMasterConfiguration *types.SingleMasterConfiguration // A set of tags (key-value pairs) that you want to associate with this channel. Tags []types.Tag noSmithyDocumentSerde } type CreateSignalingChannelOutput struct { // The Amazon Resource Name (ARN) of the created channel. ChannelARN *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateSignalingChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSignalingChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSignalingChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateSignalingChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSignalingChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateSignalingChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "CreateSignalingChannel", } }
137
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Creates a new Kinesis video stream. When you create a new stream, Kinesis Video // Streams assigns it a version number. When you change the stream's metadata, // Kinesis Video Streams updates the version. CreateStream is an asynchronous // operation. For information about how the service works, see How it Works (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/how-it-works.html) // . You must have permissions for the KinesisVideo:CreateStream action. func (c *Client) CreateStream(ctx context.Context, params *CreateStreamInput, optFns ...func(*Options)) (*CreateStreamOutput, error) { if params == nil { params = &CreateStreamInput{} } result, metadata, err := c.invokeOperation(ctx, "CreateStream", params, optFns, c.addOperationCreateStreamMiddlewares) if err != nil { return nil, err } out := result.(*CreateStreamOutput) out.ResultMetadata = metadata return out, nil } type CreateStreamInput struct { // A name for the stream that you are creating. The stream name is an identifier // for the stream, and must be unique for each account and region. // // This member is required. StreamName *string // The number of hours that you want to retain the data in the stream. Kinesis // Video Streams retains the data in a data store that is associated with the // stream. The default value is 0, indicating that the stream does not persist // data. When the DataRetentionInHours value is 0, consumers can still consume the // fragments that remain in the service host buffer, which has a retention time // limit of 5 minutes and a retention memory limit of 200 MB. Fragments are removed // from the buffer when either limit is reached. DataRetentionInHours *int32 // The name of the device that is writing to the stream. In the current // implementation, Kinesis Video Streams does not use this name. DeviceName *string // The ID of the Key Management Service (KMS) key that you want Kinesis Video // Streams to use to encrypt stream data. If no key ID is specified, the default, // Kinesis Video-managed key ( Amazon Web Services/kinesisvideo ) is used. For more // information, see DescribeKey (https://docs.aws.amazon.com/kms/latest/APIReference/API_DescribeKey.html#API_DescribeKey_RequestParameters) // . KmsKeyId *string // The media type of the stream. Consumers of the stream can use this information // when processing the stream. For more information about media types, see Media // Types (http://www.iana.org/assignments/media-types/media-types.xhtml) . If you // choose to specify the MediaType , see Naming Requirements (https://tools.ietf.org/html/rfc6838#section-4.2) // for guidelines. Example valid values include "video/h264" and // "video/h264,audio/aac". This parameter is optional; the default value is null // (or empty in JSON). MediaType *string // A list of tags to associate with the specified stream. Each tag is a key-value // pair (the value is optional). Tags map[string]string noSmithyDocumentSerde } type CreateStreamOutput struct { // The Amazon Resource Name (ARN) of the stream. StreamARN *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationCreateStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateStream{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateStream{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpCreateStreamValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStream(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opCreateStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "CreateStream", } }
162
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // An asynchronous API that deletes a stream’s existing edge configuration, as // well as the corresponding media from the Edge Agent. When you invoke this API, // the sync status is set to DELETING . A deletion process starts, in which active // edge jobs are stopped and all media is deleted from the edge device. The time to // delete varies, depending on the total amount of stored media. If the deletion // process fails, the sync status changes to DELETE_FAILED . You will need to // re-try the deletion. When the deletion process has completed successfully, the // edge configuration is no longer accessible. func (c *Client) DeleteEdgeConfiguration(ctx context.Context, params *DeleteEdgeConfigurationInput, optFns ...func(*Options)) (*DeleteEdgeConfigurationOutput, error) { if params == nil { params = &DeleteEdgeConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteEdgeConfiguration", params, optFns, c.addOperationDeleteEdgeConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DeleteEdgeConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DeleteEdgeConfigurationInput struct { // The Amazon Resource Name (ARN) of the stream. Specify either the StreamName or // the StreamARN . StreamARN *string // The name of the stream from which to delete the edge configuration. Specify // either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type DeleteEdgeConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteEdgeConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteEdgeConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteEdgeConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteEdgeConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteEdgeConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DeleteEdgeConfiguration", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a specified signaling channel. DeleteSignalingChannel is an // asynchronous operation. If you don't specify the channel's current version, the // most recent version is deleted. func (c *Client) DeleteSignalingChannel(ctx context.Context, params *DeleteSignalingChannelInput, optFns ...func(*Options)) (*DeleteSignalingChannelOutput, error) { if params == nil { params = &DeleteSignalingChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteSignalingChannel", params, optFns, c.addOperationDeleteSignalingChannelMiddlewares) if err != nil { return nil, err } out := result.(*DeleteSignalingChannelOutput) out.ResultMetadata = metadata return out, nil } type DeleteSignalingChannelInput struct { // The Amazon Resource Name (ARN) of the signaling channel that you want to delete. // // This member is required. ChannelARN *string // The current version of the signaling channel that you want to delete. You can // obtain the current version by invoking the DescribeSignalingChannel or // ListSignalingChannels API operations. CurrentVersion *string noSmithyDocumentSerde } type DeleteSignalingChannelOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteSignalingChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteSignalingChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteSignalingChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteSignalingChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSignalingChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteSignalingChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DeleteSignalingChannel", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Deletes a Kinesis video stream and the data contained in the stream. This // method marks the stream for deletion, and makes the data in the stream // inaccessible immediately. To ensure that you have the latest version of the // stream before deleting it, you can specify the stream version. Kinesis Video // Streams assigns a version to each stream. When you update a stream, Kinesis // Video Streams assigns a new version number. To get the latest stream version, // use the DescribeStream API. This operation requires permission for the // KinesisVideo:DeleteStream action. func (c *Client) DeleteStream(ctx context.Context, params *DeleteStreamInput, optFns ...func(*Options)) (*DeleteStreamOutput, error) { if params == nil { params = &DeleteStreamInput{} } result, metadata, err := c.invokeOperation(ctx, "DeleteStream", params, optFns, c.addOperationDeleteStreamMiddlewares) if err != nil { return nil, err } out := result.(*DeleteStreamOutput) out.ResultMetadata = metadata return out, nil } type DeleteStreamInput struct { // The Amazon Resource Name (ARN) of the stream that you want to delete. // // This member is required. StreamARN *string // Optional: The version of the stream that you want to delete. Specify the // version as a safeguard to ensure that your are deleting the correct stream. To // get the stream version, use the DescribeStream API. If not specified, only the // CreationTime is checked before deleting the stream. CurrentVersion *string noSmithyDocumentSerde } type DeleteStreamOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDeleteStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteStream{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteStream{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpDeleteStreamValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteStream(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDeleteStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DeleteStream", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Describes a stream’s edge configuration that was set using the // StartEdgeConfigurationUpdate API and the latest status of the edge agent's // recorder and uploader jobs. Use this API to get the status of the configuration // to determine if the configuration is in sync with the Edge Agent. Use this API // to evaluate the health of the Edge Agent. func (c *Client) DescribeEdgeConfiguration(ctx context.Context, params *DescribeEdgeConfigurationInput, optFns ...func(*Options)) (*DescribeEdgeConfigurationOutput, error) { if params == nil { params = &DescribeEdgeConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeEdgeConfiguration", params, optFns, c.addOperationDescribeEdgeConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeEdgeConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeEdgeConfigurationInput struct { // The Amazon Resource Name (ARN) of the stream. Specify either the StreamName or // the StreamARN . StreamARN *string // The name of the stream whose edge configuration you want to update. Specify // either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type DescribeEdgeConfigurationOutput struct { // The timestamp at which a stream’s edge configuration was first created. CreationTime *time.Time // An object that contains the latest status details for an edge agent's recorder // and uploader jobs. Use this information to determine the current health of an // edge agent. EdgeAgentStatus *types.EdgeAgentStatus // A description of the stream's edge configuration that will be used to sync with // the Edge Agent IoT Greengrass component. The Edge Agent component will run on an // IoT Hub Device setup at your premise. EdgeConfig *types.EdgeConfig // A description of the generated failure status. FailedStatusDetails *string // The timestamp at which a stream’s edge configuration was last updated. LastUpdatedTime *time.Time // The Amazon Resource Name (ARN) of the stream. StreamARN *string // The name of the stream from which the edge configuration was updated. StreamName *string // The latest status of the edge configuration update. SyncStatus types.SyncStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeEdgeConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeEdgeConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeEdgeConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeEdgeConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeEdgeConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DescribeEdgeConfiguration", } }
155
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets the ImageGenerationConfiguration for a given Kinesis video stream. func (c *Client) DescribeImageGenerationConfiguration(ctx context.Context, params *DescribeImageGenerationConfigurationInput, optFns ...func(*Options)) (*DescribeImageGenerationConfigurationOutput, error) { if params == nil { params = &DescribeImageGenerationConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeImageGenerationConfiguration", params, optFns, c.addOperationDescribeImageGenerationConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeImageGenerationConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeImageGenerationConfigurationInput struct { // The Amazon Resource Name (ARN) of the Kinesis video stream from which to // retrieve the image generation configuration. You must specify either the // StreamName or the StreamARN . StreamARN *string // The name of the stream from which to retrieve the image generation // configuration. You must specify either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type DescribeImageGenerationConfigurationOutput struct { // The structure that contains the information required for the Kinesis video // stream (KVS) images delivery. If this structure is null, the configuration will // be deleted from the stream. ImageGenerationConfiguration *types.ImageGenerationConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeImageGenerationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeImageGenerationConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeImageGenerationConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeImageGenerationConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeImageGenerationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DescribeImageGenerationConfiguration", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the most current information about the stream. The streamName or // streamARN should be provided in the input. func (c *Client) DescribeMappedResourceConfiguration(ctx context.Context, params *DescribeMappedResourceConfigurationInput, optFns ...func(*Options)) (*DescribeMappedResourceConfigurationOutput, error) { if params == nil { params = &DescribeMappedResourceConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeMappedResourceConfiguration", params, optFns, c.addOperationDescribeMappedResourceConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeMappedResourceConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeMappedResourceConfigurationInput struct { // The maximum number of results to return in the response. MaxResults *int32 // The token to provide in your next request, to get another batch of results. NextToken *string // The Amazon Resource Name (ARN) of the stream. StreamARN *string // The name of the stream. StreamName *string noSmithyDocumentSerde } type DescribeMappedResourceConfigurationOutput struct { // A structure that encapsulates, or contains, the media storage configuration // properties. MappedResourceConfigurationList []types.MappedResourceConfigurationListItem // The token that was used in the NextToken request to fetch the next set of // results. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeMappedResourceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeMappedResourceConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeMappedResourceConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMappedResourceConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // DescribeMappedResourceConfigurationAPIClient is a client that implements the // DescribeMappedResourceConfiguration operation. type DescribeMappedResourceConfigurationAPIClient interface { DescribeMappedResourceConfiguration(context.Context, *DescribeMappedResourceConfigurationInput, ...func(*Options)) (*DescribeMappedResourceConfigurationOutput, error) } var _ DescribeMappedResourceConfigurationAPIClient = (*Client)(nil) // DescribeMappedResourceConfigurationPaginatorOptions is the paginator options // for DescribeMappedResourceConfiguration type DescribeMappedResourceConfigurationPaginatorOptions struct { // The maximum number of results to return in the response. 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 } // DescribeMappedResourceConfigurationPaginator is a paginator for // DescribeMappedResourceConfiguration type DescribeMappedResourceConfigurationPaginator struct { options DescribeMappedResourceConfigurationPaginatorOptions client DescribeMappedResourceConfigurationAPIClient params *DescribeMappedResourceConfigurationInput nextToken *string firstPage bool } // NewDescribeMappedResourceConfigurationPaginator returns a new // DescribeMappedResourceConfigurationPaginator func NewDescribeMappedResourceConfigurationPaginator(client DescribeMappedResourceConfigurationAPIClient, params *DescribeMappedResourceConfigurationInput, optFns ...func(*DescribeMappedResourceConfigurationPaginatorOptions)) *DescribeMappedResourceConfigurationPaginator { if params == nil { params = &DescribeMappedResourceConfigurationInput{} } options := DescribeMappedResourceConfigurationPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &DescribeMappedResourceConfigurationPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *DescribeMappedResourceConfigurationPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next DescribeMappedResourceConfiguration page. func (p *DescribeMappedResourceConfigurationPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMappedResourceConfigurationOutput, 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.DescribeMappedResourceConfiguration(ctx, &params, 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_opDescribeMappedResourceConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DescribeMappedResourceConfiguration", } }
229
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the most current information about the channel. Specify the ChannelName // or ChannelARN in the input. func (c *Client) DescribeMediaStorageConfiguration(ctx context.Context, params *DescribeMediaStorageConfigurationInput, optFns ...func(*Options)) (*DescribeMediaStorageConfigurationOutput, error) { if params == nil { params = &DescribeMediaStorageConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeMediaStorageConfiguration", params, optFns, c.addOperationDescribeMediaStorageConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeMediaStorageConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeMediaStorageConfigurationInput struct { // The Amazon Resource Name (ARN) of the channel. ChannelARN *string // The name of the channel. ChannelName *string noSmithyDocumentSerde } type DescribeMediaStorageConfigurationOutput struct { // A structure that encapsulates, or contains, the media storage configuration // properties. MediaStorageConfiguration *types.MediaStorageConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeMediaStorageConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeMediaStorageConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeMediaStorageConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMediaStorageConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeMediaStorageConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DescribeMediaStorageConfiguration", } }
125
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets the NotificationConfiguration for a given Kinesis video stream. func (c *Client) DescribeNotificationConfiguration(ctx context.Context, params *DescribeNotificationConfigurationInput, optFns ...func(*Options)) (*DescribeNotificationConfigurationOutput, error) { if params == nil { params = &DescribeNotificationConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeNotificationConfiguration", params, optFns, c.addOperationDescribeNotificationConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*DescribeNotificationConfigurationOutput) out.ResultMetadata = metadata return out, nil } type DescribeNotificationConfigurationInput struct { // The Amazon Resource Name (ARN) of the Kinesis video stream from where you want // to retrieve the notification configuration. You must specify either the // StreamName or the StreamARN. StreamARN *string // The name of the stream from which to retrieve the notification configuration. // You must specify either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type DescribeNotificationConfigurationOutput struct { // The structure that contains the information required for notifications. If the // structure is null, the configuration will be deleted from the stream. NotificationConfiguration *types.NotificationConfiguration // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeNotificationConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeNotificationConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeNotificationConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DescribeNotificationConfiguration", } }
127
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the most current information about the signaling channel. You must // specify either the name or the Amazon Resource Name (ARN) of the channel that // you want to describe. func (c *Client) DescribeSignalingChannel(ctx context.Context, params *DescribeSignalingChannelInput, optFns ...func(*Options)) (*DescribeSignalingChannelOutput, error) { if params == nil { params = &DescribeSignalingChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeSignalingChannel", params, optFns, c.addOperationDescribeSignalingChannelMiddlewares) if err != nil { return nil, err } out := result.(*DescribeSignalingChannelOutput) out.ResultMetadata = metadata return out, nil } type DescribeSignalingChannelInput struct { // The ARN of the signaling channel that you want to describe. ChannelARN *string // The name of the signaling channel that you want to describe. ChannelName *string noSmithyDocumentSerde } type DescribeSignalingChannelOutput struct { // A structure that encapsulates the specified signaling channel's metadata and // properties. ChannelInfo *types.ChannelInfo // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeSignalingChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeSignalingChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeSignalingChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSignalingChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeSignalingChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DescribeSignalingChannel", } }
126
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns the most current information about the specified stream. You must // specify either the StreamName or the StreamARN . func (c *Client) DescribeStream(ctx context.Context, params *DescribeStreamInput, optFns ...func(*Options)) (*DescribeStreamOutput, error) { if params == nil { params = &DescribeStreamInput{} } result, metadata, err := c.invokeOperation(ctx, "DescribeStream", params, optFns, c.addOperationDescribeStreamMiddlewares) if err != nil { return nil, err } out := result.(*DescribeStreamOutput) out.ResultMetadata = metadata return out, nil } type DescribeStreamInput struct { // The Amazon Resource Name (ARN) of the stream. StreamARN *string // The name of the stream. StreamName *string noSmithyDocumentSerde } type DescribeStreamOutput struct { // An object that describes the stream. StreamInfo *types.StreamInfo // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationDescribeStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeStream{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeStream{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeStream(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opDescribeStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "DescribeStream", } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Gets an endpoint for a specified stream for either reading or writing. Use this // endpoint in your application to read from the specified stream (using the // GetMedia or GetMediaForFragmentList operations) or write to it (using the // PutMedia operation). The returned endpoint does not have the API name appended. // The client needs to add the API name to the returned endpoint. In the request, // specify the stream either by StreamName or StreamARN . func (c *Client) GetDataEndpoint(ctx context.Context, params *GetDataEndpointInput, optFns ...func(*Options)) (*GetDataEndpointOutput, error) { if params == nil { params = &GetDataEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "GetDataEndpoint", params, optFns, c.addOperationGetDataEndpointMiddlewares) if err != nil { return nil, err } out := result.(*GetDataEndpointOutput) out.ResultMetadata = metadata return out, nil } type GetDataEndpointInput struct { // The name of the API action for which to get an endpoint. // // This member is required. APIName types.APIName // The Amazon Resource Name (ARN) of the stream that you want to get the endpoint // for. You must specify either this parameter or a StreamName in the request. StreamARN *string // The name of the stream that you want to get the endpoint for. You must specify // either this parameter or a StreamARN in the request. StreamName *string noSmithyDocumentSerde } type GetDataEndpointOutput struct { // The endpoint value. To read data from the stream or to write data to it, // specify this endpoint in your application. DataEndpoint *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetDataEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetDataEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetDataEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetDataEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDataEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetDataEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "GetDataEndpoint", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Provides an endpoint for the specified signaling channel to send and receive // messages. This API uses the SingleMasterChannelEndpointConfiguration input // parameter, which consists of the Protocols and Role properties. Protocols is // used to determine the communication mechanism. For example, if you specify WSS // as the protocol, this API produces a secure websocket endpoint. If you specify // HTTPS as the protocol, this API generates an HTTPS endpoint. Role determines // the messaging permissions. A MASTER role results in this API generating an // endpoint that a client can use to communicate with any of the viewers on the // channel. A VIEWER role results in this API generating an endpoint that a client // can use to communicate only with a MASTER . func (c *Client) GetSignalingChannelEndpoint(ctx context.Context, params *GetSignalingChannelEndpointInput, optFns ...func(*Options)) (*GetSignalingChannelEndpointOutput, error) { if params == nil { params = &GetSignalingChannelEndpointInput{} } result, metadata, err := c.invokeOperation(ctx, "GetSignalingChannelEndpoint", params, optFns, c.addOperationGetSignalingChannelEndpointMiddlewares) if err != nil { return nil, err } out := result.(*GetSignalingChannelEndpointOutput) out.ResultMetadata = metadata return out, nil } type GetSignalingChannelEndpointInput struct { // The Amazon Resource Name (ARN) of the signalling channel for which you want to // get an endpoint. // // This member is required. ChannelARN *string // A structure containing the endpoint configuration for the SINGLE_MASTER channel // type. SingleMasterChannelEndpointConfiguration *types.SingleMasterChannelEndpointConfiguration noSmithyDocumentSerde } type GetSignalingChannelEndpointOutput struct { // A list of endpoints for the specified signaling channel. ResourceEndpointList []types.ResourceEndpointListItem // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetSignalingChannelEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSignalingChannelEndpoint{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSignalingChannelEndpoint{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetSignalingChannelEndpointValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSignalingChannelEndpoint(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetSignalingChannelEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "GetSignalingChannelEndpoint", } }
139
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns an array of edge configurations associated with the specified Edge // Agent. In the request, you must specify the Edge Agent HubDeviceArn . func (c *Client) ListEdgeAgentConfigurations(ctx context.Context, params *ListEdgeAgentConfigurationsInput, optFns ...func(*Options)) (*ListEdgeAgentConfigurationsOutput, error) { if params == nil { params = &ListEdgeAgentConfigurationsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListEdgeAgentConfigurations", params, optFns, c.addOperationListEdgeAgentConfigurationsMiddlewares) if err != nil { return nil, err } out := result.(*ListEdgeAgentConfigurationsOutput) out.ResultMetadata = metadata return out, nil } type ListEdgeAgentConfigurationsInput struct { // The "Internet of Things (IoT) Thing" Arn of the edge agent. // // This member is required. HubDeviceArn *string // The maximum number of edge configurations to return in the response. The // default is 5. MaxResults *int32 // If you specify this parameter, when the result of a ListEdgeAgentConfigurations // operation is truncated, the call returns the NextToken in the response. To get // another batch of edge configurations, provide this token in your next request. NextToken *string noSmithyDocumentSerde } type ListEdgeAgentConfigurationsOutput struct { // A description of a single stream's edge configuration. EdgeConfigs []types.ListEdgeAgentConfigurationsEdgeConfig // If the response is truncated, the call returns this element with a given token. // To get the next batch of edge configurations, use this token in your next // request. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListEdgeAgentConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListEdgeAgentConfigurations{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListEdgeAgentConfigurations{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListEdgeAgentConfigurationsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListEdgeAgentConfigurations(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListEdgeAgentConfigurationsAPIClient is a client that implements the // ListEdgeAgentConfigurations operation. type ListEdgeAgentConfigurationsAPIClient interface { ListEdgeAgentConfigurations(context.Context, *ListEdgeAgentConfigurationsInput, ...func(*Options)) (*ListEdgeAgentConfigurationsOutput, error) } var _ ListEdgeAgentConfigurationsAPIClient = (*Client)(nil) // ListEdgeAgentConfigurationsPaginatorOptions is the paginator options for // ListEdgeAgentConfigurations type ListEdgeAgentConfigurationsPaginatorOptions struct { // The maximum number of edge configurations to return in the response. The // default is 5. 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 } // ListEdgeAgentConfigurationsPaginator is a paginator for // ListEdgeAgentConfigurations type ListEdgeAgentConfigurationsPaginator struct { options ListEdgeAgentConfigurationsPaginatorOptions client ListEdgeAgentConfigurationsAPIClient params *ListEdgeAgentConfigurationsInput nextToken *string firstPage bool } // NewListEdgeAgentConfigurationsPaginator returns a new // ListEdgeAgentConfigurationsPaginator func NewListEdgeAgentConfigurationsPaginator(client ListEdgeAgentConfigurationsAPIClient, params *ListEdgeAgentConfigurationsInput, optFns ...func(*ListEdgeAgentConfigurationsPaginatorOptions)) *ListEdgeAgentConfigurationsPaginator { if params == nil { params = &ListEdgeAgentConfigurationsInput{} } options := ListEdgeAgentConfigurationsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListEdgeAgentConfigurationsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListEdgeAgentConfigurationsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListEdgeAgentConfigurations page. func (p *ListEdgeAgentConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListEdgeAgentConfigurationsOutput, 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.ListEdgeAgentConfigurations(ctx, &params, 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_opListEdgeAgentConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "ListEdgeAgentConfigurations", } }
235
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns an array of ChannelInfo objects. Each object describes a signaling // channel. To retrieve only those channels that satisfy a specific condition, you // can specify a ChannelNameCondition . func (c *Client) ListSignalingChannels(ctx context.Context, params *ListSignalingChannelsInput, optFns ...func(*Options)) (*ListSignalingChannelsOutput, error) { if params == nil { params = &ListSignalingChannelsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListSignalingChannels", params, optFns, c.addOperationListSignalingChannelsMiddlewares) if err != nil { return nil, err } out := result.(*ListSignalingChannelsOutput) out.ResultMetadata = metadata return out, nil } type ListSignalingChannelsInput struct { // Optional: Returns only the channels that satisfy a specific condition. ChannelNameCondition *types.ChannelNameCondition // The maximum number of channels to return in the response. The default is 500. MaxResults *int32 // If you specify this parameter, when the result of a ListSignalingChannels // operation is truncated, the call returns the NextToken in the response. To get // another batch of channels, provide this token in your next request. NextToken *string noSmithyDocumentSerde } type ListSignalingChannelsOutput struct { // An array of ChannelInfo objects. ChannelInfoList []types.ChannelInfo // If the response is truncated, the call returns this element with a token. To // get the next batch of streams, use this token in your next request. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListSignalingChannelsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListSignalingChannels{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSignalingChannels{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSignalingChannels(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListSignalingChannelsAPIClient is a client that implements the // ListSignalingChannels operation. type ListSignalingChannelsAPIClient interface { ListSignalingChannels(context.Context, *ListSignalingChannelsInput, ...func(*Options)) (*ListSignalingChannelsOutput, error) } var _ ListSignalingChannelsAPIClient = (*Client)(nil) // ListSignalingChannelsPaginatorOptions is the paginator options for // ListSignalingChannels type ListSignalingChannelsPaginatorOptions struct { // The maximum number of channels to return in the response. The default is 500. 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 } // ListSignalingChannelsPaginator is a paginator for ListSignalingChannels type ListSignalingChannelsPaginator struct { options ListSignalingChannelsPaginatorOptions client ListSignalingChannelsAPIClient params *ListSignalingChannelsInput nextToken *string firstPage bool } // NewListSignalingChannelsPaginator returns a new ListSignalingChannelsPaginator func NewListSignalingChannelsPaginator(client ListSignalingChannelsAPIClient, params *ListSignalingChannelsInput, optFns ...func(*ListSignalingChannelsPaginatorOptions)) *ListSignalingChannelsPaginator { if params == nil { params = &ListSignalingChannelsInput{} } options := ListSignalingChannelsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListSignalingChannelsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListSignalingChannelsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListSignalingChannels page. func (p *ListSignalingChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSignalingChannelsOutput, 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.ListSignalingChannels(ctx, &params, 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_opListSignalingChannels(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "ListSignalingChannels", } }
226
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns an array of StreamInfo objects. Each object describes a stream. To // retrieve only streams that satisfy a specific condition, you can specify a // StreamNameCondition . func (c *Client) ListStreams(ctx context.Context, params *ListStreamsInput, optFns ...func(*Options)) (*ListStreamsOutput, error) { if params == nil { params = &ListStreamsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListStreams", params, optFns, c.addOperationListStreamsMiddlewares) if err != nil { return nil, err } out := result.(*ListStreamsOutput) out.ResultMetadata = metadata return out, nil } type ListStreamsInput struct { // The maximum number of streams to return in the response. The default is 10,000. MaxResults *int32 // If you specify this parameter, when the result of a ListStreams operation is // truncated, the call returns the NextToken in the response. To get another batch // of streams, provide this token in your next request. NextToken *string // Optional: Returns only streams that satisfy a specific condition. Currently, // you can specify only the prefix of a stream name as a condition. StreamNameCondition *types.StreamNameCondition noSmithyDocumentSerde } type ListStreamsOutput struct { // If the response is truncated, the call returns this element with a token. To // get the next batch of streams, use this token in your next request. NextToken *string // An array of StreamInfo objects. StreamInfoList []types.StreamInfo // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListStreamsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListStreams{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListStreams{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListStreams(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } // ListStreamsAPIClient is a client that implements the ListStreams operation. type ListStreamsAPIClient interface { ListStreams(context.Context, *ListStreamsInput, ...func(*Options)) (*ListStreamsOutput, error) } var _ ListStreamsAPIClient = (*Client)(nil) // ListStreamsPaginatorOptions is the paginator options for ListStreams type ListStreamsPaginatorOptions struct { // The maximum number of streams to return in the response. The default is 10,000. 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 } // ListStreamsPaginator is a paginator for ListStreams type ListStreamsPaginator struct { options ListStreamsPaginatorOptions client ListStreamsAPIClient params *ListStreamsInput nextToken *string firstPage bool } // NewListStreamsPaginator returns a new ListStreamsPaginator func NewListStreamsPaginator(client ListStreamsAPIClient, params *ListStreamsInput, optFns ...func(*ListStreamsPaginatorOptions)) *ListStreamsPaginator { if params == nil { params = &ListStreamsInput{} } options := ListStreamsPaginatorOptions{} if params.MaxResults != nil { options.Limit = *params.MaxResults } for _, fn := range optFns { fn(&options) } return &ListStreamsPaginator{ options: options, client: client, params: params, firstPage: true, nextToken: params.NextToken, } } // HasMorePages returns a boolean indicating whether more pages are available func (p *ListStreamsPaginator) HasMorePages() bool { return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) } // NextPage retrieves the next ListStreams page. func (p *ListStreamsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListStreamsOutput, 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.ListStreams(ctx, &params, 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_opListStreams(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "ListStreams", } }
225
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of tags associated with the specified signaling channel. func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { if params == nil { params = &ListTagsForResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForResourceOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForResourceInput struct { // The Amazon Resource Name (ARN) of the signaling channel for which you want to // list tags. // // This member is required. ResourceARN *string // If you specify this parameter and the result of a ListTagsForResource call is // truncated, the response includes a token that you can use in the next request to // fetch the next batch of tags. NextToken *string noSmithyDocumentSerde } type ListTagsForResourceOutput struct { // If you specify this parameter and the result of a ListTagsForResource call is // truncated, the response includes a token that you can use in the next request to // fetch the next set of tags. NextToken *string // A map of tag keys and values associated with the specified signaling channel. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "ListTagsForResource", } }
135
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of tags associated with the specified stream. In the request, // you must specify either the StreamName or the StreamARN . func (c *Client) ListTagsForStream(ctx context.Context, params *ListTagsForStreamInput, optFns ...func(*Options)) (*ListTagsForStreamOutput, error) { if params == nil { params = &ListTagsForStreamInput{} } result, metadata, err := c.invokeOperation(ctx, "ListTagsForStream", params, optFns, c.addOperationListTagsForStreamMiddlewares) if err != nil { return nil, err } out := result.(*ListTagsForStreamOutput) out.ResultMetadata = metadata return out, nil } type ListTagsForStreamInput struct { // If you specify this parameter and the result of a ListTagsForStream call is // truncated, the response includes a token that you can use in the next request to // fetch the next batch of tags. NextToken *string // The Amazon Resource Name (ARN) of the stream that you want to list tags for. StreamARN *string // The name of the stream that you want to list tags for. StreamName *string noSmithyDocumentSerde } type ListTagsForStreamOutput struct { // If you specify this parameter and the result of a ListTags call is truncated, // the response includes a token that you can use in the next request to fetch the // next set of tags. NextToken *string // A map of tag keys and values associated with the specified stream. Tags map[string]string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListTagsForStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForStream{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForStream{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForStream(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListTagsForStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "ListTagsForStream", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // An asynchronous API that updates a stream’s existing edge configuration. The // Kinesis Video Stream will sync the stream’s edge configuration with the Edge // Agent IoT Greengrass component that runs on an IoT Hub Device, setup at your // premise. The time to sync can vary and depends on the connectivity of the Hub // Device. The SyncStatus will be updated as the edge configuration is // acknowledged, and synced with the Edge Agent. If this API is invoked for the // first time, a new edge configuration will be created for the stream, and the // sync status will be set to SYNCING . You will have to wait for the sync status // to reach a terminal state such as: IN_SYNC , or SYNC_FAILED , before using this // API again. If you invoke this API during the syncing process, a // ResourceInUseException will be thrown. The connectivity of the stream’s edge // configuration and the Edge Agent will be retried for 15 minutes. After 15 // minutes, the status will transition into the SYNC_FAILED state. func (c *Client) StartEdgeConfigurationUpdate(ctx context.Context, params *StartEdgeConfigurationUpdateInput, optFns ...func(*Options)) (*StartEdgeConfigurationUpdateOutput, error) { if params == nil { params = &StartEdgeConfigurationUpdateInput{} } result, metadata, err := c.invokeOperation(ctx, "StartEdgeConfigurationUpdate", params, optFns, c.addOperationStartEdgeConfigurationUpdateMiddlewares) if err != nil { return nil, err } out := result.(*StartEdgeConfigurationUpdateOutput) out.ResultMetadata = metadata return out, nil } type StartEdgeConfigurationUpdateInput struct { // The edge configuration details required to invoke the update process. // // This member is required. EdgeConfig *types.EdgeConfig // The Amazon Resource Name (ARN) of the stream. Specify either the StreamName or // the StreamARN . StreamARN *string // The name of the stream whose edge configuration you want to update. Specify // either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type StartEdgeConfigurationUpdateOutput struct { // The timestamp at which a stream’s edge configuration was first created. CreationTime *time.Time // A description of the stream's edge configuration that will be used to sync with // the Edge Agent IoT Greengrass component. The Edge Agent component will run on an // IoT Hub Device setup at your premise. EdgeConfig *types.EdgeConfig // A description of the generated failure status. FailedStatusDetails *string // The timestamp at which a stream’s edge configuration was last updated. LastUpdatedTime *time.Time // The Amazon Resource Name (ARN) of the stream. StreamARN *string // The name of the stream from which the edge configuration was updated. StreamName *string // The current sync status of the stream's edge configuration. When you invoke // this API, the sync status will be set to the SYNCING state. Use the // DescribeEdgeConfiguration API to get the latest status of the edge configuration. SyncStatus types.SyncStatus // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationStartEdgeConfigurationUpdateMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpStartEdgeConfigurationUpdate{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartEdgeConfigurationUpdate{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpStartEdgeConfigurationUpdateValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartEdgeConfigurationUpdate(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opStartEdgeConfigurationUpdate(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "StartEdgeConfigurationUpdate", } }
168
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds one or more tags to a signaling channel. A tag is a key-value pair (the // value is optional) that you can define and assign to Amazon Web Services // resources. If you specify a tag that already exists, the tag value is replaced // with the value that you specify in the request. For more information, see Using // Cost Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) // in the Billing and Cost Management and Cost Management User Guide. func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { if params == nil { params = &TagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) if err != nil { return nil, err } out := result.(*TagResourceOutput) out.ResultMetadata = metadata return out, nil } type TagResourceInput struct { // The Amazon Resource Name (ARN) of the signaling channel to which you want to // add tags. // // This member is required. ResourceARN *string // A list of tags to associate with the specified signaling channel. Each tag is a // key-value pair. // // This member is required. Tags []types.Tag noSmithyDocumentSerde } type TagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "TagResource", } }
133
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Adds one or more tags to a stream. A tag is a key-value pair (the value is // optional) that you can define and assign to Amazon Web Services resources. If // you specify a tag that already exists, the tag value is replaced with the value // that you specify in the request. For more information, see Using Cost // Allocation Tags (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) // in the Billing and Cost Management and Cost Management User Guide. You must // provide either the StreamName or the StreamARN . This operation requires // permission for the KinesisVideo:TagStream action. A Kinesis video stream can // support up to 50 tags. func (c *Client) TagStream(ctx context.Context, params *TagStreamInput, optFns ...func(*Options)) (*TagStreamOutput, error) { if params == nil { params = &TagStreamInput{} } result, metadata, err := c.invokeOperation(ctx, "TagStream", params, optFns, c.addOperationTagStreamMiddlewares) if err != nil { return nil, err } out := result.(*TagStreamOutput) out.ResultMetadata = metadata return out, nil } type TagStreamInput struct { // A list of tags to associate with the specified stream. Each tag is a key-value // pair (the value is optional). // // This member is required. Tags map[string]string // The Amazon Resource Name (ARN) of the resource that you want to add the tag or // tags to. StreamARN *string // The name of the stream that you want to add the tag or tags to. StreamName *string noSmithyDocumentSerde } type TagStreamOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationTagStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpTagStream{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagStream{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpTagStreamValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagStream(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opTagStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "TagStream", } }
136
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes one or more tags from a signaling channel. In the request, specify only // a tag key or keys; don't specify the value. If you specify a tag key that does // not exist, it's ignored. func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { if params == nil { params = &UntagResourceInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) if err != nil { return nil, err } out := result.(*UntagResourceOutput) out.ResultMetadata = metadata return out, nil } type UntagResourceInput struct { // The Amazon Resource Name (ARN) of the signaling channel from which you want to // remove tags. // // This member is required. ResourceARN *string // A list of the keys of the tags that you want to remove. // // This member is required. TagKeyList []string noSmithyDocumentSerde } type UntagResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagResourceValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UntagResource", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Removes one or more tags from a stream. In the request, specify only a tag key // or keys; don't specify the value. If you specify a tag key that does not exist, // it's ignored. In the request, you must provide the StreamName or StreamARN . func (c *Client) UntagStream(ctx context.Context, params *UntagStreamInput, optFns ...func(*Options)) (*UntagStreamOutput, error) { if params == nil { params = &UntagStreamInput{} } result, metadata, err := c.invokeOperation(ctx, "UntagStream", params, optFns, c.addOperationUntagStreamMiddlewares) if err != nil { return nil, err } out := result.(*UntagStreamOutput) out.ResultMetadata = metadata return out, nil } type UntagStreamInput struct { // A list of the keys of the tags that you want to remove. // // This member is required. TagKeyList []string // The Amazon Resource Name (ARN) of the stream that you want to remove tags from. StreamARN *string // The name of the stream that you want to remove tags from. StreamName *string noSmithyDocumentSerde } type UntagStreamOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUntagStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagStream{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagStream{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUntagStreamValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagStream(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUntagStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UntagStream", } }
128
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Increases or decreases the stream's data retention period by the value that you // specify. To indicate whether you want to increase or decrease the data retention // period, specify the Operation parameter in the request body. In the request, // you must specify either the StreamName or the StreamARN . The retention period // that you specify replaces the current value. This operation requires permission // for the KinesisVideo:UpdateDataRetention action. Changing the data retention // period affects the data in the stream as follows: // - If the data retention period is increased, existing data is retained for // the new retention period. For example, if the data retention period is increased // from one hour to seven hours, all existing data is retained for seven hours. // - If the data retention period is decreased, existing data is retained for // the new retention period. For example, if the data retention period is decreased // from seven hours to one hour, all existing data is retained for one hour, and // any data older than one hour is deleted immediately. func (c *Client) UpdateDataRetention(ctx context.Context, params *UpdateDataRetentionInput, optFns ...func(*Options)) (*UpdateDataRetentionOutput, error) { if params == nil { params = &UpdateDataRetentionInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateDataRetention", params, optFns, c.addOperationUpdateDataRetentionMiddlewares) if err != nil { return nil, err } out := result.(*UpdateDataRetentionOutput) out.ResultMetadata = metadata return out, nil } type UpdateDataRetentionInput struct { // The version of the stream whose retention period you want to change. To get the // version, call either the DescribeStream or the ListStreams API. // // This member is required. CurrentVersion *string // The retention period, in hours. The value you specify replaces the current // value. The maximum value for this parameter is 87600 (ten years). // // This member is required. DataRetentionChangeInHours *int32 // Indicates whether you want to increase or decrease the retention period. // // This member is required. Operation types.UpdateDataRetentionOperation // The Amazon Resource Name (ARN) of the stream whose retention period you want to // change. StreamARN *string // The name of the stream whose retention period you want to change. StreamName *string noSmithyDocumentSerde } type UpdateDataRetentionOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateDataRetentionMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateDataRetention{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateDataRetention{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateDataRetentionValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateDataRetention(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateDataRetention(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UpdateDataRetention", } }
153
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the StreamInfo and ImageProcessingConfiguration fields. func (c *Client) UpdateImageGenerationConfiguration(ctx context.Context, params *UpdateImageGenerationConfigurationInput, optFns ...func(*Options)) (*UpdateImageGenerationConfigurationOutput, error) { if params == nil { params = &UpdateImageGenerationConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateImageGenerationConfiguration", params, optFns, c.addOperationUpdateImageGenerationConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateImageGenerationConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateImageGenerationConfigurationInput struct { // The structure that contains the information required for the KVS images // delivery. If the structure is null, the configuration will be deleted from the // stream. ImageGenerationConfiguration *types.ImageGenerationConfiguration // The Amazon Resource Name (ARN) of the Kinesis video stream from where you want // to update the image generation configuration. You must specify either the // StreamName or the StreamARN . StreamARN *string // The name of the stream from which to update the image generation configuration. // You must specify either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type UpdateImageGenerationConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateImageGenerationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateImageGenerationConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateImageGenerationConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateImageGenerationConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateImageGenerationConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateImageGenerationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UpdateImageGenerationConfiguration", } }
130
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Associates a SignalingChannel to a stream to store the media. There are two // signaling modes that can specified : // - If the StorageStatus is disabled, no data will be stored, and the StreamARN // parameter will not be needed. // - If the StorageStatus is enabled, the data will be stored in the StreamARN // provided. func (c *Client) UpdateMediaStorageConfiguration(ctx context.Context, params *UpdateMediaStorageConfigurationInput, optFns ...func(*Options)) (*UpdateMediaStorageConfigurationOutput, error) { if params == nil { params = &UpdateMediaStorageConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateMediaStorageConfiguration", params, optFns, c.addOperationUpdateMediaStorageConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateMediaStorageConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateMediaStorageConfigurationInput struct { // The Amazon Resource Name (ARN) of the channel. // // This member is required. ChannelARN *string // A structure that encapsulates, or contains, the media storage configuration // properties. // // This member is required. MediaStorageConfiguration *types.MediaStorageConfiguration noSmithyDocumentSerde } type UpdateMediaStorageConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateMediaStorageConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateMediaStorageConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateMediaStorageConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateMediaStorageConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateMediaStorageConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateMediaStorageConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UpdateMediaStorageConfiguration", } }
132
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the notification information for a stream. func (c *Client) UpdateNotificationConfiguration(ctx context.Context, params *UpdateNotificationConfigurationInput, optFns ...func(*Options)) (*UpdateNotificationConfigurationOutput, error) { if params == nil { params = &UpdateNotificationConfigurationInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateNotificationConfiguration", params, optFns, c.addOperationUpdateNotificationConfigurationMiddlewares) if err != nil { return nil, err } out := result.(*UpdateNotificationConfigurationOutput) out.ResultMetadata = metadata return out, nil } type UpdateNotificationConfigurationInput struct { // The structure containing the information required for notifications. If the // structure is null, the configuration will be deleted from the stream. NotificationConfiguration *types.NotificationConfiguration // The Amazon Resource Name (ARN) of the Kinesis video stream from where you want // to update the notification configuration. You must specify either the StreamName // or the StreamARN . StreamARN *string // The name of the stream from which to update the notification configuration. You // must specify either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type UpdateNotificationConfigurationOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateNotificationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateNotificationConfiguration{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateNotificationConfiguration{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateNotificationConfigurationValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateNotificationConfiguration(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateNotificationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UpdateNotificationConfiguration", } }
129
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates the existing signaling channel. This is an asynchronous operation and // takes time to complete. If the MessageTtlSeconds value is updated (either // increased or reduced), it only applies to new messages sent via this channel // after it's been updated. Existing messages are still expired as per the previous // MessageTtlSeconds value. func (c *Client) UpdateSignalingChannel(ctx context.Context, params *UpdateSignalingChannelInput, optFns ...func(*Options)) (*UpdateSignalingChannelOutput, error) { if params == nil { params = &UpdateSignalingChannelInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateSignalingChannel", params, optFns, c.addOperationUpdateSignalingChannelMiddlewares) if err != nil { return nil, err } out := result.(*UpdateSignalingChannelOutput) out.ResultMetadata = metadata return out, nil } type UpdateSignalingChannelInput struct { // The Amazon Resource Name (ARN) of the signaling channel that you want to update. // // This member is required. ChannelARN *string // The current version of the signaling channel that you want to update. // // This member is required. CurrentVersion *string // The structure containing the configuration for the SINGLE_MASTER type of the // signaling channel that you want to update. SingleMasterConfiguration *types.SingleMasterConfiguration noSmithyDocumentSerde } type UpdateSignalingChannelOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateSignalingChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSignalingChannel{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSignalingChannel{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateSignalingChannelValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSignalingChannel(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateSignalingChannel(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UpdateSignalingChannel", } }
134
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Updates stream metadata, such as the device name and media type. You must // provide the stream name or the Amazon Resource Name (ARN) of the stream. To make // sure that you have the latest version of the stream before updating it, you can // specify the stream version. Kinesis Video Streams assigns a version to each // stream. When you update a stream, Kinesis Video Streams assigns a new version // number. To get the latest stream version, use the DescribeStream API. // UpdateStream is an asynchronous operation, and takes time to complete. func (c *Client) UpdateStream(ctx context.Context, params *UpdateStreamInput, optFns ...func(*Options)) (*UpdateStreamOutput, error) { if params == nil { params = &UpdateStreamInput{} } result, metadata, err := c.invokeOperation(ctx, "UpdateStream", params, optFns, c.addOperationUpdateStreamMiddlewares) if err != nil { return nil, err } out := result.(*UpdateStreamOutput) out.ResultMetadata = metadata return out, nil } type UpdateStreamInput struct { // The version of the stream whose metadata you want to update. // // This member is required. CurrentVersion *string // The name of the device that is writing to the stream. In the current // implementation, Kinesis Video Streams does not use this name. DeviceName *string // The stream's media type. Use MediaType to specify the type of content that the // stream contains to the consumers of the stream. For more information about media // types, see Media Types (http://www.iana.org/assignments/media-types/media-types.xhtml) // . If you choose to specify the MediaType , see Naming Requirements (https://tools.ietf.org/html/rfc6838#section-4.2) // . To play video on the console, you must specify the correct video type. For // example, if the video in the stream is H.264, specify video/h264 as the // MediaType . MediaType *string // The ARN of the stream whose metadata you want to update. StreamARN *string // The name of the stream whose metadata you want to update. The stream name is an // identifier for the stream, and must be unique for each account and region. StreamName *string noSmithyDocumentSerde } type UpdateStreamOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationUpdateStreamMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateStream{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateStream{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpUpdateStreamValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateStream(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opUpdateStream(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "UpdateStream", } }
146
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsRestjson1_deserializeOpCreateSignalingChannel struct { } func (*awsRestjson1_deserializeOpCreateSignalingChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateSignalingChannel) 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_deserializeOpErrorCreateSignalingChannel(response, &metadata) } output := &CreateSignalingChannelOutput{} 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_deserializeOpDocumentCreateSignalingChannelOutput(&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_deserializeOpErrorCreateSignalingChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("AccountChannelLimitExceededException", errorCode): return awsRestjson1_deserializeErrorAccountChannelLimitExceededException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("TagsPerResourceExceededLimitException", errorCode): return awsRestjson1_deserializeErrorTagsPerResourceExceededLimitException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateSignalingChannelOutput(v **CreateSignalingChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *CreateSignalingChannelOutput if *v == nil { sv = &CreateSignalingChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChannelARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ChannelARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpCreateStream struct { } func (*awsRestjson1_deserializeOpCreateStream) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpCreateStream) 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_deserializeOpErrorCreateStream(response, &metadata) } output := &CreateStreamOutput{} 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_deserializeOpDocumentCreateStreamOutput(&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_deserializeOpErrorCreateStream(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("AccountStreamLimitExceededException", errorCode): return awsRestjson1_deserializeErrorAccountStreamLimitExceededException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("DeviceStreamLimitExceededException", errorCode): return awsRestjson1_deserializeErrorDeviceStreamLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidDeviceException", errorCode): return awsRestjson1_deserializeErrorInvalidDeviceException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("TagsPerResourceExceededLimitException", errorCode): return awsRestjson1_deserializeErrorTagsPerResourceExceededLimitException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentCreateStreamOutput(v **CreateStreamOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *CreateStreamOutput if *v == nil { sv = &CreateStreamOutput{} } else { sv = *v } for key, value := range shape { switch key { case "StreamARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.StreamARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDeleteEdgeConfiguration struct { } func (*awsRestjson1_deserializeOpDeleteEdgeConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteEdgeConfiguration) 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_deserializeOpErrorDeleteEdgeConfiguration(response, &metadata) } output := &DeleteEdgeConfigurationOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteEdgeConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("StreamEdgeConfigurationNotFoundException", errorCode): return awsRestjson1_deserializeErrorStreamEdgeConfigurationNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeleteSignalingChannel struct { } func (*awsRestjson1_deserializeOpDeleteSignalingChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteSignalingChannel) 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_deserializeOpErrorDeleteSignalingChannel(response, &metadata) } output := &DeleteSignalingChannelOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteSignalingChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("VersionMismatchException", errorCode): return awsRestjson1_deserializeErrorVersionMismatchException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDeleteStream struct { } func (*awsRestjson1_deserializeOpDeleteStream) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDeleteStream) 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_deserializeOpErrorDeleteStream(response, &metadata) } output := &DeleteStreamOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorDeleteStream(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("VersionMismatchException", errorCode): return awsRestjson1_deserializeErrorVersionMismatchException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpDescribeEdgeConfiguration struct { } func (*awsRestjson1_deserializeOpDescribeEdgeConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeEdgeConfiguration) 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_deserializeOpErrorDescribeEdgeConfiguration(response, &metadata) } output := &DescribeEdgeConfigurationOutput{} 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_deserializeOpDocumentDescribeEdgeConfigurationOutput(&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_deserializeOpErrorDescribeEdgeConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("StreamEdgeConfigurationNotFoundException", errorCode): return awsRestjson1_deserializeErrorStreamEdgeConfigurationNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeEdgeConfigurationOutput(v **DescribeEdgeConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeEdgeConfigurationOutput if *v == nil { sv = &DescribeEdgeConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "CreationTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "EdgeAgentStatus": if err := awsRestjson1_deserializeDocumentEdgeAgentStatus(&sv.EdgeAgentStatus, value); err != nil { return err } case "EdgeConfig": if err := awsRestjson1_deserializeDocumentEdgeConfig(&sv.EdgeConfig, value); err != nil { return err } case "FailedStatusDetails": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FailedStatusDetails to be of type string, got %T instead", value) } sv.FailedStatusDetails = ptr.String(jtv) } case "LastUpdatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "StreamARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.StreamARN = ptr.String(jtv) } case "StreamName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StreamName to be of type string, got %T instead", value) } sv.StreamName = ptr.String(jtv) } case "SyncStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SyncStatus to be of type string, got %T instead", value) } sv.SyncStatus = types.SyncStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeImageGenerationConfiguration struct { } func (*awsRestjson1_deserializeOpDescribeImageGenerationConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeImageGenerationConfiguration) 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_deserializeOpErrorDescribeImageGenerationConfiguration(response, &metadata) } output := &DescribeImageGenerationConfigurationOutput{} 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_deserializeOpDocumentDescribeImageGenerationConfigurationOutput(&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_deserializeOpErrorDescribeImageGenerationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeImageGenerationConfigurationOutput(v **DescribeImageGenerationConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeImageGenerationConfigurationOutput if *v == nil { sv = &DescribeImageGenerationConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ImageGenerationConfiguration": if err := awsRestjson1_deserializeDocumentImageGenerationConfiguration(&sv.ImageGenerationConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeMappedResourceConfiguration struct { } func (*awsRestjson1_deserializeOpDescribeMappedResourceConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeMappedResourceConfiguration) 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_deserializeOpErrorDescribeMappedResourceConfiguration(response, &metadata) } output := &DescribeMappedResourceConfigurationOutput{} 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_deserializeOpDocumentDescribeMappedResourceConfigurationOutput(&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_deserializeOpErrorDescribeMappedResourceConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeMappedResourceConfigurationOutput(v **DescribeMappedResourceConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeMappedResourceConfigurationOutput if *v == nil { sv = &DescribeMappedResourceConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "MappedResourceConfigurationList": if err := awsRestjson1_deserializeDocumentMappedResourceConfigurationList(&sv.MappedResourceConfigurationList, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeMediaStorageConfiguration struct { } func (*awsRestjson1_deserializeOpDescribeMediaStorageConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeMediaStorageConfiguration) 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_deserializeOpErrorDescribeMediaStorageConfiguration(response, &metadata) } output := &DescribeMediaStorageConfigurationOutput{} 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_deserializeOpDocumentDescribeMediaStorageConfigurationOutput(&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_deserializeOpErrorDescribeMediaStorageConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeMediaStorageConfigurationOutput(v **DescribeMediaStorageConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeMediaStorageConfigurationOutput if *v == nil { sv = &DescribeMediaStorageConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "MediaStorageConfiguration": if err := awsRestjson1_deserializeDocumentMediaStorageConfiguration(&sv.MediaStorageConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeNotificationConfiguration struct { } func (*awsRestjson1_deserializeOpDescribeNotificationConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeNotificationConfiguration) 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_deserializeOpErrorDescribeNotificationConfiguration(response, &metadata) } output := &DescribeNotificationConfigurationOutput{} 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_deserializeOpDocumentDescribeNotificationConfigurationOutput(&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_deserializeOpErrorDescribeNotificationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeNotificationConfigurationOutput(v **DescribeNotificationConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeNotificationConfigurationOutput if *v == nil { sv = &DescribeNotificationConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NotificationConfiguration": if err := awsRestjson1_deserializeDocumentNotificationConfiguration(&sv.NotificationConfiguration, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeSignalingChannel struct { } func (*awsRestjson1_deserializeOpDescribeSignalingChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeSignalingChannel) 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_deserializeOpErrorDescribeSignalingChannel(response, &metadata) } output := &DescribeSignalingChannelOutput{} 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_deserializeOpDocumentDescribeSignalingChannelOutput(&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_deserializeOpErrorDescribeSignalingChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeSignalingChannelOutput(v **DescribeSignalingChannelOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeSignalingChannelOutput if *v == nil { sv = &DescribeSignalingChannelOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChannelInfo": if err := awsRestjson1_deserializeDocumentChannelInfo(&sv.ChannelInfo, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpDescribeStream struct { } func (*awsRestjson1_deserializeOpDescribeStream) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpDescribeStream) 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_deserializeOpErrorDescribeStream(response, &metadata) } output := &DescribeStreamOutput{} 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_deserializeOpDocumentDescribeStreamOutput(&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_deserializeOpErrorDescribeStream(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentDescribeStreamOutput(v **DescribeStreamOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *DescribeStreamOutput if *v == nil { sv = &DescribeStreamOutput{} } else { sv = *v } for key, value := range shape { switch key { case "StreamInfo": if err := awsRestjson1_deserializeDocumentStreamInfo(&sv.StreamInfo, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetDataEndpoint struct { } func (*awsRestjson1_deserializeOpGetDataEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetDataEndpoint) 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_deserializeOpErrorGetDataEndpoint(response, &metadata) } output := &GetDataEndpointOutput{} 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_deserializeOpDocumentGetDataEndpointOutput(&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_deserializeOpErrorGetDataEndpoint(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetDataEndpointOutput(v **GetDataEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *GetDataEndpointOutput if *v == nil { sv = &GetDataEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DataEndpoint": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DataEndpoint to be of type string, got %T instead", value) } sv.DataEndpoint = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetSignalingChannelEndpoint struct { } func (*awsRestjson1_deserializeOpGetSignalingChannelEndpoint) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetSignalingChannelEndpoint) 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_deserializeOpErrorGetSignalingChannelEndpoint(response, &metadata) } output := &GetSignalingChannelEndpointOutput{} 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_deserializeOpDocumentGetSignalingChannelEndpointOutput(&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_deserializeOpErrorGetSignalingChannelEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetSignalingChannelEndpointOutput(v **GetSignalingChannelEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *GetSignalingChannelEndpointOutput if *v == nil { sv = &GetSignalingChannelEndpointOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ResourceEndpointList": if err := awsRestjson1_deserializeDocumentResourceEndpointList(&sv.ResourceEndpointList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListEdgeAgentConfigurations struct { } func (*awsRestjson1_deserializeOpListEdgeAgentConfigurations) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListEdgeAgentConfigurations) 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_deserializeOpErrorListEdgeAgentConfigurations(response, &metadata) } output := &ListEdgeAgentConfigurationsOutput{} 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_deserializeOpDocumentListEdgeAgentConfigurationsOutput(&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_deserializeOpErrorListEdgeAgentConfigurations(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListEdgeAgentConfigurationsOutput(v **ListEdgeAgentConfigurationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListEdgeAgentConfigurationsOutput if *v == nil { sv = &ListEdgeAgentConfigurationsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "EdgeConfigs": if err := awsRestjson1_deserializeDocumentListEdgeAgentConfigurationsEdgeConfigList(&sv.EdgeConfigs, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListSignalingChannels struct { } func (*awsRestjson1_deserializeOpListSignalingChannels) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListSignalingChannels) 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_deserializeOpErrorListSignalingChannels(response, &metadata) } output := &ListSignalingChannelsOutput{} 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_deserializeOpDocumentListSignalingChannelsOutput(&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_deserializeOpErrorListSignalingChannels(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListSignalingChannelsOutput(v **ListSignalingChannelsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListSignalingChannelsOutput if *v == nil { sv = &ListSignalingChannelsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "ChannelInfoList": if err := awsRestjson1_deserializeDocumentChannelInfoList(&sv.ChannelInfoList, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListStreams struct { } func (*awsRestjson1_deserializeOpListStreams) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListStreams) 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_deserializeOpErrorListStreams(response, &metadata) } output := &ListStreamsOutput{} 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_deserializeOpDocumentListStreamsOutput(&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_deserializeOpErrorListStreams(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListStreamsOutput(v **ListStreamsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListStreamsOutput if *v == nil { sv = &ListStreamsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "StreamInfoList": if err := awsRestjson1_deserializeDocumentStreamInfoList(&sv.StreamInfoList, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListTagsForResource struct { } func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } 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) 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_deserializeOpErrorListTagsForResource(response, &metadata) } output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return out, metadata, err } err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&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_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } 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 } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *ListTagsForResourceOutput if *v == nil { sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Tags": if err := awsRestjson1_deserializeDocumentResourceTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpListTagsForStream struct { } func (*awsRestjson1_deserializeOpListTagsForStream) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListTagsForStream) 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_deserializeOpErrorListTagsForStream(response, &metadata) } output := &ListTagsForStreamOutput{} 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_deserializeOpDocumentListTagsForStreamOutput(&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_deserializeOpErrorListTagsForStream(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidResourceFormatException", errorCode): return awsRestjson1_deserializeErrorInvalidResourceFormatException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListTagsForStreamOutput(v **ListTagsForStreamOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListTagsForStreamOutput if *v == nil { sv = &ListTagsForStreamOutput{} } else { sv = *v } for key, value := range shape { switch key { case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } case "Tags": if err := awsRestjson1_deserializeDocumentResourceTags(&sv.Tags, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpStartEdgeConfigurationUpdate struct { } func (*awsRestjson1_deserializeOpStartEdgeConfigurationUpdate) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpStartEdgeConfigurationUpdate) 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_deserializeOpErrorStartEdgeConfigurationUpdate(response, &metadata) } output := &StartEdgeConfigurationUpdateOutput{} 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_deserializeOpDocumentStartEdgeConfigurationUpdateOutput(&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_deserializeOpErrorStartEdgeConfigurationUpdate(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NoDataRetentionException", errorCode): return awsRestjson1_deserializeErrorNoDataRetentionException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentStartEdgeConfigurationUpdateOutput(v **StartEdgeConfigurationUpdateOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *StartEdgeConfigurationUpdateOutput if *v == nil { sv = &StartEdgeConfigurationUpdateOutput{} } else { sv = *v } for key, value := range shape { switch key { case "CreationTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "EdgeConfig": if err := awsRestjson1_deserializeDocumentEdgeConfig(&sv.EdgeConfig, value); err != nil { return err } case "FailedStatusDetails": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FailedStatusDetails to be of type string, got %T instead", value) } sv.FailedStatusDetails = ptr.String(jtv) } case "LastUpdatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "StreamARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.StreamARN = ptr.String(jtv) } case "StreamName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StreamName to be of type string, got %T instead", value) } sv.StreamName = ptr.String(jtv) } case "SyncStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SyncStatus to be of type string, got %T instead", value) } sv.SyncStatus = types.SyncStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpTagResource struct { } func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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_deserializeOpErrorTagResource(response, &metadata) } output := &TagResourceOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TagsPerResourceExceededLimitException", errorCode): return awsRestjson1_deserializeErrorTagsPerResourceExceededLimitException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpTagStream struct { } func (*awsRestjson1_deserializeOpTagStream) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpTagStream) 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_deserializeOpErrorTagStream(response, &metadata) } output := &TagStreamOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorTagStream(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidResourceFormatException", errorCode): return awsRestjson1_deserializeErrorInvalidResourceFormatException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("TagsPerResourceExceededLimitException", errorCode): return awsRestjson1_deserializeErrorTagsPerResourceExceededLimitException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUntagResource struct { } func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) 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_deserializeOpErrorUntagResource(response, &metadata) } output := &UntagResourceOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUntagStream struct { } func (*awsRestjson1_deserializeOpUntagStream) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUntagStream) 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_deserializeOpErrorUntagStream(response, &metadata) } output := &UntagStreamOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUntagStream(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidResourceFormatException", errorCode): return awsRestjson1_deserializeErrorInvalidResourceFormatException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateDataRetention struct { } func (*awsRestjson1_deserializeOpUpdateDataRetention) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateDataRetention) 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_deserializeOpErrorUpdateDataRetention(response, &metadata) } output := &UpdateDataRetentionOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateDataRetention(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("VersionMismatchException", errorCode): return awsRestjson1_deserializeErrorVersionMismatchException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateImageGenerationConfiguration struct { } func (*awsRestjson1_deserializeOpUpdateImageGenerationConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateImageGenerationConfiguration) 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_deserializeOpErrorUpdateImageGenerationConfiguration(response, &metadata) } output := &UpdateImageGenerationConfigurationOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateImageGenerationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NoDataRetentionException", errorCode): return awsRestjson1_deserializeErrorNoDataRetentionException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateMediaStorageConfiguration struct { } func (*awsRestjson1_deserializeOpUpdateMediaStorageConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateMediaStorageConfiguration) 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_deserializeOpErrorUpdateMediaStorageConfiguration(response, &metadata) } output := &UpdateMediaStorageConfigurationOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateMediaStorageConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NoDataRetentionException", errorCode): return awsRestjson1_deserializeErrorNoDataRetentionException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateNotificationConfiguration struct { } func (*awsRestjson1_deserializeOpUpdateNotificationConfiguration) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateNotificationConfiguration) 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_deserializeOpErrorUpdateNotificationConfiguration(response, &metadata) } output := &UpdateNotificationConfigurationOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateNotificationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NoDataRetentionException", errorCode): return awsRestjson1_deserializeErrorNoDataRetentionException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateSignalingChannel struct { } func (*awsRestjson1_deserializeOpUpdateSignalingChannel) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateSignalingChannel) 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_deserializeOpErrorUpdateSignalingChannel(response, &metadata) } output := &UpdateSignalingChannelOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateSignalingChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } errorBody := bytes.NewReader(errorBuffer.Bytes()) errorCode := "UnknownError" errorMessage := errorCode headerCode := response.Header.Get("X-Amzn-ErrorType") if len(headerCode) != 0 { errorCode = restjson.SanitizeErrorCode(headerCode) } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) if len(headerCode) == 0 && len(jsonCode) != 0 { errorCode = restjson.SanitizeErrorCode(jsonCode) } if len(message) != 0 { errorMessage = message } switch { case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) case strings.EqualFold("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("VersionMismatchException", errorCode): return awsRestjson1_deserializeErrorVersionMismatchException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } type awsRestjson1_deserializeOpUpdateStream struct { } func (*awsRestjson1_deserializeOpUpdateStream) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpUpdateStream) 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_deserializeOpErrorUpdateStream(response, &metadata) } output := &UpdateStreamOutput{} out.Result = output return out, metadata, err } func awsRestjson1_deserializeOpErrorUpdateStream(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceInUseException", errorCode): return awsRestjson1_deserializeErrorResourceInUseException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("VersionMismatchException", errorCode): return awsRestjson1_deserializeErrorVersionMismatchException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.AccessDeniedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorAccountChannelLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.AccountChannelLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentAccountChannelLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorAccountStreamLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.AccountStreamLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentAccountStreamLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorClientLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ClientLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentClientLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorDeviceStreamLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.DeviceStreamLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentDeviceStreamLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidArgumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidArgumentException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidArgumentException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidDeviceException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidDeviceException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidDeviceException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidResourceFormatException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidResourceFormatException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidResourceFormatException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorNoDataRetentionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NoDataRetentionException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentNoDataRetentionException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NotAuthorizedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentNotAuthorizedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorResourceInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceInUseException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentResourceInUseException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorStreamEdgeConfigurationNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.StreamEdgeConfigurationNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentStreamEdgeConfigurationNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorTagsPerResourceExceededLimitException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.TagsPerResourceExceededLimitException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentTagsPerResourceExceededLimitException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorVersionMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.VersionMismatchException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentVersionMismatchException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.AccessDeniedException if *v == nil { sv = &types.AccessDeniedException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentAccountChannelLimitExceededException(v **types.AccountChannelLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.AccountChannelLimitExceededException if *v == nil { sv = &types.AccountChannelLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentAccountStreamLimitExceededException(v **types.AccountStreamLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.AccountStreamLimitExceededException if *v == nil { sv = &types.AccountStreamLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentChannelInfo(v **types.ChannelInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ChannelInfo if *v == nil { sv = &types.ChannelInfo{} } else { sv = *v } for key, value := range shape { switch key { case "ChannelARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.ChannelARN = ptr.String(jtv) } case "ChannelName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChannelName to be of type string, got %T instead", value) } sv.ChannelName = ptr.String(jtv) } case "ChannelStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Status to be of type string, got %T instead", value) } sv.ChannelStatus = types.Status(jtv) } case "ChannelType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChannelType to be of type string, got %T instead", value) } sv.ChannelType = types.ChannelType(jtv) } case "CreationTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "SingleMasterConfiguration": if err := awsRestjson1_deserializeDocumentSingleMasterConfiguration(&sv.SingleMasterConfiguration, value); err != nil { return err } case "Version": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Version to be of type string, got %T instead", value) } sv.Version = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentChannelInfoList(v *[]types.ChannelInfo, 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.ChannelInfo if *v == nil { cv = []types.ChannelInfo{} } else { cv = *v } for _, value := range shape { var col types.ChannelInfo destAddr := &col if err := awsRestjson1_deserializeDocumentChannelInfo(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentClientLimitExceededException(v **types.ClientLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ClientLimitExceededException if *v == nil { sv = &types.ClientLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDeletionConfig(v **types.DeletionConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.DeletionConfig if *v == nil { sv = &types.DeletionConfig{} } else { sv = *v } for key, value := range shape { switch key { case "DeleteAfterUpload": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected DeleteAfterUpload to be of type *bool, got %T instead", value) } sv.DeleteAfterUpload = ptr.Bool(jtv) } case "EdgeRetentionInHours": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected EdgeRetentionInHours to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.EdgeRetentionInHours = ptr.Int32(int32(i64)) } case "LocalSizeConfig": if err := awsRestjson1_deserializeDocumentLocalSizeConfig(&sv.LocalSizeConfig, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentDeviceStreamLimitExceededException(v **types.DeviceStreamLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.DeviceStreamLimitExceededException if *v == nil { sv = &types.DeviceStreamLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEdgeAgentStatus(v **types.EdgeAgentStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.EdgeAgentStatus if *v == nil { sv = &types.EdgeAgentStatus{} } else { sv = *v } for key, value := range shape { switch key { case "LastRecorderStatus": if err := awsRestjson1_deserializeDocumentLastRecorderStatus(&sv.LastRecorderStatus, value); err != nil { return err } case "LastUploaderStatus": if err := awsRestjson1_deserializeDocumentLastUploaderStatus(&sv.LastUploaderStatus, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentEdgeConfig(v **types.EdgeConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.EdgeConfig if *v == nil { sv = &types.EdgeConfig{} } else { sv = *v } for key, value := range shape { switch key { case "DeletionConfig": if err := awsRestjson1_deserializeDocumentDeletionConfig(&sv.DeletionConfig, value); err != nil { return err } case "HubDeviceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HubDeviceArn to be of type string, got %T instead", value) } sv.HubDeviceArn = ptr.String(jtv) } case "RecorderConfig": if err := awsRestjson1_deserializeDocumentRecorderConfig(&sv.RecorderConfig, value); err != nil { return err } case "UploaderConfig": if err := awsRestjson1_deserializeDocumentUploaderConfig(&sv.UploaderConfig, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentFormatConfig(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 FormatConfigValue to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsRestjson1_deserializeDocumentImageGenerationConfiguration(v **types.ImageGenerationConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ImageGenerationConfiguration if *v == nil { sv = &types.ImageGenerationConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationConfig": if err := awsRestjson1_deserializeDocumentImageGenerationDestinationConfig(&sv.DestinationConfig, value); err != nil { return err } case "Format": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Format to be of type string, got %T instead", value) } sv.Format = types.Format(jtv) } case "FormatConfig": if err := awsRestjson1_deserializeDocumentFormatConfig(&sv.FormatConfig, value); err != nil { return err } case "HeightPixels": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected HeightPixels to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.HeightPixels = ptr.Int32(int32(i64)) } case "ImageSelectorType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImageSelectorType to be of type string, got %T instead", value) } sv.ImageSelectorType = types.ImageSelectorType(jtv) } case "SamplingInterval": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected SamplingInterval to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.SamplingInterval = ptr.Int32(int32(i64)) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConfigurationStatus to be of type string, got %T instead", value) } sv.Status = types.ConfigurationStatus(jtv) } case "WidthPixels": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected WidthPixels to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.WidthPixels = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentImageGenerationDestinationConfig(v **types.ImageGenerationDestinationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ImageGenerationDestinationConfig if *v == nil { sv = &types.ImageGenerationDestinationConfig{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationRegion": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DestinationRegion to be of type string, got %T instead", value) } sv.DestinationRegion = ptr.String(jtv) } case "Uri": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DestinationUri to be of type string, got %T instead", value) } sv.Uri = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInvalidArgumentException(v **types.InvalidArgumentException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidArgumentException if *v == nil { sv = &types.InvalidArgumentException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInvalidDeviceException(v **types.InvalidDeviceException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidDeviceException if *v == nil { sv = &types.InvalidDeviceException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInvalidResourceFormatException(v **types.InvalidResourceFormatException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidResourceFormatException if *v == nil { sv = &types.InvalidResourceFormatException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentLastRecorderStatus(v **types.LastRecorderStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.LastRecorderStatus if *v == nil { sv = &types.LastRecorderStatus{} } else { sv = *v } for key, value := range shape { switch key { case "JobStatusDetails": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobStatusDetails to be of type string, got %T instead", value) } sv.JobStatusDetails = ptr.String(jtv) } case "LastCollectedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastCollectedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "LastUpdatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "RecorderStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected RecorderStatus to be of type string, got %T instead", value) } sv.RecorderStatus = types.RecorderStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentLastUploaderStatus(v **types.LastUploaderStatus, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.LastUploaderStatus if *v == nil { sv = &types.LastUploaderStatus{} } else { sv = *v } for key, value := range shape { switch key { case "JobStatusDetails": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected JobStatusDetails to be of type string, got %T instead", value) } sv.JobStatusDetails = ptr.String(jtv) } case "LastCollectedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastCollectedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "LastUpdatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "UploaderStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected UploaderStatus to be of type string, got %T instead", value) } sv.UploaderStatus = types.UploaderStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentListEdgeAgentConfigurationsEdgeConfig(v **types.ListEdgeAgentConfigurationsEdgeConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ListEdgeAgentConfigurationsEdgeConfig if *v == nil { sv = &types.ListEdgeAgentConfigurationsEdgeConfig{} } else { sv = *v } for key, value := range shape { switch key { case "CreationTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "EdgeConfig": if err := awsRestjson1_deserializeDocumentEdgeConfig(&sv.EdgeConfig, value); err != nil { return err } case "FailedStatusDetails": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FailedStatusDetails to be of type string, got %T instead", value) } sv.FailedStatusDetails = ptr.String(jtv) } case "LastUpdatedTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.LastUpdatedTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "StreamARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.StreamARN = ptr.String(jtv) } case "StreamName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StreamName to be of type string, got %T instead", value) } sv.StreamName = ptr.String(jtv) } case "SyncStatus": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SyncStatus to be of type string, got %T instead", value) } sv.SyncStatus = types.SyncStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentListEdgeAgentConfigurationsEdgeConfigList(v *[]types.ListEdgeAgentConfigurationsEdgeConfig, 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.ListEdgeAgentConfigurationsEdgeConfig if *v == nil { cv = []types.ListEdgeAgentConfigurationsEdgeConfig{} } else { cv = *v } for _, value := range shape { var col types.ListEdgeAgentConfigurationsEdgeConfig destAddr := &col if err := awsRestjson1_deserializeDocumentListEdgeAgentConfigurationsEdgeConfig(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentLocalSizeConfig(v **types.LocalSizeConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.LocalSizeConfig if *v == nil { sv = &types.LocalSizeConfig{} } else { sv = *v } for key, value := range shape { switch key { case "MaxLocalMediaSizeInMB": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MaxLocalMediaSizeInMB to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MaxLocalMediaSizeInMB = ptr.Int32(int32(i64)) } case "StrategyOnFullSize": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StrategyOnFullSize to be of type string, got %T instead", value) } sv.StrategyOnFullSize = types.StrategyOnFullSize(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMappedResourceConfigurationList(v *[]types.MappedResourceConfigurationListItem, 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.MappedResourceConfigurationListItem if *v == nil { cv = []types.MappedResourceConfigurationListItem{} } else { cv = *v } for _, value := range shape { var col types.MappedResourceConfigurationListItem destAddr := &col if err := awsRestjson1_deserializeDocumentMappedResourceConfigurationListItem(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentMappedResourceConfigurationListItem(v **types.MappedResourceConfigurationListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.MappedResourceConfigurationListItem if *v == nil { sv = &types.MappedResourceConfigurationListItem{} } 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 ResourceARN to be of type string, got %T instead", value) } sv.ARN = ptr.String(jtv) } case "Type": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Type to be of type string, got %T instead", value) } sv.Type = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMediaSourceConfig(v **types.MediaSourceConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.MediaSourceConfig if *v == nil { sv = &types.MediaSourceConfig{} } else { sv = *v } for key, value := range shape { switch key { case "MediaUriSecretArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MediaUriSecretArn to be of type string, got %T instead", value) } sv.MediaUriSecretArn = ptr.String(jtv) } case "MediaUriType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MediaUriType to be of type string, got %T instead", value) } sv.MediaUriType = types.MediaUriType(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMediaStorageConfiguration(v **types.MediaStorageConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.MediaStorageConfiguration if *v == nil { sv = &types.MediaStorageConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MediaStorageConfigurationStatus to be of type string, got %T instead", value) } sv.Status = types.MediaStorageConfigurationStatus(jtv) } case "StreamARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.StreamARN = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNoDataRetentionException(v **types.NoDataRetentionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.NoDataRetentionException if *v == nil { sv = &types.NoDataRetentionException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.NotAuthorizedException if *v == nil { sv = &types.NotAuthorizedException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNotificationConfiguration(v **types.NotificationConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.NotificationConfiguration if *v == nil { sv = &types.NotificationConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "DestinationConfig": if err := awsRestjson1_deserializeDocumentNotificationDestinationConfig(&sv.DestinationConfig, value); err != nil { return err } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ConfigurationStatus to be of type string, got %T instead", value) } sv.Status = types.ConfigurationStatus(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNotificationDestinationConfig(v **types.NotificationDestinationConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.NotificationDestinationConfig if *v == nil { sv = &types.NotificationDestinationConfig{} } else { sv = *v } for key, value := range shape { switch key { case "Uri": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DestinationUri to be of type string, got %T instead", value) } sv.Uri = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentRecorderConfig(v **types.RecorderConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.RecorderConfig if *v == nil { sv = &types.RecorderConfig{} } else { sv = *v } for key, value := range shape { switch key { case "MediaSourceConfig": if err := awsRestjson1_deserializeDocumentMediaSourceConfig(&sv.MediaSourceConfig, value); err != nil { return err } case "ScheduleConfig": if err := awsRestjson1_deserializeDocumentScheduleConfig(&sv.ScheduleConfig, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentResourceEndpointList(v *[]types.ResourceEndpointListItem, 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.ResourceEndpointListItem if *v == nil { cv = []types.ResourceEndpointListItem{} } else { cv = *v } for _, value := range shape { var col types.ResourceEndpointListItem destAddr := &col if err := awsRestjson1_deserializeDocumentResourceEndpointListItem(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentResourceEndpointListItem(v **types.ResourceEndpointListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ResourceEndpointListItem if *v == nil { sv = &types.ResourceEndpointListItem{} } else { sv = *v } for key, value := range shape { switch key { case "Protocol": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ChannelProtocol to be of type string, got %T instead", value) } sv.Protocol = types.ChannelProtocol(jtv) } case "ResourceEndpoint": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceEndpoint to be of type string, got %T instead", value) } sv.ResourceEndpoint = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentResourceInUseException(v **types.ResourceInUseException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ResourceInUseException if *v == nil { sv = &types.ResourceInUseException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentResourceTags(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 TagValue to be of type string, got %T instead", value) } parsedVal = jtv } mv[key] = parsedVal } *v = mv return nil } func awsRestjson1_deserializeDocumentScheduleConfig(v **types.ScheduleConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ScheduleConfig if *v == nil { sv = &types.ScheduleConfig{} } else { sv = *v } for key, value := range shape { switch key { case "DurationInSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected DurationInSeconds to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.DurationInSeconds = ptr.Int32(int32(i64)) } case "ScheduleExpression": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ScheduleExpression to be of type string, got %T instead", value) } sv.ScheduleExpression = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentSingleMasterConfiguration(v **types.SingleMasterConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.SingleMasterConfiguration if *v == nil { sv = &types.SingleMasterConfiguration{} } else { sv = *v } for key, value := range shape { switch key { case "MessageTtlSeconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected MessageTtlSeconds to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.MessageTtlSeconds = ptr.Int32(int32(i64)) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentStreamEdgeConfigurationNotFoundException(v **types.StreamEdgeConfigurationNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.StreamEdgeConfigurationNotFoundException if *v == nil { sv = &types.StreamEdgeConfigurationNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentStreamInfo(v **types.StreamInfo, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.StreamInfo if *v == nil { sv = &types.StreamInfo{} } else { sv = *v } for key, value := range shape { switch key { case "CreationTime": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "DataRetentionInHours": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected DataRetentionInHours to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.DataRetentionInHours = ptr.Int32(int32(i64)) } case "DeviceName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DeviceName to be of type string, got %T instead", value) } sv.DeviceName = ptr.String(jtv) } case "KmsKeyId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) } sv.KmsKeyId = ptr.String(jtv) } case "MediaType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected MediaType to be of type string, got %T instead", value) } sv.MediaType = ptr.String(jtv) } case "Status": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Status to be of type string, got %T instead", value) } sv.Status = types.Status(jtv) } case "StreamARN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ResourceARN to be of type string, got %T instead", value) } sv.StreamARN = ptr.String(jtv) } case "StreamName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected StreamName to be of type string, got %T instead", value) } sv.StreamName = ptr.String(jtv) } case "Version": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Version to be of type string, got %T instead", value) } sv.Version = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentStreamInfoList(v *[]types.StreamInfo, 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.StreamInfo if *v == nil { cv = []types.StreamInfo{} } else { cv = *v } for _, value := range shape { var col types.StreamInfo destAddr := &col if err := awsRestjson1_deserializeDocumentStreamInfo(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentTagsPerResourceExceededLimitException(v **types.TagsPerResourceExceededLimitException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.TagsPerResourceExceededLimitException if *v == nil { sv = &types.TagsPerResourceExceededLimitException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentUploaderConfig(v **types.UploaderConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.UploaderConfig if *v == nil { sv = &types.UploaderConfig{} } else { sv = *v } for key, value := range shape { switch key { case "ScheduleConfig": if err := awsRestjson1_deserializeDocumentScheduleConfig(&sv.ScheduleConfig, value); err != nil { return err } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentVersionMismatchException(v **types.VersionMismatchException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.VersionMismatchException if *v == nil { sv = &types.VersionMismatchException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
6,843
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package kinesisvideo provides the API client, operations, and parameter types // for Amazon Kinesis Video Streams. package kinesisvideo
6
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "kinesisvideo" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package kinesisvideo // goModuleVersion is the tagged release for this module const goModuleVersion = "1.16.0"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) type awsRestjson1_serializeOpCreateSignalingChannel struct { } func (*awsRestjson1_serializeOpCreateSignalingChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateSignalingChannel) 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.(*CreateSignalingChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/createSignalingChannel") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateSignalingChannelInput(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_serializeOpHttpBindingsCreateSignalingChannelInput(v *CreateSignalingChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateSignalingChannelInput(v *CreateSignalingChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelName != nil { ok := object.Key("ChannelName") ok.String(*v.ChannelName) } if len(v.ChannelType) > 0 { ok := object.Key("ChannelType") ok.String(string(v.ChannelType)) } if v.SingleMasterConfiguration != nil { ok := object.Key("SingleMasterConfiguration") if err := awsRestjson1_serializeDocumentSingleMasterConfiguration(v.SingleMasterConfiguration, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentTagOnCreateList(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateStream struct { } func (*awsRestjson1_serializeOpCreateStream) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateStream) 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.(*CreateStreamInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/createStream") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateStreamInput(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_serializeOpHttpBindingsCreateStreamInput(v *CreateStreamInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateStreamInput(v *CreateStreamInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DataRetentionInHours != nil { ok := object.Key("DataRetentionInHours") ok.Integer(*v.DataRetentionInHours) } if v.DeviceName != nil { ok := object.Key("DeviceName") ok.String(*v.DeviceName) } if v.KmsKeyId != nil { ok := object.Key("KmsKeyId") ok.String(*v.KmsKeyId) } if v.MediaType != nil { ok := object.Key("MediaType") ok.String(*v.MediaType) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentResourceTags(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteEdgeConfiguration struct { } func (*awsRestjson1_serializeOpDeleteEdgeConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteEdgeConfiguration) 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.(*DeleteEdgeConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/deleteEdgeConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDeleteEdgeConfigurationInput(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_serializeOpHttpBindingsDeleteEdgeConfigurationInput(v *DeleteEdgeConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDeleteEdgeConfigurationInput(v *DeleteEdgeConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpDeleteSignalingChannel struct { } func (*awsRestjson1_serializeOpDeleteSignalingChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteSignalingChannel) 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.(*DeleteSignalingChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/deleteSignalingChannel") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDeleteSignalingChannelInput(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_serializeOpHttpBindingsDeleteSignalingChannelInput(v *DeleteSignalingChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDeleteSignalingChannelInput(v *DeleteSignalingChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelARN != nil { ok := object.Key("ChannelARN") ok.String(*v.ChannelARN) } if v.CurrentVersion != nil { ok := object.Key("CurrentVersion") ok.String(*v.CurrentVersion) } return nil } type awsRestjson1_serializeOpDeleteStream struct { } func (*awsRestjson1_serializeOpDeleteStream) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteStream) 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.(*DeleteStreamInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/deleteStream") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDeleteStreamInput(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_serializeOpHttpBindingsDeleteStreamInput(v *DeleteStreamInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDeleteStreamInput(v *DeleteStreamInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CurrentVersion != nil { ok := object.Key("CurrentVersion") ok.String(*v.CurrentVersion) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } return nil } type awsRestjson1_serializeOpDescribeEdgeConfiguration struct { } func (*awsRestjson1_serializeOpDescribeEdgeConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeEdgeConfiguration) 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.(*DescribeEdgeConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/describeEdgeConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDescribeEdgeConfigurationInput(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_serializeOpHttpBindingsDescribeEdgeConfigurationInput(v *DescribeEdgeConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDescribeEdgeConfigurationInput(v *DescribeEdgeConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpDescribeImageGenerationConfiguration struct { } func (*awsRestjson1_serializeOpDescribeImageGenerationConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeImageGenerationConfiguration) 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.(*DescribeImageGenerationConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/describeImageGenerationConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDescribeImageGenerationConfigurationInput(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_serializeOpHttpBindingsDescribeImageGenerationConfigurationInput(v *DescribeImageGenerationConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDescribeImageGenerationConfigurationInput(v *DescribeImageGenerationConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpDescribeMappedResourceConfiguration struct { } func (*awsRestjson1_serializeOpDescribeMappedResourceConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeMappedResourceConfiguration) 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.(*DescribeMappedResourceConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/describeMappedResourceConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDescribeMappedResourceConfigurationInput(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_serializeOpHttpBindingsDescribeMappedResourceConfigurationInput(v *DescribeMappedResourceConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDescribeMappedResourceConfigurationInput(v *DescribeMappedResourceConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpDescribeMediaStorageConfiguration struct { } func (*awsRestjson1_serializeOpDescribeMediaStorageConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeMediaStorageConfiguration) 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.(*DescribeMediaStorageConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/describeMediaStorageConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDescribeMediaStorageConfigurationInput(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_serializeOpHttpBindingsDescribeMediaStorageConfigurationInput(v *DescribeMediaStorageConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDescribeMediaStorageConfigurationInput(v *DescribeMediaStorageConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelARN != nil { ok := object.Key("ChannelARN") ok.String(*v.ChannelARN) } if v.ChannelName != nil { ok := object.Key("ChannelName") ok.String(*v.ChannelName) } return nil } type awsRestjson1_serializeOpDescribeNotificationConfiguration struct { } func (*awsRestjson1_serializeOpDescribeNotificationConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeNotificationConfiguration) 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.(*DescribeNotificationConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/describeNotificationConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDescribeNotificationConfigurationInput(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_serializeOpHttpBindingsDescribeNotificationConfigurationInput(v *DescribeNotificationConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDescribeNotificationConfigurationInput(v *DescribeNotificationConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpDescribeSignalingChannel struct { } func (*awsRestjson1_serializeOpDescribeSignalingChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeSignalingChannel) 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.(*DescribeSignalingChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/describeSignalingChannel") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDescribeSignalingChannelInput(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_serializeOpHttpBindingsDescribeSignalingChannelInput(v *DescribeSignalingChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDescribeSignalingChannelInput(v *DescribeSignalingChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelARN != nil { ok := object.Key("ChannelARN") ok.String(*v.ChannelARN) } if v.ChannelName != nil { ok := object.Key("ChannelName") ok.String(*v.ChannelName) } return nil } type awsRestjson1_serializeOpDescribeStream struct { } func (*awsRestjson1_serializeOpDescribeStream) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDescribeStream) 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.(*DescribeStreamInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/describeStream") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentDescribeStreamInput(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_serializeOpHttpBindingsDescribeStreamInput(v *DescribeStreamInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentDescribeStreamInput(v *DescribeStreamInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpGetDataEndpoint struct { } func (*awsRestjson1_serializeOpGetDataEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDataEndpoint) 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.(*GetDataEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getDataEndpoint") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetDataEndpointInput(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_serializeOpHttpBindingsGetDataEndpointInput(v *GetDataEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetDataEndpointInput(v *GetDataEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.APIName) > 0 { ok := object.Key("APIName") ok.String(string(v.APIName)) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpGetSignalingChannelEndpoint struct { } func (*awsRestjson1_serializeOpGetSignalingChannelEndpoint) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetSignalingChannelEndpoint) 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.(*GetSignalingChannelEndpointInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getSignalingChannelEndpoint") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetSignalingChannelEndpointInput(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_serializeOpHttpBindingsGetSignalingChannelEndpointInput(v *GetSignalingChannelEndpointInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetSignalingChannelEndpointInput(v *GetSignalingChannelEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelARN != nil { ok := object.Key("ChannelARN") ok.String(*v.ChannelARN) } if v.SingleMasterChannelEndpointConfiguration != nil { ok := object.Key("SingleMasterChannelEndpointConfiguration") if err := awsRestjson1_serializeDocumentSingleMasterChannelEndpointConfiguration(v.SingleMasterChannelEndpointConfiguration, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpListEdgeAgentConfigurations struct { } func (*awsRestjson1_serializeOpListEdgeAgentConfigurations) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListEdgeAgentConfigurations) 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.(*ListEdgeAgentConfigurationsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/listEdgeAgentConfigurations") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentListEdgeAgentConfigurationsInput(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_serializeOpHttpBindingsListEdgeAgentConfigurationsInput(v *ListEdgeAgentConfigurationsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentListEdgeAgentConfigurationsInput(v *ListEdgeAgentConfigurationsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.HubDeviceArn != nil { ok := object.Key("HubDeviceArn") ok.String(*v.HubDeviceArn) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListSignalingChannels struct { } func (*awsRestjson1_serializeOpListSignalingChannels) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListSignalingChannels) 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.(*ListSignalingChannelsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/listSignalingChannels") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentListSignalingChannelsInput(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_serializeOpHttpBindingsListSignalingChannelsInput(v *ListSignalingChannelsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentListSignalingChannelsInput(v *ListSignalingChannelsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelNameCondition != nil { ok := object.Key("ChannelNameCondition") if err := awsRestjson1_serializeDocumentChannelNameCondition(v.ChannelNameCondition, ok); err != nil { return err } } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } return nil } type awsRestjson1_serializeOpListStreams struct { } func (*awsRestjson1_serializeOpListStreams) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListStreams) 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.(*ListStreamsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/listStreams") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentListStreamsInput(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_serializeOpHttpBindingsListStreamsInput(v *ListStreamsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentListStreamsInput(v *ListStreamsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.StreamNameCondition != nil { ok := object.Key("StreamNameCondition") if err := awsRestjson1_serializeDocumentStreamNameCondition(v.StreamNameCondition, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpListTagsForResource struct { } func (*awsRestjson1_serializeOpListTagsForResource) ID() string { return "OperationSerializer" } 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) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*ListTagsForResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/ListTagsForResource") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentListTagsForResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentListTagsForResourceInput(v *ListTagsForResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } return nil } type awsRestjson1_serializeOpListTagsForStream struct { } func (*awsRestjson1_serializeOpListTagsForStream) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListTagsForStream) 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.(*ListTagsForStreamInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/listTagsForStream") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentListTagsForStreamInput(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_serializeOpHttpBindingsListTagsForStreamInput(v *ListTagsForStreamInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentListTagsForStreamInput(v *ListTagsForStreamInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpStartEdgeConfigurationUpdate struct { } func (*awsRestjson1_serializeOpStartEdgeConfigurationUpdate) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpStartEdgeConfigurationUpdate) 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.(*StartEdgeConfigurationUpdateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/startEdgeConfigurationUpdate") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentStartEdgeConfigurationUpdateInput(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_serializeOpHttpBindingsStartEdgeConfigurationUpdateInput(v *StartEdgeConfigurationUpdateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentStartEdgeConfigurationUpdateInput(v *StartEdgeConfigurationUpdateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EdgeConfig != nil { ok := object.Key("EdgeConfig") if err := awsRestjson1_serializeDocumentEdgeConfig(v.EdgeConfig, ok); err != nil { return err } } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpTagResource struct { } func (*awsRestjson1_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/TagResource") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpTagStream struct { } func (*awsRestjson1_serializeOpTagStream) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpTagStream) 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.(*TagStreamInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tagStream") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTagStreamInput(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_serializeOpHttpBindingsTagStreamInput(v *TagStreamInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentTagStreamInput(v *TagStreamInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } if v.Tags != nil { ok := object.Key("Tags") if err := awsRestjson1_serializeDocumentResourceTags(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUntagResource struct { } func (*awsRestjson1_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/UntagResource") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResourceARN != nil { ok := object.Key("ResourceARN") ok.String(*v.ResourceARN) } if v.TagKeyList != nil { ok := object.Key("TagKeyList") if err := awsRestjson1_serializeDocumentTagKeyList(v.TagKeyList, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUntagStream struct { } func (*awsRestjson1_serializeOpUntagStream) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUntagStream) 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.(*UntagStreamInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/untagStream") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUntagStreamInput(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_serializeOpHttpBindingsUntagStreamInput(v *UntagStreamInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUntagStreamInput(v *UntagStreamInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } if v.TagKeyList != nil { ok := object.Key("TagKeyList") if err := awsRestjson1_serializeDocumentTagKeyList(v.TagKeyList, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateDataRetention struct { } func (*awsRestjson1_serializeOpUpdateDataRetention) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateDataRetention) 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.(*UpdateDataRetentionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/updateDataRetention") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateDataRetentionInput(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_serializeOpHttpBindingsUpdateDataRetentionInput(v *UpdateDataRetentionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUpdateDataRetentionInput(v *UpdateDataRetentionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CurrentVersion != nil { ok := object.Key("CurrentVersion") ok.String(*v.CurrentVersion) } if v.DataRetentionChangeInHours != nil { ok := object.Key("DataRetentionChangeInHours") ok.Integer(*v.DataRetentionChangeInHours) } if len(v.Operation) > 0 { ok := object.Key("Operation") ok.String(string(v.Operation)) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpUpdateImageGenerationConfiguration struct { } func (*awsRestjson1_serializeOpUpdateImageGenerationConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateImageGenerationConfiguration) 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.(*UpdateImageGenerationConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/updateImageGenerationConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateImageGenerationConfigurationInput(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_serializeOpHttpBindingsUpdateImageGenerationConfigurationInput(v *UpdateImageGenerationConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUpdateImageGenerationConfigurationInput(v *UpdateImageGenerationConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ImageGenerationConfiguration != nil { ok := object.Key("ImageGenerationConfiguration") if err := awsRestjson1_serializeDocumentImageGenerationConfiguration(v.ImageGenerationConfiguration, ok); err != nil { return err } } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpUpdateMediaStorageConfiguration struct { } func (*awsRestjson1_serializeOpUpdateMediaStorageConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateMediaStorageConfiguration) 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.(*UpdateMediaStorageConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/updateMediaStorageConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateMediaStorageConfigurationInput(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_serializeOpHttpBindingsUpdateMediaStorageConfigurationInput(v *UpdateMediaStorageConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUpdateMediaStorageConfigurationInput(v *UpdateMediaStorageConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelARN != nil { ok := object.Key("ChannelARN") ok.String(*v.ChannelARN) } if v.MediaStorageConfiguration != nil { ok := object.Key("MediaStorageConfiguration") if err := awsRestjson1_serializeDocumentMediaStorageConfiguration(v.MediaStorageConfiguration, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateNotificationConfiguration struct { } func (*awsRestjson1_serializeOpUpdateNotificationConfiguration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateNotificationConfiguration) 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.(*UpdateNotificationConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/updateNotificationConfiguration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateNotificationConfigurationInput(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_serializeOpHttpBindingsUpdateNotificationConfigurationInput(v *UpdateNotificationConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUpdateNotificationConfigurationInput(v *UpdateNotificationConfigurationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.NotificationConfiguration != nil { ok := object.Key("NotificationConfiguration") if err := awsRestjson1_serializeDocumentNotificationConfiguration(v.NotificationConfiguration, ok); err != nil { return err } } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpUpdateSignalingChannel struct { } func (*awsRestjson1_serializeOpUpdateSignalingChannel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateSignalingChannel) 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.(*UpdateSignalingChannelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/updateSignalingChannel") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateSignalingChannelInput(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_serializeOpHttpBindingsUpdateSignalingChannelInput(v *UpdateSignalingChannelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUpdateSignalingChannelInput(v *UpdateSignalingChannelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ChannelARN != nil { ok := object.Key("ChannelARN") ok.String(*v.ChannelARN) } if v.CurrentVersion != nil { ok := object.Key("CurrentVersion") ok.String(*v.CurrentVersion) } if v.SingleMasterConfiguration != nil { ok := object.Key("SingleMasterConfiguration") if err := awsRestjson1_serializeDocumentSingleMasterConfiguration(v.SingleMasterConfiguration, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateStream struct { } func (*awsRestjson1_serializeOpUpdateStream) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateStream) 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.(*UpdateStreamInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/updateStream") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateStreamInput(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_serializeOpHttpBindingsUpdateStreamInput(v *UpdateStreamInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUpdateStreamInput(v *UpdateStreamInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CurrentVersion != nil { ok := object.Key("CurrentVersion") ok.String(*v.CurrentVersion) } if v.DeviceName != nil { ok := object.Key("DeviceName") ok.String(*v.DeviceName) } if v.MediaType != nil { ok := object.Key("MediaType") ok.String(*v.MediaType) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } func awsRestjson1_serializeDocumentChannelNameCondition(v *types.ChannelNameCondition, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ComparisonOperator) > 0 { ok := object.Key("ComparisonOperator") ok.String(string(v.ComparisonOperator)) } if v.ComparisonValue != nil { ok := object.Key("ComparisonValue") ok.String(*v.ComparisonValue) } return nil } func awsRestjson1_serializeDocumentDeletionConfig(v *types.DeletionConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeleteAfterUpload != nil { ok := object.Key("DeleteAfterUpload") ok.Boolean(*v.DeleteAfterUpload) } if v.EdgeRetentionInHours != nil { ok := object.Key("EdgeRetentionInHours") ok.Integer(*v.EdgeRetentionInHours) } if v.LocalSizeConfig != nil { ok := object.Key("LocalSizeConfig") if err := awsRestjson1_serializeDocumentLocalSizeConfig(v.LocalSizeConfig, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentEdgeConfig(v *types.EdgeConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeletionConfig != nil { ok := object.Key("DeletionConfig") if err := awsRestjson1_serializeDocumentDeletionConfig(v.DeletionConfig, ok); err != nil { return err } } if v.HubDeviceArn != nil { ok := object.Key("HubDeviceArn") ok.String(*v.HubDeviceArn) } if v.RecorderConfig != nil { ok := object.Key("RecorderConfig") if err := awsRestjson1_serializeDocumentRecorderConfig(v.RecorderConfig, ok); err != nil { return err } } if v.UploaderConfig != nil { ok := object.Key("UploaderConfig") if err := awsRestjson1_serializeDocumentUploaderConfig(v.UploaderConfig, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentFormatConfig(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_serializeDocumentImageGenerationConfiguration(v *types.ImageGenerationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationConfig != nil { ok := object.Key("DestinationConfig") if err := awsRestjson1_serializeDocumentImageGenerationDestinationConfig(v.DestinationConfig, ok); err != nil { return err } } if len(v.Format) > 0 { ok := object.Key("Format") ok.String(string(v.Format)) } if v.FormatConfig != nil { ok := object.Key("FormatConfig") if err := awsRestjson1_serializeDocumentFormatConfig(v.FormatConfig, ok); err != nil { return err } } if v.HeightPixels != nil { ok := object.Key("HeightPixels") ok.Integer(*v.HeightPixels) } if len(v.ImageSelectorType) > 0 { ok := object.Key("ImageSelectorType") ok.String(string(v.ImageSelectorType)) } if v.SamplingInterval != nil { ok := object.Key("SamplingInterval") ok.Integer(*v.SamplingInterval) } if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) } if v.WidthPixels != nil { ok := object.Key("WidthPixels") ok.Integer(*v.WidthPixels) } return nil } func awsRestjson1_serializeDocumentImageGenerationDestinationConfig(v *types.ImageGenerationDestinationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationRegion != nil { ok := object.Key("DestinationRegion") ok.String(*v.DestinationRegion) } if v.Uri != nil { ok := object.Key("Uri") ok.String(*v.Uri) } return nil } func awsRestjson1_serializeDocumentListOfProtocols(v []types.ChannelProtocol, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsRestjson1_serializeDocumentLocalSizeConfig(v *types.LocalSizeConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MaxLocalMediaSizeInMB != nil { ok := object.Key("MaxLocalMediaSizeInMB") ok.Integer(*v.MaxLocalMediaSizeInMB) } if len(v.StrategyOnFullSize) > 0 { ok := object.Key("StrategyOnFullSize") ok.String(string(v.StrategyOnFullSize)) } return nil } func awsRestjson1_serializeDocumentMediaSourceConfig(v *types.MediaSourceConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MediaUriSecretArn != nil { ok := object.Key("MediaUriSecretArn") ok.String(*v.MediaUriSecretArn) } if len(v.MediaUriType) > 0 { ok := object.Key("MediaUriType") ok.String(string(v.MediaUriType)) } return nil } func awsRestjson1_serializeDocumentMediaStorageConfiguration(v *types.MediaStorageConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } return nil } func awsRestjson1_serializeDocumentNotificationConfiguration(v *types.NotificationConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DestinationConfig != nil { ok := object.Key("DestinationConfig") if err := awsRestjson1_serializeDocumentNotificationDestinationConfig(v.DestinationConfig, ok); err != nil { return err } } if len(v.Status) > 0 { ok := object.Key("Status") ok.String(string(v.Status)) } return nil } func awsRestjson1_serializeDocumentNotificationDestinationConfig(v *types.NotificationDestinationConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Uri != nil { ok := object.Key("Uri") ok.String(*v.Uri) } return nil } func awsRestjson1_serializeDocumentRecorderConfig(v *types.RecorderConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MediaSourceConfig != nil { ok := object.Key("MediaSourceConfig") if err := awsRestjson1_serializeDocumentMediaSourceConfig(v.MediaSourceConfig, ok); err != nil { return err } } if v.ScheduleConfig != nil { ok := object.Key("ScheduleConfig") if err := awsRestjson1_serializeDocumentScheduleConfig(v.ScheduleConfig, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentResourceTags(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_serializeDocumentScheduleConfig(v *types.ScheduleConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DurationInSeconds != nil { ok := object.Key("DurationInSeconds") ok.Integer(*v.DurationInSeconds) } if v.ScheduleExpression != nil { ok := object.Key("ScheduleExpression") ok.String(*v.ScheduleExpression) } return nil } func awsRestjson1_serializeDocumentSingleMasterChannelEndpointConfiguration(v *types.SingleMasterChannelEndpointConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Protocols != nil { ok := object.Key("Protocols") if err := awsRestjson1_serializeDocumentListOfProtocols(v.Protocols, ok); err != nil { return err } } if len(v.Role) > 0 { ok := object.Key("Role") ok.String(string(v.Role)) } return nil } func awsRestjson1_serializeDocumentSingleMasterConfiguration(v *types.SingleMasterConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.MessageTtlSeconds != nil { ok := object.Key("MessageTtlSeconds") ok.Integer(*v.MessageTtlSeconds) } return nil } func awsRestjson1_serializeDocumentStreamNameCondition(v *types.StreamNameCondition, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ComparisonOperator) > 0 { ok := object.Key("ComparisonOperator") ok.String(string(v.ComparisonOperator)) } if v.ComparisonValue != nil { ok := object.Key("ComparisonValue") ok.String(*v.ComparisonValue) } return nil } func awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Key != nil { ok := object.Key("Key") ok.String(*v.Key) } if v.Value != nil { ok := object.Key("Value") ok.String(*v.Value) } return nil } func awsRestjson1_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(v[i]) } return nil } func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentTagOnCreateList(v []types.Tag, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentUploaderConfig(v *types.UploaderConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ScheduleConfig != nil { ok := object.Key("ScheduleConfig") if err := awsRestjson1_serializeDocumentScheduleConfig(v.ScheduleConfig, ok); err != nil { return err } } return nil }
2,772
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideo import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisvideo/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpCreateSignalingChannel struct { } func (*validateOpCreateSignalingChannel) ID() string { return "OperationInputValidation" } func (m *validateOpCreateSignalingChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateSignalingChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateSignalingChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpCreateStream struct { } func (*validateOpCreateStream) ID() string { return "OperationInputValidation" } func (m *validateOpCreateStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*CreateStreamInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpCreateStreamInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteSignalingChannel struct { } func (*validateOpDeleteSignalingChannel) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteSignalingChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteSignalingChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteSignalingChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpDeleteStream struct { } func (*validateOpDeleteStream) ID() string { return "OperationInputValidation" } func (m *validateOpDeleteStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*DeleteStreamInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpDeleteStreamInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetDataEndpoint struct { } func (*validateOpGetDataEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpGetDataEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetDataEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetDataEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetSignalingChannelEndpoint struct { } func (*validateOpGetSignalingChannelEndpoint) ID() string { return "OperationInputValidation" } func (m *validateOpGetSignalingChannelEndpoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetSignalingChannelEndpointInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetSignalingChannelEndpointInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListEdgeAgentConfigurations struct { } func (*validateOpListEdgeAgentConfigurations) ID() string { return "OperationInputValidation" } func (m *validateOpListEdgeAgentConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListEdgeAgentConfigurationsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListEdgeAgentConfigurationsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListTagsForResource struct { } func (*validateOpListTagsForResource) ID() string { return "OperationInputValidation" } func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListTagsForResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListTagsForResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpStartEdgeConfigurationUpdate struct { } func (*validateOpStartEdgeConfigurationUpdate) ID() string { return "OperationInputValidation" } func (m *validateOpStartEdgeConfigurationUpdate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*StartEdgeConfigurationUpdateInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpStartEdgeConfigurationUpdateInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagResource struct { } func (*validateOpTagResource) ID() string { return "OperationInputValidation" } func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpTagStream struct { } func (*validateOpTagStream) ID() string { return "OperationInputValidation" } func (m *validateOpTagStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*TagStreamInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpTagStreamInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagResource struct { } func (*validateOpUntagResource) ID() string { return "OperationInputValidation" } func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagResourceInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagResourceInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUntagStream struct { } func (*validateOpUntagStream) ID() string { return "OperationInputValidation" } func (m *validateOpUntagStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UntagStreamInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUntagStreamInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateDataRetention struct { } func (*validateOpUpdateDataRetention) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateDataRetention) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateDataRetentionInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateDataRetentionInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateImageGenerationConfiguration struct { } func (*validateOpUpdateImageGenerationConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateImageGenerationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateImageGenerationConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateImageGenerationConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateMediaStorageConfiguration struct { } func (*validateOpUpdateMediaStorageConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateMediaStorageConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateMediaStorageConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateMediaStorageConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateNotificationConfiguration struct { } func (*validateOpUpdateNotificationConfiguration) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateNotificationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateNotificationConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateNotificationConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateSignalingChannel struct { } func (*validateOpUpdateSignalingChannel) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateSignalingChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateSignalingChannelInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateSignalingChannelInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpUpdateStream struct { } func (*validateOpUpdateStream) ID() string { return "OperationInputValidation" } func (m *validateOpUpdateStream) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*UpdateStreamInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpUpdateStreamInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpCreateSignalingChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateSignalingChannel{}, middleware.After) } func addOpCreateStreamValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateStream{}, middleware.After) } func addOpDeleteSignalingChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSignalingChannel{}, middleware.After) } func addOpDeleteStreamValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteStream{}, middleware.After) } func addOpGetDataEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDataEndpoint{}, middleware.After) } func addOpGetSignalingChannelEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSignalingChannelEndpoint{}, middleware.After) } func addOpListEdgeAgentConfigurationsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListEdgeAgentConfigurations{}, middleware.After) } func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } func addOpStartEdgeConfigurationUpdateValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartEdgeConfigurationUpdate{}, middleware.After) } func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } func addOpTagStreamValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagStream{}, middleware.After) } func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } func addOpUntagStreamValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagStream{}, middleware.After) } func addOpUpdateDataRetentionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDataRetention{}, middleware.After) } func addOpUpdateImageGenerationConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateImageGenerationConfiguration{}, middleware.After) } func addOpUpdateMediaStorageConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateMediaStorageConfiguration{}, middleware.After) } func addOpUpdateNotificationConfigurationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateNotificationConfiguration{}, middleware.After) } func addOpUpdateSignalingChannelValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSignalingChannel{}, middleware.After) } func addOpUpdateStreamValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateStream{}, middleware.After) } func validateEdgeConfig(v *types.EdgeConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "EdgeConfig"} if v.HubDeviceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("HubDeviceArn")) } if v.RecorderConfig == nil { invalidParams.Add(smithy.NewErrParamRequired("RecorderConfig")) } else if v.RecorderConfig != nil { if err := validateRecorderConfig(v.RecorderConfig); err != nil { invalidParams.AddNested("RecorderConfig", err.(smithy.InvalidParamsError)) } } if v.UploaderConfig != nil { if err := validateUploaderConfig(v.UploaderConfig); err != nil { invalidParams.AddNested("UploaderConfig", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateImageGenerationConfiguration(v *types.ImageGenerationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ImageGenerationConfiguration"} if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if len(v.ImageSelectorType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ImageSelectorType")) } if v.DestinationConfig == nil { invalidParams.Add(smithy.NewErrParamRequired("DestinationConfig")) } else if v.DestinationConfig != nil { if err := validateImageGenerationDestinationConfig(v.DestinationConfig); err != nil { invalidParams.AddNested("DestinationConfig", err.(smithy.InvalidParamsError)) } } if v.SamplingInterval == nil { invalidParams.Add(smithy.NewErrParamRequired("SamplingInterval")) } if len(v.Format) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Format")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateImageGenerationDestinationConfig(v *types.ImageGenerationDestinationConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ImageGenerationDestinationConfig"} if v.Uri == nil { invalidParams.Add(smithy.NewErrParamRequired("Uri")) } if v.DestinationRegion == nil { invalidParams.Add(smithy.NewErrParamRequired("DestinationRegion")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMediaSourceConfig(v *types.MediaSourceConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MediaSourceConfig"} if v.MediaUriSecretArn == nil { invalidParams.Add(smithy.NewErrParamRequired("MediaUriSecretArn")) } if len(v.MediaUriType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("MediaUriType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateMediaStorageConfiguration(v *types.MediaStorageConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "MediaStorageConfiguration"} if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateNotificationConfiguration(v *types.NotificationConfiguration) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "NotificationConfiguration"} if len(v.Status) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Status")) } if v.DestinationConfig == nil { invalidParams.Add(smithy.NewErrParamRequired("DestinationConfig")) } else if v.DestinationConfig != nil { if err := validateNotificationDestinationConfig(v.DestinationConfig); err != nil { invalidParams.AddNested("DestinationConfig", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateNotificationDestinationConfig(v *types.NotificationDestinationConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "NotificationDestinationConfig"} if v.Uri == nil { invalidParams.Add(smithy.NewErrParamRequired("Uri")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateRecorderConfig(v *types.RecorderConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "RecorderConfig"} if v.MediaSourceConfig == nil { invalidParams.Add(smithy.NewErrParamRequired("MediaSourceConfig")) } else if v.MediaSourceConfig != nil { if err := validateMediaSourceConfig(v.MediaSourceConfig); err != nil { invalidParams.AddNested("MediaSourceConfig", err.(smithy.InvalidParamsError)) } } if v.ScheduleConfig != nil { if err := validateScheduleConfig(v.ScheduleConfig); err != nil { invalidParams.AddNested("ScheduleConfig", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateScheduleConfig(v *types.ScheduleConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ScheduleConfig"} if v.ScheduleExpression == nil { invalidParams.Add(smithy.NewErrParamRequired("ScheduleExpression")) } if v.DurationInSeconds == nil { invalidParams.Add(smithy.NewErrParamRequired("DurationInSeconds")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTag(v *types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "Tag"} if v.Key == nil { invalidParams.Add(smithy.NewErrParamRequired("Key")) } if v.Value == nil { invalidParams.Add(smithy.NewErrParamRequired("Value")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagList(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagList"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTagOnCreateList(v []types.Tag) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagOnCreateList"} for i := range v { if err := validateTag(&v[i]); err != nil { invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateUploaderConfig(v *types.UploaderConfig) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UploaderConfig"} if v.ScheduleConfig == nil { invalidParams.Add(smithy.NewErrParamRequired("ScheduleConfig")) } else if v.ScheduleConfig != nil { if err := validateScheduleConfig(v.ScheduleConfig); err != nil { invalidParams.AddNested("ScheduleConfig", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateSignalingChannelInput(v *CreateSignalingChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateSignalingChannelInput"} if v.ChannelName == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelName")) } if v.Tags != nil { if err := validateTagOnCreateList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpCreateStreamInput(v *CreateStreamInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "CreateStreamInput"} if v.StreamName == nil { invalidParams.Add(smithy.NewErrParamRequired("StreamName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteSignalingChannelInput(v *DeleteSignalingChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteSignalingChannelInput"} if v.ChannelARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpDeleteStreamInput(v *DeleteStreamInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "DeleteStreamInput"} if v.StreamARN == nil { invalidParams.Add(smithy.NewErrParamRequired("StreamARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetDataEndpointInput(v *GetDataEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetDataEndpointInput"} if len(v.APIName) == 0 { invalidParams.Add(smithy.NewErrParamRequired("APIName")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetSignalingChannelEndpointInput(v *GetSignalingChannelEndpointInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetSignalingChannelEndpointInput"} if v.ChannelARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListEdgeAgentConfigurationsInput(v *ListEdgeAgentConfigurationsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListEdgeAgentConfigurationsInput"} if v.HubDeviceArn == nil { invalidParams.Add(smithy.NewErrParamRequired("HubDeviceArn")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpStartEdgeConfigurationUpdateInput(v *StartEdgeConfigurationUpdateInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartEdgeConfigurationUpdateInput"} if v.EdgeConfig == nil { invalidParams.Add(smithy.NewErrParamRequired("EdgeConfig")) } else if v.EdgeConfig != nil { if err := validateEdgeConfig(v.EdgeConfig); err != nil { invalidParams.AddNested("EdgeConfig", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } else if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpTagStreamInput(v *TagStreamInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TagStreamInput"} if v.Tags == nil { invalidParams.Add(smithy.NewErrParamRequired("Tags")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagResourceInput(v *UntagResourceInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} if v.ResourceARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) } if v.TagKeyList == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeyList")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUntagStreamInput(v *UntagStreamInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UntagStreamInput"} if v.TagKeyList == nil { invalidParams.Add(smithy.NewErrParamRequired("TagKeyList")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateDataRetentionInput(v *UpdateDataRetentionInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateDataRetentionInput"} if v.CurrentVersion == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentVersion")) } if len(v.Operation) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Operation")) } if v.DataRetentionChangeInHours == nil { invalidParams.Add(smithy.NewErrParamRequired("DataRetentionChangeInHours")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateImageGenerationConfigurationInput(v *UpdateImageGenerationConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateImageGenerationConfigurationInput"} if v.ImageGenerationConfiguration != nil { if err := validateImageGenerationConfiguration(v.ImageGenerationConfiguration); err != nil { invalidParams.AddNested("ImageGenerationConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateMediaStorageConfigurationInput(v *UpdateMediaStorageConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateMediaStorageConfigurationInput"} if v.ChannelARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelARN")) } if v.MediaStorageConfiguration == nil { invalidParams.Add(smithy.NewErrParamRequired("MediaStorageConfiguration")) } else if v.MediaStorageConfiguration != nil { if err := validateMediaStorageConfiguration(v.MediaStorageConfiguration); err != nil { invalidParams.AddNested("MediaStorageConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateNotificationConfigurationInput(v *UpdateNotificationConfigurationInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateNotificationConfigurationInput"} if v.NotificationConfiguration != nil { if err := validateNotificationConfiguration(v.NotificationConfiguration); err != nil { invalidParams.AddNested("NotificationConfiguration", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateSignalingChannelInput(v *UpdateSignalingChannelInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateSignalingChannelInput"} if v.ChannelARN == nil { invalidParams.Add(smithy.NewErrParamRequired("ChannelARN")) } if v.CurrentVersion == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentVersion")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpUpdateStreamInput(v *UpdateStreamInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "UpdateStreamInput"} if v.CurrentVersion == nil { invalidParams.Add(smithy.NewErrParamRequired("CurrentVersion")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
1,051
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver Kinesis Video endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisvideo.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisvideo-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisvideo.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisvideo-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisvideo.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisvideo-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
352
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type APIName string // Enum values for APIName const ( APINamePutMedia APIName = "PUT_MEDIA" APINameGetMedia APIName = "GET_MEDIA" APINameListFragments APIName = "LIST_FRAGMENTS" APINameGetMediaForFragmentList APIName = "GET_MEDIA_FOR_FRAGMENT_LIST" APINameGetHlsStreamingSessionUrl APIName = "GET_HLS_STREAMING_SESSION_URL" APINameGetDashStreamingSessionUrl APIName = "GET_DASH_STREAMING_SESSION_URL" APINameGetClip APIName = "GET_CLIP" APINameGetImages APIName = "GET_IMAGES" ) // Values returns all known values for APIName. 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 (APIName) Values() []APIName { return []APIName{ "PUT_MEDIA", "GET_MEDIA", "LIST_FRAGMENTS", "GET_MEDIA_FOR_FRAGMENT_LIST", "GET_HLS_STREAMING_SESSION_URL", "GET_DASH_STREAMING_SESSION_URL", "GET_CLIP", "GET_IMAGES", } } type ChannelProtocol string // Enum values for ChannelProtocol const ( ChannelProtocolWss ChannelProtocol = "WSS" ChannelProtocolHttps ChannelProtocol = "HTTPS" ChannelProtocolWebrtc ChannelProtocol = "WEBRTC" ) // Values returns all known values for ChannelProtocol. 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 (ChannelProtocol) Values() []ChannelProtocol { return []ChannelProtocol{ "WSS", "HTTPS", "WEBRTC", } } type ChannelRole string // Enum values for ChannelRole const ( ChannelRoleMaster ChannelRole = "MASTER" ChannelRoleViewer ChannelRole = "VIEWER" ) // Values returns all known values for ChannelRole. 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 (ChannelRole) Values() []ChannelRole { return []ChannelRole{ "MASTER", "VIEWER", } } type ChannelType string // Enum values for ChannelType const ( ChannelTypeSingleMaster ChannelType = "SINGLE_MASTER" ChannelTypeFullMesh ChannelType = "FULL_MESH" ) // Values returns all known values for ChannelType. 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 (ChannelType) Values() []ChannelType { return []ChannelType{ "SINGLE_MASTER", "FULL_MESH", } } type ComparisonOperator string // Enum values for ComparisonOperator const ( ComparisonOperatorBeginsWith ComparisonOperator = "BEGINS_WITH" ) // Values returns all known values for ComparisonOperator. Note that this can be // expanded in the future, and so it is only as up to date as the client. The // ordering of this slice is not guaranteed to be stable across updates. func (ComparisonOperator) Values() []ComparisonOperator { return []ComparisonOperator{ "BEGINS_WITH", } } type ConfigurationStatus string // Enum values for ConfigurationStatus const ( ConfigurationStatusEnabled ConfigurationStatus = "ENABLED" ConfigurationStatusDisabled ConfigurationStatus = "DISABLED" ) // Values returns all known values for ConfigurationStatus. 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 (ConfigurationStatus) Values() []ConfigurationStatus { return []ConfigurationStatus{ "ENABLED", "DISABLED", } } type Format string // Enum values for Format const ( FormatJpeg Format = "JPEG" FormatPng Format = "PNG" ) // Values returns all known values for Format. 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 (Format) Values() []Format { return []Format{ "JPEG", "PNG", } } type FormatConfigKey string // Enum values for FormatConfigKey const ( FormatConfigKeyJPEGQuality FormatConfigKey = "JPEGQuality" ) // Values returns all known values for FormatConfigKey. 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 (FormatConfigKey) Values() []FormatConfigKey { return []FormatConfigKey{ "JPEGQuality", } } type ImageSelectorType string // Enum values for ImageSelectorType const ( ImageSelectorTypeServerTimestamp ImageSelectorType = "SERVER_TIMESTAMP" ImageSelectorTypeProducerTimestamp ImageSelectorType = "PRODUCER_TIMESTAMP" ) // Values returns all known values for ImageSelectorType. 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 (ImageSelectorType) Values() []ImageSelectorType { return []ImageSelectorType{ "SERVER_TIMESTAMP", "PRODUCER_TIMESTAMP", } } type MediaStorageConfigurationStatus string // Enum values for MediaStorageConfigurationStatus const ( MediaStorageConfigurationStatusEnabled MediaStorageConfigurationStatus = "ENABLED" MediaStorageConfigurationStatusDisabled MediaStorageConfigurationStatus = "DISABLED" ) // Values returns all known values for MediaStorageConfigurationStatus. 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 (MediaStorageConfigurationStatus) Values() []MediaStorageConfigurationStatus { return []MediaStorageConfigurationStatus{ "ENABLED", "DISABLED", } } type MediaUriType string // Enum values for MediaUriType const ( MediaUriTypeRtspUri MediaUriType = "RTSP_URI" MediaUriTypeFileUri MediaUriType = "FILE_URI" ) // Values returns all known values for MediaUriType. 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 (MediaUriType) Values() []MediaUriType { return []MediaUriType{ "RTSP_URI", "FILE_URI", } } type RecorderStatus string // Enum values for RecorderStatus const ( RecorderStatusSuccess RecorderStatus = "SUCCESS" RecorderStatusUserError RecorderStatus = "USER_ERROR" RecorderStatusSystemError RecorderStatus = "SYSTEM_ERROR" ) // Values returns all known values for RecorderStatus. 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 (RecorderStatus) Values() []RecorderStatus { return []RecorderStatus{ "SUCCESS", "USER_ERROR", "SYSTEM_ERROR", } } type Status string // Enum values for Status const ( StatusCreating Status = "CREATING" StatusActive Status = "ACTIVE" StatusUpdating Status = "UPDATING" StatusDeleting Status = "DELETING" ) // Values returns all known values for Status. 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 (Status) Values() []Status { return []Status{ "CREATING", "ACTIVE", "UPDATING", "DELETING", } } type StrategyOnFullSize string // Enum values for StrategyOnFullSize const ( StrategyOnFullSizeDeleteOldestMedia StrategyOnFullSize = "DELETE_OLDEST_MEDIA" StrategyOnFullSizeDenyNewMedia StrategyOnFullSize = "DENY_NEW_MEDIA" ) // Values returns all known values for StrategyOnFullSize. 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 (StrategyOnFullSize) Values() []StrategyOnFullSize { return []StrategyOnFullSize{ "DELETE_OLDEST_MEDIA", "DENY_NEW_MEDIA", } } type SyncStatus string // Enum values for SyncStatus const ( SyncStatusSyncing SyncStatus = "SYNCING" SyncStatusAcknowledged SyncStatus = "ACKNOWLEDGED" SyncStatusInSync SyncStatus = "IN_SYNC" SyncStatusSyncFailed SyncStatus = "SYNC_FAILED" SyncStatusDeleting SyncStatus = "DELETING" SyncStatusDeleteFailed SyncStatus = "DELETE_FAILED" SyncStatusDeletingAcknowledged SyncStatus = "DELETING_ACKNOWLEDGED" ) // Values returns all known values for SyncStatus. 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 (SyncStatus) Values() []SyncStatus { return []SyncStatus{ "SYNCING", "ACKNOWLEDGED", "IN_SYNC", "SYNC_FAILED", "DELETING", "DELETE_FAILED", "DELETING_ACKNOWLEDGED", } } type UpdateDataRetentionOperation string // Enum values for UpdateDataRetentionOperation const ( UpdateDataRetentionOperationIncreaseDataRetention UpdateDataRetentionOperation = "INCREASE_DATA_RETENTION" UpdateDataRetentionOperationDecreaseDataRetention UpdateDataRetentionOperation = "DECREASE_DATA_RETENTION" ) // Values returns all known values for UpdateDataRetentionOperation. 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 (UpdateDataRetentionOperation) Values() []UpdateDataRetentionOperation { return []UpdateDataRetentionOperation{ "INCREASE_DATA_RETENTION", "DECREASE_DATA_RETENTION", } } type UploaderStatus string // Enum values for UploaderStatus const ( UploaderStatusSuccess UploaderStatus = "SUCCESS" UploaderStatusUserError UploaderStatus = "USER_ERROR" UploaderStatusSystemError UploaderStatus = "SYSTEM_ERROR" ) // Values returns all known values for UploaderStatus. 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 (UploaderStatus) Values() []UploaderStatus { return []UploaderStatus{ "SUCCESS", "USER_ERROR", "SYSTEM_ERROR", } }
340
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // You do not have required permissions to perform this operation. type AccessDeniedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccessDeniedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccessDeniedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccessDeniedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccessDeniedException" } return *e.ErrorCodeOverride } func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have reached the maximum limit of active signaling channels for this Amazon // Web Services account in this region. type AccountChannelLimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccountChannelLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccountChannelLimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccountChannelLimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccountChannelLimitExceededException" } return *e.ErrorCodeOverride } func (e *AccountChannelLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The number of streams created for the account is too high. type AccountStreamLimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *AccountStreamLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *AccountStreamLimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *AccountStreamLimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "AccountStreamLimitExceededException" } return *e.ErrorCodeOverride } func (e *AccountStreamLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Kinesis Video Streams has throttled the request because you have exceeded the // limit of allowed client calls. Try making the call later. type ClientLimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ClientLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ClientLimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ClientLimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ClientLimitExceededException" } return *e.ErrorCodeOverride } func (e *ClientLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Not implemented. type DeviceStreamLimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *DeviceStreamLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *DeviceStreamLimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *DeviceStreamLimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "DeviceStreamLimitExceededException" } return *e.ErrorCodeOverride } func (e *DeviceStreamLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The value for this input parameter is invalid. type InvalidArgumentException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidArgumentException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidArgumentException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidArgumentException" } return *e.ErrorCodeOverride } func (e *InvalidArgumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Not implemented. type InvalidDeviceException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidDeviceException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidDeviceException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidDeviceException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidDeviceException" } return *e.ErrorCodeOverride } func (e *InvalidDeviceException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The format of the StreamARN is invalid. type InvalidResourceFormatException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidResourceFormatException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidResourceFormatException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidResourceFormatException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidResourceFormatException" } return *e.ErrorCodeOverride } func (e *InvalidResourceFormatException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The Stream data retention in hours is equal to zero. type NoDataRetentionException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NoDataRetentionException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NoDataRetentionException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NoDataRetentionException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NoDataRetentionException" } return *e.ErrorCodeOverride } func (e *NoDataRetentionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The caller is not authorized to perform this operation. type NotAuthorizedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NotAuthorizedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NotAuthorizedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NotAuthorizedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NotAuthorizedException" } return *e.ErrorCodeOverride } func (e *NotAuthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // When the input StreamARN or ChannelARN in CLOUD_STORAGE_MODE is already mapped // to a different Kinesis Video Stream resource, or if the provided input StreamARN // or ChannelARN is not in Active status, try one of the following : // - The DescribeMediaStorageConfiguration API to determine what the stream given // channel is mapped to. // - The DescribeMappedResourceConfiguration API to determine the channel that // the given stream is mapped to. // - The DescribeStream or DescribeSignalingChannel API to determine the status // of the resource. type ResourceInUseException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceInUseException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceInUseException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceInUseException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceInUseException" } return *e.ErrorCodeOverride } func (e *ResourceInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Amazon Kinesis Video Streams can't find the stream that you specified. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The Exception rendered when the Amazon Kinesis Video Stream can't find a // stream's edge configuration that you specified. type StreamEdgeConfigurationNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *StreamEdgeConfigurationNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *StreamEdgeConfigurationNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *StreamEdgeConfigurationNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "StreamEdgeConfigurationNotFoundException" } return *e.ErrorCodeOverride } func (e *StreamEdgeConfigurationNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // You have exceeded the limit of tags that you can associate with the resource. A // Kinesis video stream can support up to 50 tags. type TagsPerResourceExceededLimitException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *TagsPerResourceExceededLimitException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *TagsPerResourceExceededLimitException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *TagsPerResourceExceededLimitException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "TagsPerResourceExceededLimitException" } return *e.ErrorCodeOverride } func (e *TagsPerResourceExceededLimitException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The stream version that you specified is not the latest version. To get the // latest version, use the DescribeStream (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_DescribeStream.html) // API. type VersionMismatchException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *VersionMismatchException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *VersionMismatchException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *VersionMismatchException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "VersionMismatchException" } return *e.ErrorCodeOverride } func (e *VersionMismatchException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
423
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // A structure that encapsulates a signaling channel's metadata and properties. type ChannelInfo struct { // The Amazon Resource Name (ARN) of the signaling channel. ChannelARN *string // The name of the signaling channel. ChannelName *string // Current status of the signaling channel. ChannelStatus Status // The type of the signaling channel. ChannelType ChannelType // The time at which the signaling channel was created. CreationTime *time.Time // A structure that contains the configuration for the SINGLE_MASTER channel type. SingleMasterConfiguration *SingleMasterConfiguration // The current version of the signaling channel. Version *string noSmithyDocumentSerde } // An optional input parameter for the ListSignalingChannels API. When this // parameter is specified while invoking ListSignalingChannels , the API returns // only the channels that satisfy a condition specified in ChannelNameCondition . type ChannelNameCondition struct { // A comparison operator. Currently, you can only specify the BEGINS_WITH // operator, which finds signaling channels whose names begin with a given prefix. ComparisonOperator ComparisonOperator // A value to compare. ComparisonValue *string noSmithyDocumentSerde } // The configuration details required to delete the connection of the stream from // the Edge Agent. type DeletionConfig struct { // The boolean value used to indicate whether or not you want to mark the media // for deletion, once it has been uploaded to the Kinesis Video Stream cloud. The // media files can be deleted if any of the deletion configuration values are set // to true , such as when the limit for the EdgeRetentionInHours , or the // MaxLocalMediaSizeInMB , has been reached. Since the default value is set to true // , configure the uploader schedule such that the media files are not being // deleted before they are initially uploaded to the Amazon Web Services cloud. DeleteAfterUpload *bool // The number of hours that you want to retain the data in the stream on the Edge // Agent. The default value of the retention time is 720 hours, which translates to // 30 days. EdgeRetentionInHours *int32 // The value of the local size required in order to delete the edge configuration. LocalSizeConfig *LocalSizeConfig noSmithyDocumentSerde } // An object that contains the latest status details for an edge agent's recorder // and uploader jobs. Use this information to determine the current health of an // edge agent. type EdgeAgentStatus struct { // The latest status of a stream’s edge recording job. LastRecorderStatus *LastRecorderStatus // The latest status of a stream’s edge to cloud uploader job. LastUploaderStatus *LastUploaderStatus noSmithyDocumentSerde } // A description of the stream's edge configuration that will be used to sync with // the Edge Agent IoT Greengrass component. The Edge Agent component will run on an // IoT Hub Device setup at your premise. type EdgeConfig struct { // The "Internet of Things (IoT) Thing" Arn of the stream. // // This member is required. HubDeviceArn *string // The recorder configuration consists of the local MediaSourceConfig details, // that are used as credentials to access the local media files streamed on the // camera. // // This member is required. RecorderConfig *RecorderConfig // The deletion configuration is made up of the retention time ( // EdgeRetentionInHours ) and local size configuration ( LocalSizeConfig ) details // that are used to make the deletion. DeletionConfig *DeletionConfig // The uploader configuration contains the ScheduleExpression details that are // used to schedule upload jobs for the recorded media files from the Edge Agent to // a Kinesis Video Stream. UploaderConfig *UploaderConfig noSmithyDocumentSerde } // The structure that contains the information required for the KVS images // delivery. If null, the configuration will be deleted from the stream. type ImageGenerationConfiguration struct { // The structure that contains the information required to deliver images to a // customer. // // This member is required. DestinationConfig *ImageGenerationDestinationConfig // The accepted image format. // // This member is required. Format Format // The origin of the Server or Producer timestamps to use to generate the images. // // This member is required. ImageSelectorType ImageSelectorType // The time interval in milliseconds (ms) at which the images need to be generated // from the stream. The minimum value that can be provided is 33 ms, because a // camera that generates content at 30 FPS would create a frame every 33.3 ms. If // the timestamp range is less than the sampling interval, the Image from the // StartTimestamp will be returned if available. // // This member is required. SamplingInterval *int32 // Indicates whether the ContinuousImageGenerationConfigurations API is enabled or // disabled. // // This member is required. Status ConfigurationStatus // The list of a key-value pair structure that contains extra parameters that can // be applied when the image is generated. The FormatConfig key is the JPEGQuality // , which indicates the JPEG quality key to be used to generate the image. The // FormatConfig value accepts ints from 1 to 100. If the value is 1, the image will // be generated with less quality and the best compression. If the value is 100, // the image will be generated with the best quality and less compression. If no // value is provided, the default value of the JPEGQuality key will be set to 80. FormatConfig map[string]string // The height of the output image that is used in conjunction with the WidthPixels // parameter. When both HeightPixels and WidthPixels parameters are provided, the // image will be stretched to fit the specified aspect ratio. If only the // HeightPixels parameter is provided, its original aspect ratio will be used to // calculate the WidthPixels ratio. If neither parameter is provided, the original // image size will be returned. HeightPixels *int32 // The width of the output image that is used in conjunction with the HeightPixels // parameter. When both WidthPixels and HeightPixels parameters are provided, the // image will be stretched to fit the specified aspect ratio. If only the // WidthPixels parameter is provided, its original aspect ratio will be used to // calculate the HeightPixels ratio. If neither parameter is provided, the // original image size will be returned. WidthPixels *int32 noSmithyDocumentSerde } // The structure that contains the information required to deliver images to a // customer. type ImageGenerationDestinationConfig struct { // The Amazon Web Services Region of the S3 bucket where images will be delivered. // This DestinationRegion must match the Region where the stream is located. // // This member is required. DestinationRegion *string // The Uniform Resource Identifier (URI) that identifies where the images will be // delivered. // // This member is required. Uri *string noSmithyDocumentSerde } // The latest status of a stream's edge recording job. type LastRecorderStatus struct { // A description of a recorder job’s latest status. JobStatusDetails *string // The timestamp at which the recorder job was last executed and media stored to // local disk. LastCollectedTime *time.Time // The timestamp at which the recorder status was last updated. LastUpdatedTime *time.Time // The status of the latest recorder job. RecorderStatus RecorderStatus noSmithyDocumentSerde } // The latest status of a stream’s edge to cloud uploader job. type LastUploaderStatus struct { // A description of an uploader job’s latest status. JobStatusDetails *string // The timestamp at which the uploader job was last executed and media collected // to the cloud. LastCollectedTime *time.Time // The timestamp at which the uploader status was last updated. LastUpdatedTime *time.Time // The status of the latest uploader job. UploaderStatus UploaderStatus noSmithyDocumentSerde } // A description of a single stream's edge configuration. type ListEdgeAgentConfigurationsEdgeConfig struct { // The timestamp when the stream first created the edge config. CreationTime *time.Time // A description of the stream's edge configuration that will be used to sync with // the Edge Agent IoT Greengrass component. The Edge Agent component will run on an // IoT Hub Device setup at your premise. EdgeConfig *EdgeConfig // A description of the generated failure status. FailedStatusDetails *string // The timestamp when the stream last updated the edge config. LastUpdatedTime *time.Time // The Amazon Resource Name (ARN) of the stream. StreamARN *string // The name of the stream. StreamName *string // The current sync status of the stream's edge configuration. SyncStatus SyncStatus noSmithyDocumentSerde } // The configuration details that include the maximum size of the media ( // MaxLocalMediaSizeInMB ) that you want to store for a stream on the Edge Agent, // as well as the strategy that should be used ( StrategyOnFullSize ) when a // stream's maximum size has been reached. type LocalSizeConfig struct { // The overall maximum size of the media that you want to store for a stream on // the Edge Agent. MaxLocalMediaSizeInMB *int32 // The strategy to perform when a stream’s MaxLocalMediaSizeInMB limit is reached. StrategyOnFullSize StrategyOnFullSize noSmithyDocumentSerde } // A structure that encapsulates, or contains, the media storage configuration // properties. type MappedResourceConfigurationListItem struct { // The Amazon Resource Name (ARN) of the Kinesis Video Stream resource, associated // with the stream. ARN *string // The type of the associated resource for the kinesis video stream. Type *string noSmithyDocumentSerde } // The configuration details that consist of the credentials required ( // MediaUriSecretArn and MediaUriType ) to access the media files that are streamed // to the camera. type MediaSourceConfig struct { // The Amazon Web Services Secrets Manager ARN for the username and password of // the camera, or a local media file location. // // This member is required. MediaUriSecretArn *string // The Uniform Resource Identifier (URI) type. The FILE_URI value can be used to // stream local media files. Preview only supports the RTSP_URI media source URI // format . // // This member is required. MediaUriType MediaUriType noSmithyDocumentSerde } // A structure that encapsulates, or contains, the media storage configuration // properties. type MediaStorageConfiguration struct { // The status of the media storage configuration. // // This member is required. Status MediaStorageConfigurationStatus // The Amazon Resource Name (ARN) of the stream StreamARN *string noSmithyDocumentSerde } // The structure that contains the notification information for the KVS images // delivery. If this parameter is null, the configuration will be deleted from the // stream. type NotificationConfiguration struct { // The destination information required to deliver a notification to a customer. // // This member is required. DestinationConfig *NotificationDestinationConfig // Indicates if a notification configuration is enabled or disabled. // // This member is required. Status ConfigurationStatus noSmithyDocumentSerde } // The structure that contains the information required to deliver a notification // to a customer. type NotificationDestinationConfig struct { // The Uniform Resource Identifier (URI) that identifies where the images will be // delivered. // // This member is required. Uri *string noSmithyDocumentSerde } // The recorder configuration consists of the local MediaSourceConfig details that // are used as credentials to accesss the local media files streamed on the camera. type RecorderConfig struct { // The configuration details that consist of the credentials required ( // MediaUriSecretArn and MediaUriType ) to access the media files streamed to the // camera. // // This member is required. MediaSourceConfig *MediaSourceConfig // The configuration that consists of the ScheduleExpression and the // DurationInMinutes details that specify the scheduling to record from a camera, // or local media file, onto the Edge Agent. If the ScheduleExpression attribute // is not provided, then the Edge Agent will always be set to recording mode. ScheduleConfig *ScheduleConfig noSmithyDocumentSerde } // An object that describes the endpoint of the signaling channel returned by the // GetSignalingChannelEndpoint API. The media server endpoint will correspond to // the WEBRTC Protocol. type ResourceEndpointListItem struct { // The protocol of the signaling channel returned by the // GetSignalingChannelEndpoint API. Protocol ChannelProtocol // The endpoint of the signaling channel returned by the // GetSignalingChannelEndpoint API. ResourceEndpoint *string noSmithyDocumentSerde } // This API enables you to specify the duration that the camera, or local media // file, should record onto the Edge Agent. The ScheduleConfig consists of the // ScheduleExpression and the DurationInMinutes attributes. If the ScheduleConfig // is not provided in the RecorderConfig , then the Edge Agent will always be set // to recording mode. If the ScheduleConfig is not provided in the UploaderConfig , // then the Edge Agent will upload at regular intervals (every 1 hour). type ScheduleConfig struct { // The total duration to record the media. If the ScheduleExpression attribute is // provided, then the DurationInSeconds attribute should also be specified. // // This member is required. DurationInSeconds *int32 // The Quartz cron expression that takes care of scheduling jobs to record from // the camera, or local media file, onto the Edge Agent. If the ScheduleExpression // is not provided for the RecorderConfig , then the Edge Agent will always be set // to recording mode. For more information about Quartz, refer to the Cron Trigger // Tutorial (http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html) // page to understand the valid expressions and its use. // // This member is required. ScheduleExpression *string noSmithyDocumentSerde } // An object that contains the endpoint configuration for the SINGLE_MASTER // channel type. type SingleMasterChannelEndpointConfiguration struct { // This property is used to determine the nature of communication over this // SINGLE_MASTER signaling channel. If WSS is specified, this API returns a // websocket endpoint. If HTTPS is specified, this API returns an HTTPS endpoint. Protocols []ChannelProtocol // This property is used to determine messaging permissions in this SINGLE_MASTER // signaling channel. If MASTER is specified, this API returns an endpoint that a // client can use to receive offers from and send answers to any of the viewers on // this signaling channel. If VIEWER is specified, this API returns an endpoint // that a client can use only to send offers to another MASTER client on this // signaling channel. Role ChannelRole noSmithyDocumentSerde } // A structure that contains the configuration for the SINGLE_MASTER channel type. type SingleMasterConfiguration struct { // The period of time a signaling channel retains undelivered messages before they // are discarded. MessageTtlSeconds *int32 noSmithyDocumentSerde } // An object describing a Kinesis video stream. type StreamInfo struct { // A time stamp that indicates when the stream was created. CreationTime *time.Time // How long the stream retains data, in hours. DataRetentionInHours *int32 // The name of the device that is associated with the stream. DeviceName *string // The ID of the Key Management Service (KMS) key that Kinesis Video Streams uses // to encrypt data on the stream. KmsKeyId *string // The MediaType of the stream. MediaType *string // The status of the stream. Status Status // The Amazon Resource Name (ARN) of the stream. StreamARN *string // The name of the stream. StreamName *string // The version of the stream. Version *string noSmithyDocumentSerde } // Specifies the condition that streams must satisfy to be returned when you list // streams (see the ListStreams API). A condition has a comparison operation and a // value. Currently, you can specify only the BEGINS_WITH operator, which finds // streams whose names start with a given prefix. type StreamNameCondition struct { // A comparison operator. Currently, you can specify only the BEGINS_WITH // operator, which finds streams whose names start with a given prefix. ComparisonOperator ComparisonOperator // A value to compare. ComparisonValue *string noSmithyDocumentSerde } // A key and value pair that is associated with the specified signaling channel. type Tag struct { // The key of the tag that is associated with the specified signaling channel. // // This member is required. Key *string // The value of the tag that is associated with the specified signaling channel. // // This member is required. Value *string noSmithyDocumentSerde } // The configuration that consists of the ScheduleExpression and the // DurationInMinutes details that specify the scheduling to record from a camera, // or local media file, onto the Edge Agent. If the ScheduleConfig is not provided // in the UploaderConfig , then the Edge Agent will upload at regular intervals // (every 1 hour). type UploaderConfig struct { // The configuration that consists of the ScheduleExpression and the // DurationInMinutes details that specify the scheduling to record from a camera, // or local media file, onto the Edge Agent. If the ScheduleConfig is not provided // in this UploaderConfig , then the Edge Agent will upload at regular intervals // (every 1 hour). // // This member is required. ScheduleConfig *ScheduleConfig noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
545
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "Kinesis Video Archived Media" const ServiceAPIVersion = "2017-09-30" // Client provides the API client to make operations call for Amazon Kinesis Video // Streams Archived Media. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "kinesisvideoarchivedmedia", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
435
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io" ) // Downloads an MP4 file (clip) containing the archived, on-demand media from the // specified video stream over the specified time range. Both the StreamName and // the StreamARN parameters are optional, but you must specify either the // StreamName or the StreamARN when invoking this API operation. As a prerequisite // to using GetCLip API, you must obtain an endpoint using GetDataEndpoint , // specifying GET_CLIP for the APIName parameter. An Amazon Kinesis video stream // has the following requirements for providing data through MP4: // - The media must contain h.264 or h.265 encoded video and, optionally, AAC or // G.711 encoded audio. Specifically, the codec ID of track 1 should be // V_MPEG/ISO/AVC (for h.264) or V_MPEGH/ISO/HEVC (for H.265). Optionally, the // codec ID of track 2 should be A_AAC (for AAC) or A_MS/ACM (for G.711). // - Data retention must be greater than 0. // - The video track of each fragment must contain codec private data in the // Advanced Video Coding (AVC) for H.264 format and HEVC for H.265 format. For more // information, see MPEG-4 specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html) // . For information about adapting stream data to a given format, see NAL // Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html) // . // - The audio track (if present) of each fragment must contain codec private // data in the AAC format ( AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html) // ) or the MS Wave format (http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html) // . // // You can monitor the amount of outgoing data by monitoring the // GetClip.OutgoingBytes Amazon CloudWatch metric. For information about using // CloudWatch to monitor Kinesis Video Streams, see Monitoring Kinesis Video // Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html) // . For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) // and AWS Pricing (https://aws.amazon.com/pricing/) . Charges for outgoing AWS // data apply. func (c *Client) GetClip(ctx context.Context, params *GetClipInput, optFns ...func(*Options)) (*GetClipOutput, error) { if params == nil { params = &GetClipInput{} } result, metadata, err := c.invokeOperation(ctx, "GetClip", params, optFns, c.addOperationGetClipMiddlewares) if err != nil { return nil, err } out := result.(*GetClipOutput) out.ResultMetadata = metadata return out, nil } type GetClipInput struct { // The time range of the requested clip and the source of the timestamps. // // This member is required. ClipFragmentSelector *types.ClipFragmentSelector // The Amazon Resource Name (ARN) of the stream for which to retrieve the media // clip. You must specify either the StreamName or the StreamARN. StreamARN *string // The name of the stream for which to retrieve the media clip. You must specify // either the StreamName or the StreamARN. StreamName *string noSmithyDocumentSerde } type GetClipOutput struct { // The content type of the media in the requested clip. ContentType *string // Traditional MP4 file that contains the media clip from the specified video // stream. The output will contain the first 100 MB or the first 200 fragments from // the specified start timestamp. For more information, see Kinesis Video Streams // Limits (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html) . Payload io.ReadCloser // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetClipMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetClip{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetClip{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetClipValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetClip(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetClip(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "GetClip", } }
166
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Retrieves an HTTP Live Streaming (HLS) URL for the stream. You can then open // the URL in a browser or media player to view the stream contents. Both the // StreamName and the StreamARN parameters are optional, but you must specify // either the StreamName or the StreamARN when invoking this API operation. An // Amazon Kinesis video stream has the following requirements for providing data // through HLS: // - The media must contain h.264 or h.265 encoded video and, optionally, AAC // encoded audio. Specifically, the codec ID of track 1 should be V_MPEG/ISO/AVC // (for h.264) or V_MPEG/ISO/HEVC (for h.265). Optionally, the codec ID of track // 2 should be A_AAC . // - Data retention must be greater than 0. // - The video track of each fragment must contain codec private data in the // Advanced Video Coding (AVC) for H.264 format or HEVC for H.265 format ( MPEG-4 // specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html) ). // For information about adapting stream data to a given format, see NAL // Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html) // . // - The audio track (if present) of each fragment must contain codec private // data in the AAC format ( AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html) // ). // // Kinesis Video Streams HLS sessions contain fragments in the fragmented MPEG-4 // form (also called fMP4 or CMAF) or the MPEG-2 form (also called TS chunks, which // the HLS specification also supports). For more information about HLS fragment // types, see the HLS specification (https://tools.ietf.org/html/draft-pantos-http-live-streaming-23) // . The following procedure shows how to use HLS with Kinesis Video Streams: // - Get an endpoint using GetDataEndpoint (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_GetDataEndpoint.html) // , specifying GET_HLS_STREAMING_SESSION_URL for the APIName parameter. // - Retrieve the HLS URL using GetHLSStreamingSessionURL . Kinesis Video Streams // creates an HLS streaming session to be used for accessing content in a stream // using the HLS protocol. GetHLSStreamingSessionURL returns an authenticated URL // (that includes an encrypted session token) for the session's HLS master playlist // (the root resource needed for streaming with HLS). Don't share or store this // token where an unauthorized entity could access it. The token provides access to // the content of the stream. Safeguard the token with the same measures that you // would use with your AWS credentials. The media that is made available through // the playlist consists only of the requested stream, time range, and format. No // other media data (such as frames outside the requested window or alternate // bitrates) is made available. // - Provide the URL (containing the encrypted session token) for the HLS master // playlist to a media player that supports the HLS protocol. Kinesis Video Streams // makes the HLS media playlist, initialization fragment, and media fragments // available through the master playlist URL. The initialization fragment contains // the codec private data for the stream, and other data needed to set up the video // or audio decoder and renderer. The media fragments contain H.264-encoded video // frames or AAC-encoded audio samples. // - The media player receives the authenticated URL and requests stream // metadata and media data normally. When the media player requests data, it calls // the following actions: // - GetHLSMasterPlaylist: Retrieves an HLS master playlist, which contains a // URL for the GetHLSMediaPlaylist action for each track, and additional metadata // for the media player, including estimated bitrate and resolution. // - GetHLSMediaPlaylist: Retrieves an HLS media playlist, which contains a URL // to access the MP4 initialization fragment with the GetMP4InitFragment action, // and URLs to access the MP4 media fragments with the GetMP4MediaFragment // actions. The HLS media playlist also contains metadata about the stream that the // player needs to play it, such as whether the PlaybackMode is LIVE or ON_DEMAND // . The HLS media playlist is typically static for sessions with a PlaybackType // of ON_DEMAND . The HLS media playlist is continually updated with new // fragments for sessions with a PlaybackType of LIVE . There is a distinct HLS // media playlist for the video track and the audio track (if applicable) that // contains MP4 media URLs for the specific track. // - GetMP4InitFragment: Retrieves the MP4 initialization fragment. The media // player typically loads the initialization fragment before loading any media // fragments. This fragment contains the " fytp " and " moov " MP4 atoms, and the // child atoms that are needed to initialize the media player decoder. The // initialization fragment does not correspond to a fragment in a Kinesis video // stream. It contains only the codec private data for the stream and respective // track, which the media player needs to decode the media frames. // - GetMP4MediaFragment: Retrieves MP4 media fragments. These fragments contain // the " moof " and " mdat " MP4 atoms and their child atoms, containing the // encoded fragment's media frames and their timestamps. After the first media // fragment is made available in a streaming session, any fragments that don't // contain the same codec private data cause an error to be returned when those // different media fragments are loaded. Therefore, the codec private data should // not change between fragments in a session. This also means that the session // fails if the fragments in a stream change from having only video to having both // audio and video. Data retrieved with this action is billable. See Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) // for details. // - GetTSFragment: Retrieves MPEG TS fragments containing both initialization // and media data for all tracks in the stream. If the ContainerFormat is MPEG_TS // , this API is used instead of GetMP4InitFragment and GetMP4MediaFragment to // retrieve stream media. Data retrieved with this action is billable. For more // information, see Kinesis Video Streams pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) // . // // A streaming session URL must not be shared between players. The service might // throttle a session if multiple media players are sharing it. For connection // limits, see Kinesis Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html) // . You can monitor the amount of data that the media player consumes by // monitoring the GetMP4MediaFragment.OutgoingBytes Amazon CloudWatch metric. For // information about using CloudWatch to monitor Kinesis Video Streams, see // Monitoring Kinesis Video Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html) // . For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) // and AWS Pricing (https://aws.amazon.com/pricing/) . Charges for both HLS // sessions and outgoing AWS data apply. For more information about HLS, see HTTP // Live Streaming (https://developer.apple.com/streaming/) on the Apple Developer // site (https://developer.apple.com) . If an error is thrown after invoking a // Kinesis Video Streams archived media API, in addition to the HTTP status code // and the response body, it includes the following pieces of information: // - x-amz-ErrorType HTTP header – contains a more specific error type in // addition to what the HTTP status code provides. // - x-amz-RequestId HTTP header – if you want to report an issue to AWS, the // support team can better diagnose the problem if given the Request Id. // // Both the HTTP status code and the ErrorType header can be utilized to make // programmatic decisions about whether errors are retry-able and under what // conditions, as well as provide information on what actions the client programmer // might need to take in order to successfully try again. For more information, see // the Errors section at the bottom of this topic, as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html) // . func (c *Client) GetHLSStreamingSessionURL(ctx context.Context, params *GetHLSStreamingSessionURLInput, optFns ...func(*Options)) (*GetHLSStreamingSessionURLOutput, error) { if params == nil { params = &GetHLSStreamingSessionURLInput{} } result, metadata, err := c.invokeOperation(ctx, "GetHLSStreamingSessionURL", params, optFns, c.addOperationGetHLSStreamingSessionURLMiddlewares) if err != nil { return nil, err } out := result.(*GetHLSStreamingSessionURLOutput) out.ResultMetadata = metadata return out, nil } type GetHLSStreamingSessionURLInput struct { // Specifies which format should be used for packaging the media. Specifying the // FRAGMENTED_MP4 container format packages the media into MP4 fragments (fMP4 or // CMAF). This is the recommended packaging because there is minimal packaging // overhead. The other container format option is MPEG_TS . HLS has supported MPEG // TS chunks since it was released and is sometimes the only supported packaging on // older HLS players. MPEG TS typically has a 5-25 percent packaging overhead. This // means MPEG TS typically requires 5-25 percent more bandwidth and cost than fMP4. // The default is FRAGMENTED_MP4 . ContainerFormat types.ContainerFormat // Specifies when flags marking discontinuities between fragments are added to the // media playlists. Media players typically build a timeline of media content to // play, based on the timestamps of each fragment. This means that if there is any // overlap or gap between fragments (as is typical if HLSFragmentSelector is set // to SERVER_TIMESTAMP ), the media player timeline will also have small gaps // between fragments in some places, and will overwrite frames in other places. // Gaps in the media player timeline can cause playback to stall and overlaps can // cause playback to be jittery. When there are discontinuity flags between // fragments, the media player is expected to reset the timeline, resulting in the // next fragment being played immediately after the previous fragment. The // following modes are supported: // - ALWAYS : a discontinuity marker is placed between every fragment in the HLS // media playlist. It is recommended to use a value of ALWAYS if the fragment // timestamps are not accurate. // - NEVER : no discontinuity markers are placed anywhere. It is recommended to // use a value of NEVER to ensure the media player timeline most accurately maps // to the producer timestamps. // - ON_DISCONTINUITY : a discontinuity marker is placed between fragments that // have a gap or overlap of more than 50 milliseconds. For most playback scenarios, // it is recommended to use a value of ON_DISCONTINUITY so that the media player // timeline is only reset when there is a significant issue with the media timeline // (e.g. a missing fragment). // The default is ALWAYS when HLSFragmentSelector is set to SERVER_TIMESTAMP , and // NEVER when it is set to PRODUCER_TIMESTAMP . DiscontinuityMode types.HLSDiscontinuityMode // Specifies when the fragment start timestamps should be included in the HLS // media playlist. Typically, media players report the playhead position as a time // relative to the start of the first fragment in the playback session. However, // when the start timestamps are included in the HLS media playlist, some media // players might report the current playhead as an absolute time based on the // fragment timestamps. This can be useful for creating a playback experience that // shows viewers the wall-clock time of the media. The default is NEVER . When // HLSFragmentSelector is SERVER_TIMESTAMP , the timestamps will be the server // start timestamps. Similarly, when HLSFragmentSelector is PRODUCER_TIMESTAMP , // the timestamps will be the producer start timestamps. DisplayFragmentTimestamp types.HLSDisplayFragmentTimestamp // The time in seconds until the requested session expires. This value can be // between 300 (5 minutes) and 43200 (12 hours). When a session expires, no new // calls to GetHLSMasterPlaylist , GetHLSMediaPlaylist , GetMP4InitFragment , // GetMP4MediaFragment , or GetTSFragment can be made for that session. The // default is 300 (5 minutes). Expires *int32 // The time range of the requested fragment and the source of the timestamps. This // parameter is required if PlaybackMode is ON_DEMAND or LIVE_REPLAY . This // parameter is optional if PlaybackMode is LIVE . If PlaybackMode is LIVE , the // FragmentSelectorType can be set, but the TimestampRange should not be set. If // PlaybackMode is ON_DEMAND or LIVE_REPLAY , both FragmentSelectorType and // TimestampRange must be set. HLSFragmentSelector *types.HLSFragmentSelector // The maximum number of fragments that are returned in the HLS media playlists. // When the PlaybackMode is LIVE , the most recent fragments are returned up to // this value. When the PlaybackMode is ON_DEMAND , the oldest fragments are // returned, up to this maximum number. When there are a higher number of fragments // available in a live HLS media playlist, video players often buffer content // before starting playback. Increasing the buffer size increases the playback // latency, but it decreases the likelihood that rebuffering will occur during // playback. We recommend that a live HLS media playlist have a minimum of 3 // fragments and a maximum of 10 fragments. The default is 5 fragments if // PlaybackMode is LIVE or LIVE_REPLAY , and 1,000 if PlaybackMode is ON_DEMAND . // The maximum value of 5,000 fragments corresponds to more than 80 minutes of // video on streams with 1-second fragments, and more than 13 hours of video on // streams with 10-second fragments. MaxMediaPlaylistFragmentResults *int64 // Whether to retrieve live, live replay, or archived, on-demand data. Features of // the three types of sessions include the following: // - LIVE : For sessions of this type, the HLS media playlist is continually // updated with the latest fragments as they become available. We recommend that // the media player retrieve a new playlist on a one-second interval. When this // type of session is played in a media player, the user interface typically // displays a "live" notification, with no scrubber control for choosing the // position in the playback window to display. In LIVE mode, the newest available // fragments are included in an HLS media playlist, even if there is a gap between // fragments (that is, if a fragment is missing). A gap like this might cause a // media player to halt or cause a jump in playback. In this mode, fragments are // not added to the HLS media playlist if they are older than the newest fragment // in the playlist. If the missing fragment becomes available after a subsequent // fragment is added to the playlist, the older fragment is not added, and the gap // is not filled. // - LIVE_REPLAY : For sessions of this type, the HLS media playlist is updated // similarly to how it is updated for LIVE mode except that it starts by // including fragments from a given start time. Instead of fragments being added as // they are ingested, fragments are added as the duration of the next fragment // elapses. For example, if the fragments in the session are two seconds long, then // a new fragment is added to the media playlist every two seconds. This mode is // useful to be able to start playback from when an event is detected and continue // live streaming media that has not yet been ingested as of the time of the // session creation. This mode is also useful to stream previously archived media // without being limited by the 1,000 fragment limit in the ON_DEMAND mode. // - ON_DEMAND : For sessions of this type, the HLS media playlist contains all // the fragments for the session, up to the number that is specified in // MaxMediaPlaylistFragmentResults . The playlist must be retrieved only once for // each session. When this type of session is played in a media player, the user // interface typically displays a scrubber control for choosing the position in the // playback window to display. // In all playback modes, if FragmentSelectorType is PRODUCER_TIMESTAMP , and if // there are multiple fragments with the same start timestamp, the fragment that // has the largest fragment number (that is, the newest fragment) is included in // the HLS media playlist. The other fragments are not included. Fragments that // have different timestamps but have overlapping durations are still included in // the HLS media playlist. This can lead to unexpected behavior in the media // player. The default is LIVE . PlaybackMode types.HLSPlaybackMode // The Amazon Resource Name (ARN) of the stream for which to retrieve the HLS // master playlist URL. You must specify either the StreamName or the StreamARN . StreamARN *string // The name of the stream for which to retrieve the HLS master playlist URL. You // must specify either the StreamName or the StreamARN . StreamName *string noSmithyDocumentSerde } type GetHLSStreamingSessionURLOutput struct { // The URL (containing the session token) that a media player can use to retrieve // the HLS master playlist. HLSStreamingSessionURL *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetHLSStreamingSessionURLMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetHLSStreamingSessionURL{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetHLSStreamingSessionURL{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHLSStreamingSessionURL(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetHLSStreamingSessionURL(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "GetHLSStreamingSessionURL", } }
354
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" ) // Retrieves a list of Images corresponding to each timestamp for a given time // range, sampling interval, and image format configuration. func (c *Client) GetImages(ctx context.Context, params *GetImagesInput, optFns ...func(*Options)) (*GetImagesOutput, error) { if params == nil { params = &GetImagesInput{} } result, metadata, err := c.invokeOperation(ctx, "GetImages", params, optFns, c.addOperationGetImagesMiddlewares) if err != nil { return nil, err } out := result.(*GetImagesOutput) out.ResultMetadata = metadata return out, nil } type GetImagesInput struct { // The end timestamp for the range of images to be generated. // // This member is required. EndTimestamp *time.Time // The format that will be used to encode the image. // // This member is required. Format types.Format // The origin of the Server or Producer timestamps to use to generate the images. // // This member is required. ImageSelectorType types.ImageSelectorType // The time interval in milliseconds (ms) at which the images need to be generated // from the stream. The minimum value that can be provided is 3000 ms. If the // timestamp range is less than the sampling interval, the Image from the // startTimestamp will be returned if available. The minimum value of 3000 ms is a // soft limit. If needed, a lower sampling frequency can be requested. // // This member is required. SamplingInterval *int32 // The starting point from which the images should be generated. This // StartTimestamp must be within an inclusive range of timestamps for an image to // be returned. // // This member is required. StartTimestamp *time.Time // The list of a key-value pair structure that contains extra parameters that can // be applied when the image is generated. The FormatConfig key is the JPEGQuality // , which indicates the JPEG quality key to be used to generate the image. The // FormatConfig value accepts ints from 1 to 100. If the value is 1, the image will // be generated with less quality and the best compression. If the value is 100, // the image will be generated with the best quality and less compression. If no // value is provided, the default value of the JPEGQuality key will be set to 80. FormatConfig map[string]string // The height of the output image that is used in conjunction with the WidthPixels // parameter. When both HeightPixels and WidthPixels parameters are provided, the // image will be stretched to fit the specified aspect ratio. If only the // HeightPixels parameter is provided, its original aspect ratio will be used to // calculate the WidthPixels ratio. If neither parameter is provided, the original // image size will be returned. HeightPixels *int32 // The maximum number of images to be returned by the API. The default limit is // 100 images per API response. The additional results will be paginated. MaxResults *int64 // A token that specifies where to start paginating the next set of Images. This // is the GetImages:NextToken from a previously truncated response. NextToken *string // The Amazon Resource Name (ARN) of the stream from which to retrieve the images. // You must specify either the StreamName or the StreamARN . StreamARN *string // The name of the stream from which to retrieve the images. You must specify // either the StreamName or the StreamARN . StreamName *string // The width of the output image that is used in conjunction with the HeightPixels // parameter. When both WidthPixels and HeightPixels parameters are provided, the // image will be stretched to fit the specified aspect ratio. If only the // WidthPixels parameter is provided or if only the HeightPixels is provided, a // ValidationException will be thrown. If neither parameter is provided, the // original image size from the stream will be returned. WidthPixels *int32 noSmithyDocumentSerde } type GetImagesOutput struct { // The list of images generated from the video stream. If there is no media // available for the given timestamp, the NO_MEDIA error will be listed in the // output. If an error occurs while the image is being generated, the MEDIA_ERROR // will be listed in the output as the cause of the missing image. Images []types.Image // The encrypted token that was used in the request to get more images. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetImagesMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetImages{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetImages{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetImagesValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetImages(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetImages(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "GetImages", } }
200
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io" ) // Gets media for a list of fragments (specified by fragment number) from the // archived data in an Amazon Kinesis video stream. You must first call the // GetDataEndpoint API to get an endpoint. Then send the GetMediaForFragmentList // requests to this endpoint using the --endpoint-url parameter (https://docs.aws.amazon.com/cli/latest/reference/) // . For limits, see Kinesis Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html) // . If an error is thrown after invoking a Kinesis Video Streams archived media // API, in addition to the HTTP status code and the response body, it includes the // following pieces of information: // - x-amz-ErrorType HTTP header – contains a more specific error type in // addition to what the HTTP status code provides. // - x-amz-RequestId HTTP header – if you want to report an issue to AWS, the // support team can better diagnose the problem if given the Request Id. // // Both the HTTP status code and the ErrorType header can be utilized to make // programmatic decisions about whether errors are retry-able and under what // conditions, as well as provide information on what actions the client programmer // might need to take in order to successfully try again. For more information, see // the Errors section at the bottom of this topic, as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html) // . func (c *Client) GetMediaForFragmentList(ctx context.Context, params *GetMediaForFragmentListInput, optFns ...func(*Options)) (*GetMediaForFragmentListOutput, error) { if params == nil { params = &GetMediaForFragmentListInput{} } result, metadata, err := c.invokeOperation(ctx, "GetMediaForFragmentList", params, optFns, c.addOperationGetMediaForFragmentListMiddlewares) if err != nil { return nil, err } out := result.(*GetMediaForFragmentListOutput) out.ResultMetadata = metadata return out, nil } type GetMediaForFragmentListInput struct { // A list of the numbers of fragments for which to retrieve media. You retrieve // these values with ListFragments . // // This member is required. Fragments []string // The Amazon Resource Name (ARN) of the stream from which to retrieve fragment // media. Specify either this parameter or the StreamName parameter. StreamARN *string // The name of the stream from which to retrieve fragment media. Specify either // this parameter or the StreamARN parameter. StreamName *string noSmithyDocumentSerde } type GetMediaForFragmentListOutput struct { // The content type of the requested media. ContentType *string // The payload that Kinesis Video Streams returns is a sequence of chunks from the // specified stream. For information about the chunks, see PutMedia (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html) // . The chunks that Kinesis Video Streams returns in the GetMediaForFragmentList // call also include the following additional Matroska (MKV) tags: // - AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk. // - AWS_KINESISVIDEO_SERVER_SIDE_TIMESTAMP - Server-side timestamp of the // fragment. // - AWS_KINESISVIDEO_PRODUCER_SIDE_TIMESTAMP - Producer-side timestamp of the // fragment. // The following tags will be included if an exception occurs: // - AWS_KINESISVIDEO_FRAGMENT_NUMBER - The number of the fragment that threw // the exception // - AWS_KINESISVIDEO_EXCEPTION_ERROR_CODE - The integer code of the exception // - AWS_KINESISVIDEO_EXCEPTION_MESSAGE - A text description of the exception Payload io.ReadCloser // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetMediaForFragmentListMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMediaForFragmentList{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMediaForFragmentList{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetMediaForFragmentListValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMediaForFragmentList(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetMediaForFragmentList(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "GetMediaForFragmentList", } }
165
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) // Returns a list of Fragment objects from the specified stream and timestamp // range within the archived data. Listing fragments is eventually consistent. This // means that even if the producer receives an acknowledgment that a fragment is // persisted, the result might not be returned immediately from a request to // ListFragments . However, results are typically available in less than one // second. You must first call the GetDataEndpoint API to get an endpoint. Then // send the ListFragments requests to this endpoint using the --endpoint-url // parameter (https://docs.aws.amazon.com/cli/latest/reference/) . If an error is // thrown after invoking a Kinesis Video Streams archived media API, in addition to // the HTTP status code and the response body, it includes the following pieces of // information: // - x-amz-ErrorType HTTP header – contains a more specific error type in // addition to what the HTTP status code provides. // - x-amz-RequestId HTTP header – if you want to report an issue to AWS, the // support team can better diagnose the problem if given the Request Id. // // Both the HTTP status code and the ErrorType header can be utilized to make // programmatic decisions about whether errors are retry-able and under what // conditions, as well as provide information on what actions the client programmer // might need to take in order to successfully try again. For more information, see // the Errors section at the bottom of this topic, as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html) // . func (c *Client) ListFragments(ctx context.Context, params *ListFragmentsInput, optFns ...func(*Options)) (*ListFragmentsOutput, error) { if params == nil { params = &ListFragmentsInput{} } result, metadata, err := c.invokeOperation(ctx, "ListFragments", params, optFns, c.addOperationListFragmentsMiddlewares) if err != nil { return nil, err } out := result.(*ListFragmentsOutput) out.ResultMetadata = metadata return out, nil } type ListFragmentsInput struct { // Describes the timestamp range and timestamp origin for the range of fragments // to return. FragmentSelector *types.FragmentSelector // The total number of fragments to return. If the total number of fragments // available is more than the value specified in max-results , then a // ListFragmentsOutput$NextToken is provided in the output that you can use to // resume pagination. MaxResults *int64 // A token to specify where to start paginating. This is the // ListFragmentsOutput$NextToken from a previously truncated response. NextToken *string // The Amazon Resource Name (ARN) of the stream from which to retrieve a fragment // list. Specify either this parameter or the StreamName parameter. StreamARN *string // The name of the stream from which to retrieve a fragment list. Specify either // this parameter or the StreamARN parameter. StreamName *string noSmithyDocumentSerde } type ListFragmentsOutput struct { // A list of archived Fragment objects from the stream that meet the selector // criteria. Results are in no specific order, even across pages. Fragments []types.Fragment // If the returned list is truncated, the operation returns this token to use to // retrieve the next page of results. This value is null when there are no more // results to return. NextToken *string // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationListFragmentsMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpListFragments{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListFragments{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpListFragmentsValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListFragments(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opListFragments(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "ListFragments", } }
169
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsRestjson1_deserializeOpGetClip struct { } func (*awsRestjson1_deserializeOpGetClip) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetClip) 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_deserializeOpErrorGetClip(response, &metadata) } output := &GetClipOutput{} out.Result = output err = awsRestjson1_deserializeOpHttpBindingsGetClipOutput(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_deserializeOpDocumentGetClipOutput(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_deserializeOpErrorGetClip(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidCodecPrivateDataException", errorCode): return awsRestjson1_deserializeErrorInvalidCodecPrivateDataException(response, errorBody) case strings.EqualFold("InvalidMediaFrameException", errorCode): return awsRestjson1_deserializeErrorInvalidMediaFrameException(response, errorBody) case strings.EqualFold("MissingCodecPrivateDataException", errorCode): return awsRestjson1_deserializeErrorMissingCodecPrivateDataException(response, errorBody) case strings.EqualFold("NoDataRetentionException", errorCode): return awsRestjson1_deserializeErrorNoDataRetentionException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedStreamMediaTypeException", errorCode): return awsRestjson1_deserializeErrorUnsupportedStreamMediaTypeException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpHttpBindingsGetClipOutput(v *GetClipOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.ContentType = ptr.String(headerValues[0]) } return nil } func awsRestjson1_deserializeOpDocumentGetClipOutput(v *GetClipOutput, body io.ReadCloser) error { if v == nil { return fmt.Errorf("unsupported deserialization of nil %T", v) } v.Payload = body return nil } type awsRestjson1_deserializeOpGetDASHStreamingSessionURL struct { } func (*awsRestjson1_deserializeOpGetDASHStreamingSessionURL) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetDASHStreamingSessionURL) 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_deserializeOpErrorGetDASHStreamingSessionURL(response, &metadata) } output := &GetDASHStreamingSessionURLOutput{} 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_deserializeOpDocumentGetDASHStreamingSessionURLOutput(&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_deserializeOpErrorGetDASHStreamingSessionURL(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidCodecPrivateDataException", errorCode): return awsRestjson1_deserializeErrorInvalidCodecPrivateDataException(response, errorBody) case strings.EqualFold("MissingCodecPrivateDataException", errorCode): return awsRestjson1_deserializeErrorMissingCodecPrivateDataException(response, errorBody) case strings.EqualFold("NoDataRetentionException", errorCode): return awsRestjson1_deserializeErrorNoDataRetentionException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedStreamMediaTypeException", errorCode): return awsRestjson1_deserializeErrorUnsupportedStreamMediaTypeException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetDASHStreamingSessionURLOutput(v **GetDASHStreamingSessionURLOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *GetDASHStreamingSessionURLOutput if *v == nil { sv = &GetDASHStreamingSessionURLOutput{} } else { sv = *v } for key, value := range shape { switch key { case "DASHStreamingSessionURL": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected DASHStreamingSessionURL to be of type string, got %T instead", value) } sv.DASHStreamingSessionURL = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetHLSStreamingSessionURL struct { } func (*awsRestjson1_deserializeOpGetHLSStreamingSessionURL) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetHLSStreamingSessionURL) 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_deserializeOpErrorGetHLSStreamingSessionURL(response, &metadata) } output := &GetHLSStreamingSessionURLOutput{} 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_deserializeOpDocumentGetHLSStreamingSessionURLOutput(&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_deserializeOpErrorGetHLSStreamingSessionURL(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidCodecPrivateDataException", errorCode): return awsRestjson1_deserializeErrorInvalidCodecPrivateDataException(response, errorBody) case strings.EqualFold("MissingCodecPrivateDataException", errorCode): return awsRestjson1_deserializeErrorMissingCodecPrivateDataException(response, errorBody) case strings.EqualFold("NoDataRetentionException", errorCode): return awsRestjson1_deserializeErrorNoDataRetentionException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UnsupportedStreamMediaTypeException", errorCode): return awsRestjson1_deserializeErrorUnsupportedStreamMediaTypeException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetHLSStreamingSessionURLOutput(v **GetHLSStreamingSessionURLOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *GetHLSStreamingSessionURLOutput if *v == nil { sv = &GetHLSStreamingSessionURLOutput{} } else { sv = *v } for key, value := range shape { switch key { case "HLSStreamingSessionURL": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected HLSStreamingSessionURL to be of type string, got %T instead", value) } sv.HLSStreamingSessionURL = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetImages struct { } func (*awsRestjson1_deserializeOpGetImages) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetImages) 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_deserializeOpErrorGetImages(response, &metadata) } output := &GetImagesOutput{} 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_deserializeOpDocumentGetImagesOutput(&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_deserializeOpErrorGetImages(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentGetImagesOutput(v **GetImagesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *GetImagesOutput if *v == nil { sv = &GetImagesOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Images": if err := awsRestjson1_deserializeDocumentImages(&sv.Images, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } type awsRestjson1_deserializeOpGetMediaForFragmentList struct { } func (*awsRestjson1_deserializeOpGetMediaForFragmentList) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetMediaForFragmentList) 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_deserializeOpErrorGetMediaForFragmentList(response, &metadata) } output := &GetMediaForFragmentListOutput{} out.Result = output err = awsRestjson1_deserializeOpHttpBindingsGetMediaForFragmentListOutput(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_deserializeOpDocumentGetMediaForFragmentListOutput(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_deserializeOpErrorGetMediaForFragmentList(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpHttpBindingsGetMediaForFragmentListOutput(v *GetMediaForFragmentListOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.ContentType = ptr.String(headerValues[0]) } return nil } func awsRestjson1_deserializeOpDocumentGetMediaForFragmentListOutput(v *GetMediaForFragmentListOutput, body io.ReadCloser) error { if v == nil { return fmt.Errorf("unsupported deserialization of nil %T", v) } v.Payload = body return nil } type awsRestjson1_deserializeOpListFragments struct { } func (*awsRestjson1_deserializeOpListFragments) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpListFragments) 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_deserializeOpErrorListFragments(response, &metadata) } output := &ListFragmentsOutput{} 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_deserializeOpDocumentListFragmentsOutput(&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_deserializeOpErrorListFragments(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpDocumentListFragmentsOutput(v **ListFragmentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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 *ListFragmentsOutput if *v == nil { sv = &ListFragmentsOutput{} } else { sv = *v } for key, value := range shape { switch key { case "Fragments": if err := awsRestjson1_deserializeDocumentFragmentList(&sv.Fragments, value); err != nil { return err } case "NextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeErrorClientLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ClientLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentClientLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidArgumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidArgumentException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidArgumentException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidCodecPrivateDataException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidCodecPrivateDataException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidCodecPrivateDataException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidMediaFrameException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidMediaFrameException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidMediaFrameException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorMissingCodecPrivateDataException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.MissingCodecPrivateDataException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentMissingCodecPrivateDataException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorNoDataRetentionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NoDataRetentionException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentNoDataRetentionException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NotAuthorizedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentNotAuthorizedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorUnsupportedStreamMediaTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.UnsupportedStreamMediaTypeException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentUnsupportedStreamMediaTypeException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeDocumentClientLimitExceededException(v **types.ClientLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ClientLimitExceededException if *v == nil { sv = &types.ClientLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentFragment(v **types.Fragment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.Fragment if *v == nil { sv = &types.Fragment{} } else { sv = *v } for key, value := range shape { switch key { case "FragmentLengthInMilliseconds": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Long to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.FragmentLengthInMilliseconds = i64 } case "FragmentNumber": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected FragmentNumberString to be of type string, got %T instead", value) } sv.FragmentNumber = ptr.String(jtv) } case "FragmentSizeInBytes": if value != nil { jtv, ok := value.(json.Number) if !ok { return fmt.Errorf("expected Long to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } sv.FragmentSizeInBytes = i64 } case "ProducerTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ProducerTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } case "ServerTimestamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.ServerTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentFragmentList(v *[]types.Fragment, 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.Fragment if *v == nil { cv = []types.Fragment{} } else { cv = *v } for _, value := range shape { var col types.Fragment destAddr := &col if err := awsRestjson1_deserializeDocumentFragment(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentImage(v **types.Image, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.Image if *v == nil { sv = &types.Image{} } else { sv = *v } for key, value := range shape { switch key { case "Error": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImageError to be of type string, got %T instead", value) } sv.Error = types.ImageError(jtv) } case "ImageContent": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ImageContent to be of type string, got %T instead", value) } sv.ImageContent = ptr.String(jtv) } case "TimeStamp": if value != nil { switch jtv := value.(type) { case json.Number: f64, err := jtv.Float64() if err != nil { return err } sv.TimeStamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) } } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentImages(v *[]types.Image, 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.Image if *v == nil { cv = []types.Image{} } else { cv = *v } for _, value := range shape { var col types.Image destAddr := &col if err := awsRestjson1_deserializeDocumentImage(&destAddr, value); err != nil { return err } col = *destAddr cv = append(cv, col) } *v = cv return nil } func awsRestjson1_deserializeDocumentInvalidArgumentException(v **types.InvalidArgumentException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidArgumentException if *v == nil { sv = &types.InvalidArgumentException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInvalidCodecPrivateDataException(v **types.InvalidCodecPrivateDataException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidCodecPrivateDataException if *v == nil { sv = &types.InvalidCodecPrivateDataException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInvalidMediaFrameException(v **types.InvalidMediaFrameException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidMediaFrameException if *v == nil { sv = &types.InvalidMediaFrameException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentMissingCodecPrivateDataException(v **types.MissingCodecPrivateDataException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.MissingCodecPrivateDataException if *v == nil { sv = &types.MissingCodecPrivateDataException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNoDataRetentionException(v **types.NoDataRetentionException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.NoDataRetentionException if *v == nil { sv = &types.NoDataRetentionException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.NotAuthorizedException if *v == nil { sv = &types.NotAuthorizedException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentUnsupportedStreamMediaTypeException(v **types.UnsupportedStreamMediaTypeException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.UnsupportedStreamMediaTypeException if *v == nil { sv = &types.UnsupportedStreamMediaTypeException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
1,871
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package kinesisvideoarchivedmedia provides the API client, operations, and // parameter types for Amazon Kinesis Video Streams Archived Media. package kinesisvideoarchivedmedia
6
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "kinesisvideo" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package kinesisvideoarchivedmedia // goModuleVersion is the tagged release for this module const goModuleVersion = "1.14.13"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" ) type awsRestjson1_serializeOpGetClip struct { } func (*awsRestjson1_serializeOpGetClip) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetClip) 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.(*GetClipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getClip") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetClipInput(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_serializeOpHttpBindingsGetClipInput(v *GetClipInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetClipInput(v *GetClipInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ClipFragmentSelector != nil { ok := object.Key("ClipFragmentSelector") if err := awsRestjson1_serializeDocumentClipFragmentSelector(v.ClipFragmentSelector, ok); err != nil { return err } } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpGetDASHStreamingSessionURL struct { } func (*awsRestjson1_serializeOpGetDASHStreamingSessionURL) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDASHStreamingSessionURL) 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.(*GetDASHStreamingSessionURLInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getDASHStreamingSessionURL") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetDASHStreamingSessionURLInput(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_serializeOpHttpBindingsGetDASHStreamingSessionURLInput(v *GetDASHStreamingSessionURLInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetDASHStreamingSessionURLInput(v *GetDASHStreamingSessionURLInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DASHFragmentSelector != nil { ok := object.Key("DASHFragmentSelector") if err := awsRestjson1_serializeDocumentDASHFragmentSelector(v.DASHFragmentSelector, ok); err != nil { return err } } if len(v.DisplayFragmentNumber) > 0 { ok := object.Key("DisplayFragmentNumber") ok.String(string(v.DisplayFragmentNumber)) } if len(v.DisplayFragmentTimestamp) > 0 { ok := object.Key("DisplayFragmentTimestamp") ok.String(string(v.DisplayFragmentTimestamp)) } if v.Expires != nil { ok := object.Key("Expires") ok.Integer(*v.Expires) } if v.MaxManifestFragmentResults != nil { ok := object.Key("MaxManifestFragmentResults") ok.Long(*v.MaxManifestFragmentResults) } if len(v.PlaybackMode) > 0 { ok := object.Key("PlaybackMode") ok.String(string(v.PlaybackMode)) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpGetHLSStreamingSessionURL struct { } func (*awsRestjson1_serializeOpGetHLSStreamingSessionURL) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetHLSStreamingSessionURL) 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.(*GetHLSStreamingSessionURLInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getHLSStreamingSessionURL") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetHLSStreamingSessionURLInput(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_serializeOpHttpBindingsGetHLSStreamingSessionURLInput(v *GetHLSStreamingSessionURLInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetHLSStreamingSessionURLInput(v *GetHLSStreamingSessionURLInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ContainerFormat) > 0 { ok := object.Key("ContainerFormat") ok.String(string(v.ContainerFormat)) } if len(v.DiscontinuityMode) > 0 { ok := object.Key("DiscontinuityMode") ok.String(string(v.DiscontinuityMode)) } if len(v.DisplayFragmentTimestamp) > 0 { ok := object.Key("DisplayFragmentTimestamp") ok.String(string(v.DisplayFragmentTimestamp)) } if v.Expires != nil { ok := object.Key("Expires") ok.Integer(*v.Expires) } if v.HLSFragmentSelector != nil { ok := object.Key("HLSFragmentSelector") if err := awsRestjson1_serializeDocumentHLSFragmentSelector(v.HLSFragmentSelector, ok); err != nil { return err } } if v.MaxMediaPlaylistFragmentResults != nil { ok := object.Key("MaxMediaPlaylistFragmentResults") ok.Long(*v.MaxMediaPlaylistFragmentResults) } if len(v.PlaybackMode) > 0 { ok := object.Key("PlaybackMode") ok.String(string(v.PlaybackMode)) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpGetImages struct { } func (*awsRestjson1_serializeOpGetImages) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetImages) 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.(*GetImagesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getImages") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetImagesInput(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_serializeOpHttpBindingsGetImagesInput(v *GetImagesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetImagesInput(v *GetImagesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTimestamp != nil { ok := object.Key("EndTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.EndTimestamp)) } if len(v.Format) > 0 { ok := object.Key("Format") ok.String(string(v.Format)) } if v.FormatConfig != nil { ok := object.Key("FormatConfig") if err := awsRestjson1_serializeDocumentFormatConfig(v.FormatConfig, ok); err != nil { return err } } if v.HeightPixels != nil { ok := object.Key("HeightPixels") ok.Integer(*v.HeightPixels) } if len(v.ImageSelectorType) > 0 { ok := object.Key("ImageSelectorType") ok.String(string(v.ImageSelectorType)) } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Long(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.SamplingInterval != nil { ok := object.Key("SamplingInterval") ok.Integer(*v.SamplingInterval) } if v.StartTimestamp != nil { ok := object.Key("StartTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.StartTimestamp)) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } if v.WidthPixels != nil { ok := object.Key("WidthPixels") ok.Integer(*v.WidthPixels) } return nil } type awsRestjson1_serializeOpGetMediaForFragmentList struct { } func (*awsRestjson1_serializeOpGetMediaForFragmentList) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetMediaForFragmentList) 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.(*GetMediaForFragmentListInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getMediaForFragmentList") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetMediaForFragmentListInput(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_serializeOpHttpBindingsGetMediaForFragmentListInput(v *GetMediaForFragmentListInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetMediaForFragmentListInput(v *GetMediaForFragmentListInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Fragments != nil { ok := object.Key("Fragments") if err := awsRestjson1_serializeDocumentFragmentNumberList(v.Fragments, ok); err != nil { return err } } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } type awsRestjson1_serializeOpListFragments struct { } func (*awsRestjson1_serializeOpListFragments) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpListFragments) 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.(*ListFragmentsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/listFragments") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentListFragmentsInput(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_serializeOpHttpBindingsListFragmentsInput(v *ListFragmentsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentListFragmentsInput(v *ListFragmentsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.FragmentSelector != nil { ok := object.Key("FragmentSelector") if err := awsRestjson1_serializeDocumentFragmentSelector(v.FragmentSelector, ok); err != nil { return err } } if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Long(*v.MaxResults) } if v.NextToken != nil { ok := object.Key("NextToken") ok.String(*v.NextToken) } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } func awsRestjson1_serializeDocumentClipFragmentSelector(v *types.ClipFragmentSelector, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.FragmentSelectorType) > 0 { ok := object.Key("FragmentSelectorType") ok.String(string(v.FragmentSelectorType)) } if v.TimestampRange != nil { ok := object.Key("TimestampRange") if err := awsRestjson1_serializeDocumentClipTimestampRange(v.TimestampRange, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentClipTimestampRange(v *types.ClipTimestampRange, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTimestamp != nil { ok := object.Key("EndTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.EndTimestamp)) } if v.StartTimestamp != nil { ok := object.Key("StartTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.StartTimestamp)) } return nil } func awsRestjson1_serializeDocumentDASHFragmentSelector(v *types.DASHFragmentSelector, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.FragmentSelectorType) > 0 { ok := object.Key("FragmentSelectorType") ok.String(string(v.FragmentSelectorType)) } if v.TimestampRange != nil { ok := object.Key("TimestampRange") if err := awsRestjson1_serializeDocumentDASHTimestampRange(v.TimestampRange, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentDASHTimestampRange(v *types.DASHTimestampRange, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTimestamp != nil { ok := object.Key("EndTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.EndTimestamp)) } if v.StartTimestamp != nil { ok := object.Key("StartTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.StartTimestamp)) } return nil } func awsRestjson1_serializeDocumentFormatConfig(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_serializeDocumentFragmentNumberList(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_serializeDocumentFragmentSelector(v *types.FragmentSelector, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.FragmentSelectorType) > 0 { ok := object.Key("FragmentSelectorType") ok.String(string(v.FragmentSelectorType)) } if v.TimestampRange != nil { ok := object.Key("TimestampRange") if err := awsRestjson1_serializeDocumentTimestampRange(v.TimestampRange, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentHLSFragmentSelector(v *types.HLSFragmentSelector, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.FragmentSelectorType) > 0 { ok := object.Key("FragmentSelectorType") ok.String(string(v.FragmentSelectorType)) } if v.TimestampRange != nil { ok := object.Key("TimestampRange") if err := awsRestjson1_serializeDocumentHLSTimestampRange(v.TimestampRange, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentHLSTimestampRange(v *types.HLSTimestampRange, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTimestamp != nil { ok := object.Key("EndTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.EndTimestamp)) } if v.StartTimestamp != nil { ok := object.Key("StartTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.StartTimestamp)) } return nil } func awsRestjson1_serializeDocumentTimestampRange(v *types.TimestampRange, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.EndTimestamp != nil { ok := object.Key("EndTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.EndTimestamp)) } if v.StartTimestamp != nil { ok := object.Key("StartTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.StartTimestamp)) } return nil }
773
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideoarchivedmedia import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisvideoarchivedmedia/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpGetClip struct { } func (*validateOpGetClip) ID() string { return "OperationInputValidation" } func (m *validateOpGetClip) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetClipInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetClipInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetImages struct { } func (*validateOpGetImages) ID() string { return "OperationInputValidation" } func (m *validateOpGetImages) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetImagesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetImagesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpGetMediaForFragmentList struct { } func (*validateOpGetMediaForFragmentList) ID() string { return "OperationInputValidation" } func (m *validateOpGetMediaForFragmentList) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetMediaForFragmentListInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetMediaForFragmentListInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } type validateOpListFragments struct { } func (*validateOpListFragments) ID() string { return "OperationInputValidation" } func (m *validateOpListFragments) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*ListFragmentsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpListFragmentsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpGetClipValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetClip{}, middleware.After) } func addOpGetImagesValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetImages{}, middleware.After) } func addOpGetMediaForFragmentListValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMediaForFragmentList{}, middleware.After) } func addOpListFragmentsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListFragments{}, middleware.After) } func validateClipFragmentSelector(v *types.ClipFragmentSelector) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClipFragmentSelector"} if len(v.FragmentSelectorType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("FragmentSelectorType")) } if v.TimestampRange == nil { invalidParams.Add(smithy.NewErrParamRequired("TimestampRange")) } else if v.TimestampRange != nil { if err := validateClipTimestampRange(v.TimestampRange); err != nil { invalidParams.AddNested("TimestampRange", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateClipTimestampRange(v *types.ClipTimestampRange) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ClipTimestampRange"} if v.StartTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("StartTimestamp")) } if v.EndTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("EndTimestamp")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateFragmentSelector(v *types.FragmentSelector) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "FragmentSelector"} if len(v.FragmentSelectorType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("FragmentSelectorType")) } if v.TimestampRange == nil { invalidParams.Add(smithy.NewErrParamRequired("TimestampRange")) } else if v.TimestampRange != nil { if err := validateTimestampRange(v.TimestampRange); err != nil { invalidParams.AddNested("TimestampRange", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateTimestampRange(v *types.TimestampRange) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "TimestampRange"} if v.StartTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("StartTimestamp")) } if v.EndTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("EndTimestamp")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetClipInput(v *GetClipInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetClipInput"} if v.ClipFragmentSelector == nil { invalidParams.Add(smithy.NewErrParamRequired("ClipFragmentSelector")) } else if v.ClipFragmentSelector != nil { if err := validateClipFragmentSelector(v.ClipFragmentSelector); err != nil { invalidParams.AddNested("ClipFragmentSelector", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetImagesInput(v *GetImagesInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetImagesInput"} if len(v.ImageSelectorType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("ImageSelectorType")) } if v.StartTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("StartTimestamp")) } if v.EndTimestamp == nil { invalidParams.Add(smithy.NewErrParamRequired("EndTimestamp")) } if v.SamplingInterval == nil { invalidParams.Add(smithy.NewErrParamRequired("SamplingInterval")) } if len(v.Format) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Format")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetMediaForFragmentListInput(v *GetMediaForFragmentListInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetMediaForFragmentListInput"} if v.Fragments == nil { invalidParams.Add(smithy.NewErrParamRequired("Fragments")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpListFragmentsInput(v *ListFragmentsInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "ListFragmentsInput"} if v.FragmentSelector != nil { if err := validateFragmentSelector(v.FragmentSelector); err != nil { invalidParams.AddNested("FragmentSelector", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
266
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "github.com/aws/aws-sdk-go-v2/aws" endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" "github.com/aws/smithy-go/logging" "regexp" ) // Options is the endpoint resolver configuration options type Options struct { // Logger is a logging implementation that log events should be sent to. Logger logging.Logger // LogDeprecated indicates that deprecated endpoints should be logged to the // provided logger. LogDeprecated bool // ResolvedRegion is used to override the region to be resolved, rather then the // using the value passed to the ResolveEndpoint method. This value is used by the // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative // name. You must not set this value directly in your application. ResolvedRegion string // DisableHTTPS informs the resolver to return an endpoint that does not use the // HTTPS scheme. DisableHTTPS bool // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. UseDualStackEndpoint aws.DualStackEndpointState // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. UseFIPSEndpoint aws.FIPSEndpointState } func (o Options) GetResolvedRegion() string { return o.ResolvedRegion } func (o Options) GetDisableHTTPS() bool { return o.DisableHTTPS } func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { return o.UseDualStackEndpoint } func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { return o.UseFIPSEndpoint } func transformToSharedOptions(options Options) endpoints.Options { return endpoints.Options{ Logger: options.Logger, LogDeprecated: options.LogDeprecated, ResolvedRegion: options.ResolvedRegion, DisableHTTPS: options.DisableHTTPS, UseDualStackEndpoint: options.UseDualStackEndpoint, UseFIPSEndpoint: options.UseFIPSEndpoint, } } // Resolver Kinesis Video Archived Media endpoint resolver type Resolver struct { partitions endpoints.Partitions } // ResolveEndpoint resolves the service endpoint for the given region and options func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { if len(region) == 0 { return endpoint, &aws.MissingRegionError{} } opt := transformToSharedOptions(options) return r.partitions.ResolveEndpoint(region, opt) } // New returns a new Resolver func New() *Resolver { return &Resolver{ partitions: defaultPartitions, } } var partitionRegexp = struct { Aws *regexp.Regexp AwsCn *regexp.Regexp AwsIso *regexp.Regexp AwsIsoB *regexp.Regexp AwsIsoE *regexp.Regexp AwsIsoF *regexp.Regexp AwsUsGov *regexp.Regexp }{ Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$"), AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), } var defaultPartitions = endpoints.Partitions{ { ID: "aws", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisvideo.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisvideo-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, }, }, { ID: "aws-cn", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisvideo.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisvideo-fips.{region}.api.amazonwebservices.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.amazonaws.com.cn", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, Endpoints: endpoints.Endpoints{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, }, }, { ID: "aws-iso", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.c2s.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIso, IsRegionalized: true, }, { ID: "aws-iso-b", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.sc2s.sgov.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoB, IsRegionalized: true, }, { ID: "aws-iso-e", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.cloud.adc-e.uk", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoE, IsRegionalized: true, }, { ID: "aws-iso-f", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.csp.hci.ic.gov", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsIsoF, IsRegionalized: true, }, { ID: "aws-us-gov", Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ { Variant: endpoints.DualStackVariant, }: { Hostname: "kinesisvideo.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant, }: { Hostname: "kinesisvideo-fips.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, }: { Hostname: "kinesisvideo-fips.{region}.api.aws", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, { Variant: 0, }: { Hostname: "kinesisvideo.{region}.amazonaws.com", Protocols: []string{"https"}, SignatureVersions: []string{"v4"}, }, }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, }, }
352
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package endpoints import ( "testing" ) func TestRegexCompile(t *testing.T) { _ = defaultPartitions }
12
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types type ClipFragmentSelectorType string // Enum values for ClipFragmentSelectorType const ( ClipFragmentSelectorTypeProducerTimestamp ClipFragmentSelectorType = "PRODUCER_TIMESTAMP" ClipFragmentSelectorTypeServerTimestamp ClipFragmentSelectorType = "SERVER_TIMESTAMP" ) // Values returns all known values for ClipFragmentSelectorType. 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 (ClipFragmentSelectorType) Values() []ClipFragmentSelectorType { return []ClipFragmentSelectorType{ "PRODUCER_TIMESTAMP", "SERVER_TIMESTAMP", } } type ContainerFormat string // Enum values for ContainerFormat const ( ContainerFormatFragmentedMp4 ContainerFormat = "FRAGMENTED_MP4" ContainerFormatMpegTs ContainerFormat = "MPEG_TS" ) // Values returns all known values for ContainerFormat. 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 (ContainerFormat) Values() []ContainerFormat { return []ContainerFormat{ "FRAGMENTED_MP4", "MPEG_TS", } } type DASHDisplayFragmentNumber string // Enum values for DASHDisplayFragmentNumber const ( DASHDisplayFragmentNumberAlways DASHDisplayFragmentNumber = "ALWAYS" DASHDisplayFragmentNumberNever DASHDisplayFragmentNumber = "NEVER" ) // Values returns all known values for DASHDisplayFragmentNumber. 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 (DASHDisplayFragmentNumber) Values() []DASHDisplayFragmentNumber { return []DASHDisplayFragmentNumber{ "ALWAYS", "NEVER", } } type DASHDisplayFragmentTimestamp string // Enum values for DASHDisplayFragmentTimestamp const ( DASHDisplayFragmentTimestampAlways DASHDisplayFragmentTimestamp = "ALWAYS" DASHDisplayFragmentTimestampNever DASHDisplayFragmentTimestamp = "NEVER" ) // Values returns all known values for DASHDisplayFragmentTimestamp. 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 (DASHDisplayFragmentTimestamp) Values() []DASHDisplayFragmentTimestamp { return []DASHDisplayFragmentTimestamp{ "ALWAYS", "NEVER", } } type DASHFragmentSelectorType string // Enum values for DASHFragmentSelectorType const ( DASHFragmentSelectorTypeProducerTimestamp DASHFragmentSelectorType = "PRODUCER_TIMESTAMP" DASHFragmentSelectorTypeServerTimestamp DASHFragmentSelectorType = "SERVER_TIMESTAMP" ) // Values returns all known values for DASHFragmentSelectorType. 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 (DASHFragmentSelectorType) Values() []DASHFragmentSelectorType { return []DASHFragmentSelectorType{ "PRODUCER_TIMESTAMP", "SERVER_TIMESTAMP", } } type DASHPlaybackMode string // Enum values for DASHPlaybackMode const ( DASHPlaybackModeLive DASHPlaybackMode = "LIVE" DASHPlaybackModeLiveReplay DASHPlaybackMode = "LIVE_REPLAY" DASHPlaybackModeOnDemand DASHPlaybackMode = "ON_DEMAND" ) // Values returns all known values for DASHPlaybackMode. 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 (DASHPlaybackMode) Values() []DASHPlaybackMode { return []DASHPlaybackMode{ "LIVE", "LIVE_REPLAY", "ON_DEMAND", } } type Format string // Enum values for Format const ( FormatJpeg Format = "JPEG" FormatPng Format = "PNG" ) // Values returns all known values for Format. 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 (Format) Values() []Format { return []Format{ "JPEG", "PNG", } } type FormatConfigKey string // Enum values for FormatConfigKey const ( FormatConfigKeyJPEGQuality FormatConfigKey = "JPEGQuality" ) // Values returns all known values for FormatConfigKey. 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 (FormatConfigKey) Values() []FormatConfigKey { return []FormatConfigKey{ "JPEGQuality", } } type FragmentSelectorType string // Enum values for FragmentSelectorType const ( FragmentSelectorTypeProducerTimestamp FragmentSelectorType = "PRODUCER_TIMESTAMP" FragmentSelectorTypeServerTimestamp FragmentSelectorType = "SERVER_TIMESTAMP" ) // Values returns all known values for FragmentSelectorType. 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 (FragmentSelectorType) Values() []FragmentSelectorType { return []FragmentSelectorType{ "PRODUCER_TIMESTAMP", "SERVER_TIMESTAMP", } } type HLSDiscontinuityMode string // Enum values for HLSDiscontinuityMode const ( HLSDiscontinuityModeAlways HLSDiscontinuityMode = "ALWAYS" HLSDiscontinuityModeNever HLSDiscontinuityMode = "NEVER" HLSDiscontinuityModeOnDiscontinuity HLSDiscontinuityMode = "ON_DISCONTINUITY" ) // Values returns all known values for HLSDiscontinuityMode. 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 (HLSDiscontinuityMode) Values() []HLSDiscontinuityMode { return []HLSDiscontinuityMode{ "ALWAYS", "NEVER", "ON_DISCONTINUITY", } } type HLSDisplayFragmentTimestamp string // Enum values for HLSDisplayFragmentTimestamp const ( HLSDisplayFragmentTimestampAlways HLSDisplayFragmentTimestamp = "ALWAYS" HLSDisplayFragmentTimestampNever HLSDisplayFragmentTimestamp = "NEVER" ) // Values returns all known values for HLSDisplayFragmentTimestamp. 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 (HLSDisplayFragmentTimestamp) Values() []HLSDisplayFragmentTimestamp { return []HLSDisplayFragmentTimestamp{ "ALWAYS", "NEVER", } } type HLSFragmentSelectorType string // Enum values for HLSFragmentSelectorType const ( HLSFragmentSelectorTypeProducerTimestamp HLSFragmentSelectorType = "PRODUCER_TIMESTAMP" HLSFragmentSelectorTypeServerTimestamp HLSFragmentSelectorType = "SERVER_TIMESTAMP" ) // Values returns all known values for HLSFragmentSelectorType. 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 (HLSFragmentSelectorType) Values() []HLSFragmentSelectorType { return []HLSFragmentSelectorType{ "PRODUCER_TIMESTAMP", "SERVER_TIMESTAMP", } } type HLSPlaybackMode string // Enum values for HLSPlaybackMode const ( HLSPlaybackModeLive HLSPlaybackMode = "LIVE" HLSPlaybackModeLiveReplay HLSPlaybackMode = "LIVE_REPLAY" HLSPlaybackModeOnDemand HLSPlaybackMode = "ON_DEMAND" ) // Values returns all known values for HLSPlaybackMode. 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 (HLSPlaybackMode) Values() []HLSPlaybackMode { return []HLSPlaybackMode{ "LIVE", "LIVE_REPLAY", "ON_DEMAND", } } type ImageError string // Enum values for ImageError const ( ImageErrorNoMedia ImageError = "NO_MEDIA" ImageErrorMediaError ImageError = "MEDIA_ERROR" ) // Values returns all known values for ImageError. 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 (ImageError) Values() []ImageError { return []ImageError{ "NO_MEDIA", "MEDIA_ERROR", } } type ImageSelectorType string // Enum values for ImageSelectorType const ( ImageSelectorTypeProducerTimestamp ImageSelectorType = "PRODUCER_TIMESTAMP" ImageSelectorTypeServerTimestamp ImageSelectorType = "SERVER_TIMESTAMP" ) // Values returns all known values for ImageSelectorType. 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 (ImageSelectorType) Values() []ImageSelectorType { return []ImageSelectorType{ "PRODUCER_TIMESTAMP", "SERVER_TIMESTAMP", } }
279
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( "fmt" smithy "github.com/aws/smithy-go" ) // Kinesis Video Streams has throttled the request because you have exceeded a // limit. Try making the call later. For information about limits, see Kinesis // Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html) // . type ClientLimitExceededException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ClientLimitExceededException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ClientLimitExceededException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ClientLimitExceededException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ClientLimitExceededException" } return *e.ErrorCodeOverride } func (e *ClientLimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // A specified parameter exceeds its restrictions, is not supported, or can't be // used. type InvalidArgumentException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidArgumentException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidArgumentException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidArgumentException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidArgumentException" } return *e.ErrorCodeOverride } func (e *InvalidArgumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The codec private data in at least one of the tracks of the video stream is not // valid for this operation. type InvalidCodecPrivateDataException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidCodecPrivateDataException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidCodecPrivateDataException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidCodecPrivateDataException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidCodecPrivateDataException" } return *e.ErrorCodeOverride } func (e *InvalidCodecPrivateDataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // One or more frames in the requested clip could not be parsed based on the // specified codec. type InvalidMediaFrameException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *InvalidMediaFrameException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *InvalidMediaFrameException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *InvalidMediaFrameException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "InvalidMediaFrameException" } return *e.ErrorCodeOverride } func (e *InvalidMediaFrameException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // No codec private data was found in at least one of tracks of the video stream. type MissingCodecPrivateDataException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *MissingCodecPrivateDataException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *MissingCodecPrivateDataException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *MissingCodecPrivateDataException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "MissingCodecPrivateDataException" } return *e.ErrorCodeOverride } func (e *MissingCodecPrivateDataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // A streaming session was requested for a stream that does not retain data (that // is, has a DataRetentionInHours of 0). type NoDataRetentionException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NoDataRetentionException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NoDataRetentionException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NoDataRetentionException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NoDataRetentionException" } return *e.ErrorCodeOverride } func (e *NoDataRetentionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // Status Code: 403, The caller is not authorized to perform an operation on the // given stream, or the token has expired. type NotAuthorizedException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *NotAuthorizedException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *NotAuthorizedException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *NotAuthorizedException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "NotAuthorizedException" } return *e.ErrorCodeOverride } func (e *NotAuthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // GetMedia throws this error when Kinesis Video Streams can't find the stream // that you specified. GetHLSStreamingSessionURL and GetDASHStreamingSessionURL // throw this error if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAY is // requested for a stream that has no fragments within the requested time range, or // if a session with a PlaybackMode of LIVE is requested for a stream that has no // fragments within the last 30 seconds. type ResourceNotFoundException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *ResourceNotFoundException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *ResourceNotFoundException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *ResourceNotFoundException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "ResourceNotFoundException" } return *e.ErrorCodeOverride } func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } // The type of the media (for example, h.264 or h.265 video or ACC or G.711 audio) // could not be determined from the codec IDs of the tracks in the first fragment // for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC and, // optionally, the codec ID for track 2 should be A_AAC . type UnsupportedStreamMediaTypeException struct { Message *string ErrorCodeOverride *string noSmithyDocumentSerde } func (e *UnsupportedStreamMediaTypeException) Error() string { return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) } func (e *UnsupportedStreamMediaTypeException) ErrorMessage() string { if e.Message == nil { return "" } return *e.Message } func (e *UnsupportedStreamMediaTypeException) ErrorCode() string { if e == nil || e.ErrorCodeOverride == nil { return "UnsupportedStreamMediaTypeException" } return *e.ErrorCodeOverride } func (e *UnsupportedStreamMediaTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
261
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package types import ( smithydocument "github.com/aws/smithy-go/document" "time" ) // Describes the timestamp range and timestamp origin of a range of fragments. // Fragments that have duplicate producer timestamps are deduplicated. This means // that if producers are producing a stream of fragments with producer timestamps // that are approximately equal to the true clock time, the clip will contain all // of the fragments within the requested timestamp range. If some fragments are // ingested within the same time range and very different points in time, only the // oldest ingested collection of fragments are returned. type ClipFragmentSelector struct { // The origin of the timestamps to use (Server or Producer). // // This member is required. FragmentSelectorType ClipFragmentSelectorType // The range of timestamps to return. // // This member is required. TimestampRange *ClipTimestampRange noSmithyDocumentSerde } // The range of timestamps for which to return fragments. type ClipTimestampRange struct { // The end of the timestamp range for the requested media. This value must be // within 24 hours of the specified StartTimestamp , and it must be later than the // StartTimestamp value. If FragmentSelectorType for the request is // SERVER_TIMESTAMP , this value must be in the past. This value is inclusive. The // EndTimestamp is compared to the (starting) timestamp of the fragment. Fragments // that start before the EndTimestamp value and continue past it are included in // the session. // // This member is required. EndTimestamp *time.Time // The starting timestamp in the range of timestamps for which to return // fragments. Only fragments that start exactly at or after StartTimestamp are // included in the session. Fragments that start before StartTimestamp and // continue past it aren't included in the session. If FragmentSelectorType is // SERVER_TIMESTAMP , the StartTimestamp must be later than the stream head. // // This member is required. StartTimestamp *time.Time noSmithyDocumentSerde } // Contains the range of timestamps for the requested media, and the source of the // timestamps. type DASHFragmentSelector struct { // The source of the timestamps for the requested media. When FragmentSelectorType // is set to PRODUCER_TIMESTAMP and GetDASHStreamingSessionURLInput$PlaybackMode // is ON_DEMAND or LIVE_REPLAY , the first fragment ingested with a producer // timestamp within the specified FragmentSelector$TimestampRange is included in // the media playlist. In addition, the fragments with producer timestamps within // the TimestampRange ingested immediately following the first fragment (up to the // GetDASHStreamingSessionURLInput$MaxManifestFragmentResults value) are included. // Fragments that have duplicate producer timestamps are deduplicated. This means // that if producers are producing a stream of fragments with producer timestamps // that are approximately equal to the true clock time, the MPEG-DASH manifest will // contain all of the fragments within the requested timestamp range. If some // fragments are ingested within the same time range and very different points in // time, only the oldest ingested collection of fragments are returned. When // FragmentSelectorType is set to PRODUCER_TIMESTAMP and // GetDASHStreamingSessionURLInput$PlaybackMode is LIVE , the producer timestamps // are used in the MP4 fragments and for deduplication. But the most recently // ingested fragments based on server timestamps are included in the MPEG-DASH // manifest. This means that even if fragments ingested in the past have producer // timestamps with values now, they are not included in the HLS media playlist. The // default is SERVER_TIMESTAMP . FragmentSelectorType DASHFragmentSelectorType // The start and end of the timestamp range for the requested media. This value // should not be present if PlaybackType is LIVE . TimestampRange *DASHTimestampRange noSmithyDocumentSerde } // The start and end of the timestamp range for the requested media. This value // should not be present if PlaybackType is LIVE . The values in DASHimestampRange // are inclusive. Fragments that start exactly at or after the start time are // included in the session. Fragments that start before the start time and continue // past it are not included in the session. type DASHTimestampRange struct { // The end of the timestamp range for the requested media. This value must be // within 24 hours of the specified StartTimestamp , and it must be later than the // StartTimestamp value. If FragmentSelectorType for the request is // SERVER_TIMESTAMP , this value must be in the past. The EndTimestamp value is // required for ON_DEMAND mode, but optional for LIVE_REPLAY mode. If the // EndTimestamp is not set for LIVE_REPLAY mode then the session will continue to // include newly ingested fragments until the session expires. This value is // inclusive. The EndTimestamp is compared to the (starting) timestamp of the // fragment. Fragments that start before the EndTimestamp value and continue past // it are included in the session. EndTimestamp *time.Time // The start of the timestamp range for the requested media. If the // DASHTimestampRange value is specified, the StartTimestamp value is required. // Only fragments that start exactly at or after StartTimestamp are included in // the session. Fragments that start before StartTimestamp and continue past it // aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP , // the StartTimestamp must be later than the stream head. StartTimestamp *time.Time noSmithyDocumentSerde } // Represents a segment of video or other time-delimited data. type Fragment struct { // The playback duration or other time value associated with the fragment. FragmentLengthInMilliseconds int64 // The unique identifier of the fragment. This value monotonically increases based // on the ingestion order. FragmentNumber *string // The total fragment size, including information about the fragment and contained // media data. FragmentSizeInBytes int64 // The timestamp from the producer corresponding to the fragment. ProducerTimestamp *time.Time // The timestamp from the AWS server corresponding to the fragment. ServerTimestamp *time.Time noSmithyDocumentSerde } // Describes the timestamp range and timestamp origin of a range of fragments. // Only fragments with a start timestamp greater than or equal to the given start // time and less than or equal to the end time are returned. For example, if a // stream contains fragments with the following start timestamps: // - 00:00:00 // - 00:00:02 // - 00:00:04 // - 00:00:06 // // A fragment selector range with a start time of 00:00:01 and end time of // 00:00:04 would return the fragments with start times of 00:00:02 and 00:00:04. type FragmentSelector struct { // The origin of the timestamps to use (Server or Producer). // // This member is required. FragmentSelectorType FragmentSelectorType // The range of timestamps to return. // // This member is required. TimestampRange *TimestampRange noSmithyDocumentSerde } // Contains the range of timestamps for the requested media, and the source of the // timestamps. type HLSFragmentSelector struct { // The source of the timestamps for the requested media. When FragmentSelectorType // is set to PRODUCER_TIMESTAMP and GetHLSStreamingSessionURLInput$PlaybackMode is // ON_DEMAND or LIVE_REPLAY , the first fragment ingested with a producer timestamp // within the specified FragmentSelector$TimestampRange is included in the media // playlist. In addition, the fragments with producer timestamps within the // TimestampRange ingested immediately following the first fragment (up to the // GetHLSStreamingSessionURLInput$MaxMediaPlaylistFragmentResults value) are // included. Fragments that have duplicate producer timestamps are deduplicated. // This means that if producers are producing a stream of fragments with producer // timestamps that are approximately equal to the true clock time, the HLS media // playlists will contain all of the fragments within the requested timestamp // range. If some fragments are ingested within the same time range and very // different points in time, only the oldest ingested collection of fragments are // returned. When FragmentSelectorType is set to PRODUCER_TIMESTAMP and // GetHLSStreamingSessionURLInput$PlaybackMode is LIVE , the producer timestamps // are used in the MP4 fragments and for deduplication. But the most recently // ingested fragments based on server timestamps are included in the HLS media // playlist. This means that even if fragments ingested in the past have producer // timestamps with values now, they are not included in the HLS media playlist. The // default is SERVER_TIMESTAMP . FragmentSelectorType HLSFragmentSelectorType // The start and end of the timestamp range for the requested media. This value // should not be present if PlaybackType is LIVE . TimestampRange *HLSTimestampRange noSmithyDocumentSerde } // The start and end of the timestamp range for the requested media. This value // should not be present if PlaybackType is LIVE . type HLSTimestampRange struct { // The end of the timestamp range for the requested media. This value must be // within 24 hours of the specified StartTimestamp , and it must be later than the // StartTimestamp value. If FragmentSelectorType for the request is // SERVER_TIMESTAMP , this value must be in the past. The EndTimestamp value is // required for ON_DEMAND mode, but optional for LIVE_REPLAY mode. If the // EndTimestamp is not set for LIVE_REPLAY mode then the session will continue to // include newly ingested fragments until the session expires. This value is // inclusive. The EndTimestamp is compared to the (starting) timestamp of the // fragment. Fragments that start before the EndTimestamp value and continue past // it are included in the session. EndTimestamp *time.Time // The start of the timestamp range for the requested media. If the // HLSTimestampRange value is specified, the StartTimestamp value is required. // Only fragments that start exactly at or after StartTimestamp are included in // the session. Fragments that start before StartTimestamp and continue past it // aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP , // the StartTimestamp must be later than the stream head. StartTimestamp *time.Time noSmithyDocumentSerde } // A structure that contains the Timestamp , Error , and ImageContent . type Image struct { // The error message shown when the image for the provided timestamp was not // extracted due to a non-tryable error. An error will be returned if: // - There is no media that exists for the specified Timestamp . // // - The media for the specified time does not allow an image to be extracted. // In this case the media is audio only, or the incorrect media has been ingested. Error ImageError // An attribute of the Image object that is Base64 encoded. ImageContent *string // An attribute of the Image object that is used to extract an image from the // video stream. This field is used to manage gaps on images or to better // understand the pagination window. TimeStamp *time.Time noSmithyDocumentSerde } // The range of timestamps for which to return fragments. type TimestampRange struct { // The ending timestamp in the range of timestamps for which to return fragments. // // This member is required. EndTimestamp *time.Time // The starting timestamp in the range of timestamps for which to return fragments. // // This member is required. StartTimestamp *time.Time noSmithyDocumentSerde } type noSmithyDocumentSerde = smithydocument.NoSerde
269
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/retry" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" smithy "github.com/aws/smithy-go" smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" "time" ) const ServiceID = "Kinesis Video Media" const ServiceAPIVersion = "2017-09-30" // Client provides the API client to make operations call for Amazon Kinesis Video // Streams Media. type Client struct { options Options } // New returns an initialized Client based on the functional options. Provide // additional functional options to further configure the behavior of the client, // such as changing the client's endpoint or adding custom middleware behavior. func New(options Options, optFns ...func(*Options)) *Client { options = options.Copy() resolveDefaultLogger(&options) setResolvedDefaultsMode(&options) resolveRetryer(&options) resolveHTTPClient(&options) resolveHTTPSignerV4(&options) resolveDefaultEndpointConfiguration(&options) for _, fn := range optFns { fn(&options) } client := &Client{ options: options, } return client } type Options struct { // Set of options to modify how an operation is invoked. These apply to all // operations invoked for this client. Use functional options on operation call to // modify this list for per operation behavior. APIOptions []func(*middleware.Stack) error // Configures the events that will be sent to the configured logger. ClientLogMode aws.ClientLogMode // The credentials object to use when signing requests. Credentials aws.CredentialsProvider // The configuration DefaultsMode that the SDK should use when constructing the // clients initial default settings. DefaultsMode aws.DefaultsMode // The endpoint options to be used when attempting to resolve an endpoint. EndpointOptions EndpointResolverOptions // The service endpoint resolver. EndpointResolver EndpointResolver // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 // The logger writer interface to write logging messages to. Logger logging.Logger // The region to send requests to. (Required) Region string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. A value of 0 is ignored, and // will not be used to configure the API client created default retryer, or modify // per operation call's retry max attempts. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. If specified in an operation call's functional // options with a value that is different than the constructed client's Options, // the Client's Retryer will be wrapped to use the operation's specific // RetryMaxAttempts value. RetryMaxAttempts int // RetryMode specifies the retry mode the API client will be created with, if // Retryer option is not also specified. When creating a new API Clients this // member will only be used if the Retryer Options member is nil. This value will // be ignored if Retryer is not nil. Currently does not support per operation call // overrides, may in the future. RetryMode aws.RetryMode // Retryer guides how HTTP requests should be retried in case of recoverable // failures. When nil the API client will use a default retryer. The kind of // default retry created by the API client can be changed with the RetryMode // option. Retryer aws.Retryer // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You // should not populate this structure programmatically, or rely on the values here // within your applications. RuntimeEnvironment aws.RuntimeEnvironment // The initial DefaultsMode used when the client options were constructed. If the // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved // value was at that point in time. Currently does not support per operation call // overrides, may in the future. resolvedDefaultsMode aws.DefaultsMode // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HTTPClient HTTPClient } // WithAPIOptions returns a functional option for setting the Client's APIOptions // option. func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { return func(o *Options) { o.APIOptions = append(o.APIOptions, optFns...) } } // WithEndpointResolver returns a functional option for setting the Client's // EndpointResolver option. func WithEndpointResolver(v EndpointResolver) func(*Options) { return func(o *Options) { o.EndpointResolver = v } } type HTTPClient interface { Do(*http.Request) (*http.Response, error) } // Copy creates a clone where the APIOptions list is deep copied. func (o Options) Copy() Options { to := o to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) copy(to.APIOptions, o.APIOptions) return to } func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { ctx = middleware.ClearStackValues(ctx) stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) options := c.options.Copy() for _, fn := range optFns { fn(&options) } finalizeRetryMaxAttemptOptions(&options, *c) finalizeClientEndpointResolverOptions(&options) for _, fn := range stackFns { if err := fn(stack, options); err != nil { return nil, metadata, err } } for _, fn := range options.APIOptions { if err := fn(stack); err != nil { return nil, metadata, err } } handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) result, metadata, err = handler.Handle(ctx, params) if err != nil { err = &smithy.OperationError{ ServiceID: ServiceID, OperationName: opID, Err: err, } } return result, metadata, err } type noSmithyDocumentSerde = smithydocument.NoSerde func resolveDefaultLogger(o *Options) { if o.Logger != nil { return } o.Logger = logging.Nop{} } func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { return middleware.AddSetLoggerMiddleware(stack, o.Logger) } func setResolvedDefaultsMode(o *Options) { if len(o.resolvedDefaultsMode) > 0 { return } var mode aws.DefaultsMode mode.SetFromString(string(o.DefaultsMode)) if mode == aws.DefaultsModeAuto { mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) } o.resolvedDefaultsMode = mode } // NewFromConfig returns a new client from the provided config. func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { opts := Options{ Region: cfg.Region, DefaultsMode: cfg.DefaultsMode, RuntimeEnvironment: cfg.RuntimeEnvironment, HTTPClient: cfg.HTTPClient, Credentials: cfg.Credentials, APIOptions: cfg.APIOptions, Logger: cfg.Logger, ClientLogMode: cfg.ClientLogMode, } resolveAWSRetryerProvider(cfg, &opts) resolveAWSRetryMaxAttempts(cfg, &opts) resolveAWSRetryMode(cfg, &opts) resolveAWSEndpointResolver(cfg, &opts) resolveUseDualStackEndpoint(cfg, &opts) resolveUseFIPSEndpoint(cfg, &opts) return New(opts, optFns...) } func resolveHTTPClient(o *Options) { var buildable *awshttp.BuildableClient if o.HTTPClient != nil { var ok bool buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) if !ok { return } } else { buildable = awshttp.NewBuildableClient() } modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { dialer.Timeout = dialerTimeout } }) buildable = buildable.WithTransportOptions(func(transport *http.Transport) { if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { transport.TLSHandshakeTimeout = tlsHandshakeTimeout } }) } o.HTTPClient = buildable } func resolveRetryer(o *Options) { if o.Retryer != nil { return } if len(o.RetryMode) == 0 { modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) if err == nil { o.RetryMode = modeConfig.RetryMode } } if len(o.RetryMode) == 0 { o.RetryMode = aws.RetryModeStandard } var standardOptions []func(*retry.StandardOptions) if v := o.RetryMaxAttempts; v != 0 { standardOptions = append(standardOptions, func(so *retry.StandardOptions) { so.MaxAttempts = v }) } switch o.RetryMode { case aws.RetryModeAdaptive: var adaptiveOptions []func(*retry.AdaptiveModeOptions) if len(standardOptions) != 0 { adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { ao.StandardOptions = append(ao.StandardOptions, standardOptions...) }) } o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) default: o.Retryer = retry.NewStandard(standardOptions...) } } func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { if cfg.Retryer == nil { return } o.Retryer = cfg.Retryer() } func resolveAWSRetryMode(cfg aws.Config, o *Options) { if len(cfg.RetryMode) == 0 { return } o.RetryMode = cfg.RetryMode } func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { if cfg.RetryMaxAttempts == 0 { return } o.RetryMaxAttempts = cfg.RetryMaxAttempts } func finalizeRetryMaxAttemptOptions(o *Options, client Client) { if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { return } o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) } func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { return } o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions, NewDefaultEndpointResolver()) } func addClientUserAgent(stack *middleware.Stack) error { return awsmiddleware.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "kinesisvideomedia", goModuleVersion)(stack) } func addHTTPSignerV4Middleware(stack *middleware.Stack, o Options) error { mw := v4.NewSignHTTPRequestMiddleware(v4.SignHTTPRequestMiddlewareOptions{ CredentialsProvider: o.Credentials, Signer: o.HTTPSignerV4, LogSigning: o.ClientLogMode.IsSigning(), }) return stack.Finalize.Add(mw, middleware.After) } type HTTPSignerV4 interface { SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error } func resolveHTTPSignerV4(o *Options) { if o.HTTPSignerV4 != nil { return } o.HTTPSignerV4 = newDefaultV4Signer(*o) } func newDefaultV4Signer(o Options) *v4.Signer { return v4.NewSigner(func(so *v4.SignerOptions) { so.Logger = o.Logger so.LogSigning = o.ClientLogMode.IsSigning() }) } func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, LogRetryAttempts: o.ClientLogMode.IsRetries(), } return retry.AddRetryMiddlewares(stack, mo) } // resolves dual-stack endpoint configuration func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseDualStackEndpoint = value } return nil } // resolves FIPS endpoint configuration func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { if len(cfg.ConfigSources) == 0 { return nil } value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) if err != nil { return err } if found { o.EndpointOptions.UseFIPSEndpoint = value } return nil } func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } func addResponseErrorMiddleware(stack *middleware.Stack) error { return awshttp.AddResponseErrorMiddleware(stack) } func addRequestResponseLogging(stack *middleware.Stack, o Options) error { return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ LogRequest: o.ClientLogMode.IsRequest(), LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), LogResponse: o.ClientLogMode.IsResponse(), LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), }, middleware.After) }
435
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io/ioutil" "net/http" "strings" "testing" ) func TestClient_resolveRetryOptions(t *testing.T) { nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { return &http.Response{ StatusCode: 200, Header: http.Header{}, Body: ioutil.NopCloser(strings.NewReader("")), }, nil }) cases := map[string]struct { defaultsMode aws.DefaultsMode retryer aws.Retryer retryMaxAttempts int opRetryMaxAttempts *int retryMode aws.RetryMode expectClientRetryMode aws.RetryMode expectClientMaxAttempts int expectOpMaxAttempts int }{ "defaults": { defaultsMode: aws.DefaultsModeStandard, expectClientRetryMode: aws.RetryModeStandard, expectClientMaxAttempts: 3, expectOpMaxAttempts: 3, }, "custom default retry": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(2), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 2, }, "custom op no change max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(10), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, "custom op 0 max attempts": { retryMode: aws.RetryModeAdaptive, retryMaxAttempts: 10, opRetryMaxAttempts: aws.Int(0), expectClientRetryMode: aws.RetryModeAdaptive, expectClientMaxAttempts: 10, expectOpMaxAttempts: 10, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { client := NewFromConfig(aws.Config{ DefaultsMode: c.defaultsMode, Retryer: func() func() aws.Retryer { if c.retryer == nil { return nil } return func() aws.Retryer { return c.retryer } }(), HTTPClient: nopClient, RetryMaxAttempts: c.retryMaxAttempts, RetryMode: c.retryMode, }) if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { t.Errorf("expect %v retry mode, got %v", e, a) } if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v max attempts, got %v", e, a) } _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, []func(*Options){ func(o *Options) { if c.opRetryMaxAttempts == nil { return } o.RetryMaxAttempts = *c.opRetryMaxAttempts }, }, func(s *middleware.Stack, o Options) error { s.Initialize.Clear() s.Serialize.Clear() s.Build.Clear() s.Finalize.Clear() s.Deserialize.Clear() if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { t.Errorf("expect %v op max attempts, got %v", e, a) } return nil }) if err != nil { t.Fatalf("expect no operation error, got %v", err) } }) } }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia import ( "context" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" "github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "io" ) // Use this API to retrieve media content from a Kinesis video stream. In the // request, you identify the stream name or stream Amazon Resource Name (ARN), and // the starting chunk. Kinesis Video Streams then returns a stream of chunks in // order by fragment number. You must first call the GetDataEndpoint API to get an // endpoint. Then send the GetMedia requests to this endpoint using the // --endpoint-url parameter (https://docs.aws.amazon.com/cli/latest/reference/) . // When you put media data (fragments) on a stream, Kinesis Video Streams stores // each incoming fragment and related metadata in what is called a "chunk." For // more information, see PutMedia (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html) // . The GetMedia API returns a stream of these chunks starting from the chunk // that you specify in the request. The following limits apply when using the // GetMedia API: // - A client can call GetMedia up to five times per second per stream. // - Kinesis Video Streams sends media data at a rate of up to 25 megabytes per // second (or 200 megabits per second) during a GetMedia session. // // If an error is thrown after invoking a Kinesis Video Streams media API, in // addition to the HTTP status code and the response body, it includes the // following pieces of information: // - x-amz-ErrorType HTTP header – contains a more specific error type in // addition to what the HTTP status code provides. // - x-amz-RequestId HTTP header – if you want to report an issue to AWS, the // support team can better diagnose the problem if given the Request Id. // // Both the HTTP status code and the ErrorType header can be utilized to make // programmatic decisions about whether errors are retry-able and under what // conditions, as well as provide information on what actions the client programmer // might need to take in order to successfully try again. For more information, see // the Errors section at the bottom of this topic, as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html) // . func (c *Client) GetMedia(ctx context.Context, params *GetMediaInput, optFns ...func(*Options)) (*GetMediaOutput, error) { if params == nil { params = &GetMediaInput{} } result, metadata, err := c.invokeOperation(ctx, "GetMedia", params, optFns, c.addOperationGetMediaMiddlewares) if err != nil { return nil, err } out := result.(*GetMediaOutput) out.ResultMetadata = metadata return out, nil } type GetMediaInput struct { // Identifies the starting chunk to get from the specified stream. // // This member is required. StartSelector *types.StartSelector // The ARN of the stream from where you want to get the media content. If you // don't specify the streamARN , you must specify the streamName . StreamARN *string // The Kinesis video stream name from where you want to get the media content. If // you don't specify the streamName , you must specify the streamARN . StreamName *string noSmithyDocumentSerde } type GetMediaOutput struct { // The content type of the requested media. ContentType *string // The payload Kinesis Video Streams returns is a sequence of chunks from the // specified stream. For information about the chunks, see . The chunks that // Kinesis Video Streams returns in the GetMedia call also include the following // additional Matroska (MKV) tags: // - AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your // GetMedia call terminates, you can use this continuation token in your next // request to get the next chunk where the last request terminated. // - AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client applications can // use this tag value to determine how far behind the chunk returned in the // response is from the latest chunk on the stream. // - AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk. // - AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the fragment. // - AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer timestamp of the fragment. // The following tags will be present if an error occurs: // - AWS_KINESISVIDEO_ERROR_CODE - String description of an error that caused // GetMedia to stop. // - AWS_KINESISVIDEO_ERROR_ID: Integer code of the error. // The error codes are as follows: // - 3002 - Error writing to the stream // - 4000 - Requested fragment is not found // - 4500 - Access denied for the stream's KMS key // - 4501 - Stream's KMS key is disabled // - 4502 - Validation error on the stream's KMS key // - 4503 - KMS key specified in the stream is unavailable // - 4504 - Invalid usage of the KMS key specified in the stream // - 4505 - Invalid state of the KMS key specified in the stream // - 4506 - Unable to find the KMS key specified in the stream // - 5000 - Internal error Payload io.ReadCloser // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } func (c *Client) addOperationGetMediaMiddlewares(stack *middleware.Stack, options Options) (err error) { err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMedia{}, middleware.After) if err != nil { return err } err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMedia{}, middleware.After) if err != nil { return err } if err = addSetLoggerMiddleware(stack, options); err != nil { return err } if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { return err } if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { return err } if err = addResolveEndpointMiddleware(stack, options); err != nil { return err } if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { return err } if err = addRetryMiddlewares(stack, options); err != nil { return err } if err = addHTTPSignerV4Middleware(stack, options); err != nil { return err } if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { return err } if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { return err } if err = addClientUserAgent(stack); err != nil { return err } if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { return err } if err = addOpGetMediaValidationMiddleware(stack); err != nil { return err } if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMedia(options.Region), middleware.Before); err != nil { return err } if err = awsmiddleware.AddRecursionDetection(stack); err != nil { return err } if err = addRequestIDRetrieverMiddleware(stack); err != nil { return err } if err = addResponseErrorMiddleware(stack); err != nil { return err } if err = addRequestResponseLogging(stack, options); err != nil { return err } return nil } func newServiceMetadataMiddleware_opGetMedia(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, SigningName: "kinesisvideo", OperationName: "GetMedia", } }
190
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia import ( "bytes" "context" "encoding/json" "fmt" "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" "github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia/types" smithy "github.com/aws/smithy-go" smithyio "github.com/aws/smithy-go/io" "github.com/aws/smithy-go/middleware" "github.com/aws/smithy-go/ptr" smithyhttp "github.com/aws/smithy-go/transport/http" "io" "strings" ) type awsRestjson1_deserializeOpGetMedia struct { } func (*awsRestjson1_deserializeOpGetMedia) ID() string { return "OperationDeserializer" } func (m *awsRestjson1_deserializeOpGetMedia) 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_deserializeOpErrorGetMedia(response, &metadata) } output := &GetMediaOutput{} out.Result = output err = awsRestjson1_deserializeOpHttpBindingsGetMediaOutput(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_deserializeOpDocumentGetMediaOutput(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_deserializeOpErrorGetMedia(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("ClientLimitExceededException", errorCode): return awsRestjson1_deserializeErrorClientLimitExceededException(response, errorBody) case strings.EqualFold("ConnectionLimitExceededException", errorCode): return awsRestjson1_deserializeErrorConnectionLimitExceededException(response, errorBody) case strings.EqualFold("InvalidArgumentException", errorCode): return awsRestjson1_deserializeErrorInvalidArgumentException(response, errorBody) case strings.EqualFold("InvalidEndpointException", errorCode): return awsRestjson1_deserializeErrorInvalidEndpointException(response, errorBody) case strings.EqualFold("NotAuthorizedException", errorCode): return awsRestjson1_deserializeErrorNotAuthorizedException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) default: genericError := &smithy.GenericAPIError{ Code: errorCode, Message: errorMessage, } return genericError } } func awsRestjson1_deserializeOpHttpBindingsGetMediaOutput(v *GetMediaOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.ContentType = ptr.String(headerValues[0]) } return nil } func awsRestjson1_deserializeOpDocumentGetMediaOutput(v *GetMediaOutput, body io.ReadCloser) error { if v == nil { return fmt.Errorf("unsupported deserialization of nil %T", v) } v.Payload = body return nil } func awsRestjson1_deserializeErrorClientLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ClientLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentClientLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorConnectionLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ConnectionLimitExceededException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentConnectionLimitExceededException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidArgumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidArgumentException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidArgumentException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorInvalidEndpointException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.InvalidEndpointException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentInvalidEndpointException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.NotAuthorizedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentNotAuthorizedException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { output := &types.ResourceNotFoundException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } return err } errorBody.Seek(0, io.SeekStart) return output } func awsRestjson1_deserializeDocumentClientLimitExceededException(v **types.ClientLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ClientLimitExceededException if *v == nil { sv = &types.ClientLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentConnectionLimitExceededException(v **types.ConnectionLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.ConnectionLimitExceededException if *v == nil { sv = &types.ConnectionLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInvalidArgumentException(v **types.InvalidArgumentException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidArgumentException if *v == nil { sv = &types.InvalidArgumentException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentInvalidEndpointException(v **types.InvalidEndpointException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.InvalidEndpointException if *v == nil { sv = &types.InvalidEndpointException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %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.NotAuthorizedException if *v == nil { sv = &types.NotAuthorizedException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil } func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } if value == nil { return nil } shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } var sv *types.ResourceNotFoundException if *v == nil { sv = &types.ResourceNotFoundException{} } else { sv = *v } for key, value := range shape { switch key { case "Message": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } sv.Message = ptr.String(jtv) } default: _, _ = key, value } } *v = sv return nil }
605
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. // Package kinesisvideomedia provides the API client, operations, and parameter // types for Amazon Kinesis Video Streams Media. package kinesisvideomedia
6
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia import ( "context" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" internalendpoints "github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia/internal/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "net/url" "strings" ) // EndpointResolverOptions is the service endpoint resolver options type EndpointResolverOptions = internalendpoints.Options // EndpointResolver interface for resolving service endpoints. type EndpointResolver interface { ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) } var _ EndpointResolver = &internalendpoints.Resolver{} // NewDefaultEndpointResolver constructs a new service endpoint resolver func NewDefaultEndpointResolver() *internalendpoints.Resolver { return internalendpoints.New() } // EndpointResolverFunc is a helper utility that wraps a function so it satisfies // the EndpointResolver interface. This is useful when you want to add additional // endpoint resolving logic, or stub out specific endpoints with custom values. type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { return fn(region, options) } func resolveDefaultEndpointConfiguration(o *Options) { if o.EndpointResolver != nil { return } o.EndpointResolver = NewDefaultEndpointResolver() } // EndpointResolverFromURL returns an EndpointResolver configured using the // provided endpoint url. By default, the resolved endpoint resolver uses the // client region as signing region, and the endpoint source is set to // EndpointSourceCustom.You can provide functional options to configure endpoint // values for the resolved endpoint. func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} for _, fn := range optFns { fn(&e) } return EndpointResolverFunc( func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { if len(e.SigningRegion) == 0 { e.SigningRegion = region } return e, nil }, ) } type ResolveEndpoint struct { Resolver EndpointResolver Options EndpointResolverOptions } func (*ResolveEndpoint) ID() string { return "ResolveEndpoint" } func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { req, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) } if m.Resolver == nil { return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") } eo := m.Options eo.Logger = middleware.GetLogger(ctx) var endpoint aws.Endpoint endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) if err != nil { return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) } req.URL, err = url.Parse(endpoint.URL) if err != nil { return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) } if len(awsmiddleware.GetSigningName(ctx)) == 0 { signingName := endpoint.SigningName if len(signingName) == 0 { signingName = "kinesisvideo" } ctx = awsmiddleware.SetSigningName(ctx, signingName) } ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) return next.HandleSerialize(ctx, in) } func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { return stack.Serialize.Insert(&ResolveEndpoint{ Resolver: o.EndpointResolver, Options: o.EndpointOptions, }, "OperationSerializer", middleware.Before) } func removeResolveEndpointMiddleware(stack *middleware.Stack) error { _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) return err } type wrappedEndpointResolver struct { awsResolver aws.EndpointResolverWithOptions resolver EndpointResolver } func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { if w.awsResolver == nil { goto fallback } endpoint, err = w.awsResolver.ResolveEndpoint(ServiceID, region, options) if err == nil { return endpoint, nil } if nf := (&aws.EndpointNotFoundError{}); !errors.As(err, &nf) { return endpoint, err } fallback: if w.resolver == nil { return endpoint, fmt.Errorf("default endpoint resolver provided was nil") } return w.resolver.ResolveEndpoint(region, options) } type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { return a(service, region) } var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) // withEndpointResolver returns an EndpointResolver that first delegates endpoint resolution to the awsResolver. // If awsResolver returns aws.EndpointNotFoundError error, the resolver will use the the provided // fallbackResolver for resolution. // // fallbackResolver must not be nil func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions, fallbackResolver EndpointResolver) EndpointResolver { var resolver aws.EndpointResolverWithOptions if awsResolverWithOptions != nil { resolver = awsResolverWithOptions } else if awsResolver != nil { resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) } return &wrappedEndpointResolver{ awsResolver: resolver, resolver: fallbackResolver, } } func finalizeClientEndpointResolverOptions(options *Options) { options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() if len(options.EndpointOptions.ResolvedRegion) == 0 { const fipsInfix = "-fips-" const fipsPrefix = "fips-" const fipsSuffix = "-fips" if strings.Contains(options.Region, fipsInfix) || strings.Contains(options.Region, fipsPrefix) || strings.Contains(options.Region, fipsSuffix) { options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled } } }
201
aws-sdk-go-v2
aws
Go
// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. package kinesisvideomedia // goModuleVersion is the tagged release for this module const goModuleVersion = "1.11.13"
7
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia
4
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" ) type awsRestjson1_serializeOpGetMedia struct { } func (*awsRestjson1_serializeOpGetMedia) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetMedia) 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.(*GetMediaInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/getMedia") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentGetMediaInput(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_serializeOpHttpBindingsGetMediaInput(v *GetMediaInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGetMediaInput(v *GetMediaInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.StartSelector != nil { ok := object.Key("StartSelector") if err := awsRestjson1_serializeDocumentStartSelector(v.StartSelector, ok); err != nil { return err } } if v.StreamARN != nil { ok := object.Key("StreamARN") ok.String(*v.StreamARN) } if v.StreamName != nil { ok := object.Key("StreamName") ok.String(*v.StreamName) } return nil } func awsRestjson1_serializeDocumentStartSelector(v *types.StartSelector, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AfterFragmentNumber != nil { ok := object.Key("AfterFragmentNumber") ok.String(*v.AfterFragmentNumber) } if v.ContinuationToken != nil { ok := object.Key("ContinuationToken") ok.String(*v.ContinuationToken) } if len(v.StartSelectorType) > 0 { ok := object.Key("StartSelectorType") ok.String(string(v.StartSelectorType)) } if v.StartTimestamp != nil { ok := object.Key("StartTimestamp") ok.Double(smithytime.FormatEpochSeconds(*v.StartTimestamp)) } return nil }
124
aws-sdk-go-v2
aws
Go
// Code generated by smithy-go-codegen DO NOT EDIT. package kinesisvideomedia import ( "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/kinesisvideomedia/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) type validateOpGetMedia struct { } func (*validateOpGetMedia) ID() string { return "OperationInputValidation" } func (m *validateOpGetMedia) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { input, ok := in.Parameters.(*GetMediaInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } if err := validateOpGetMediaInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } func addOpGetMediaValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetMedia{}, middleware.After) } func validateStartSelector(v *types.StartSelector) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "StartSelector"} if len(v.StartSelectorType) == 0 { invalidParams.Add(smithy.NewErrParamRequired("StartSelectorType")) } if invalidParams.Len() > 0 { return invalidParams } else { return nil } } func validateOpGetMediaInput(v *GetMediaInput) error { if v == nil { return nil } invalidParams := smithy.InvalidParamsError{Context: "GetMediaInput"} if v.StartSelector == nil { invalidParams.Add(smithy.NewErrParamRequired("StartSelector")) } else if v.StartSelector != nil { if err := validateStartSelector(v.StartSelector); err != nil { invalidParams.AddNested("StartSelector", err.(smithy.InvalidParamsError)) } } if invalidParams.Len() > 0 { return invalidParams } else { return nil } }
70