From 6b963d71ea3b0e63acbbba67d6f2ad725af67f73 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Wed, 2 Oct 2024 18:33:25 +0000 Subject: [PATCH] Regenerated Clients --- .../0b894cd7cedf48bfaf3e09a2d673f943.json | 8 + .../2c808562e1714e25be608e11a90ab100.json | 8 + .../305f5c1aa22647878dfd3269866e1907.json | 8 + .../4a073370d024474f84979904bf98efce.json | 8 + .../5c4ef21f23a14ab0a7bfbf206808dfbe.json | 8 + .../640a24e79ae3487ea7dd740cbe05ac0e.json | 8 + .../b4020f081268437285571ca85e87124d.json | 8 + .../b458caece3074401ac0b18c781eadde2.json | 8 + .../ff36e6257e9144139cca84a368e7692a.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- service/appstream/types/enums.go | 2 + service/b2bi/api_op_CreatePartnership.go | 6 + .../api_op_CreateStarterMappingTemplate.go | 184 ++ service/b2bi/api_op_CreateTransformer.go | 133 +- service/b2bi/api_op_DeleteTransformer.go | 6 +- service/b2bi/api_op_GetPartnership.go | 4 + service/b2bi/api_op_GetTransformer.go | 65 +- service/b2bi/api_op_ListTransformers.go | 6 +- service/b2bi/api_op_StartTransformerJob.go | 2 +- service/b2bi/api_op_TestConversion.go | 171 ++ service/b2bi/api_op_TestMapping.go | 5 + service/b2bi/api_op_UpdatePartnership.go | 8 + service/b2bi/api_op_UpdateTransformer.go | 100 +- service/b2bi/deserializers.go | 1885 +++++++++++++---- service/b2bi/generated.json | 2 + service/b2bi/serializers.go | 646 ++++++ ...pi_op_CreateStarterMappingTemplate.go.snap | 41 + .../snapshot/api_op_TestConversion.go.snap | 41 + service/b2bi/snapshot_test.go | 48 + service/b2bi/types/enums.go | 133 +- service/b2bi/types/types.go | 465 +++- service/b2bi/types/types_exported_test.go | 108 + service/b2bi/validators.go | 237 ++- .../bedrock/internal/endpoints/endpoints.go | 54 + service/bedrockagentruntime/deserializers.go | 20 + service/bedrockagentruntime/types/types.go | 31 +- .../bedrockruntime/api_op_ApplyGuardrail.go | 3 + service/bedrockruntime/deserializers.go | 384 +++- service/bedrockruntime/types/enums.go | 24 + service/bedrockruntime/types/types.go | 42 + .../firehose/internal/endpoints/endpoints.go | 198 ++ service/iotdeviceadvisor/api_client.go | 16 + .../api_op_CreateSuiteDefinition.go | 41 + service/iotdeviceadvisor/options.go | 4 + service/iotdeviceadvisor/serializers.go | 5 + .../api_op_CreateSuiteDefinition.go.snap | 1 + service/ivsrealtime/types/enums.go | 6 + service/ivsrealtime/types/types.go | 64 +- service/s3/api_op_CompleteMultipartUpload.go | 10 +- .../api_op_GetBucketLifecycleConfiguration.go | 16 + service/s3/api_op_GetObject.go | 4 +- service/s3/api_op_HeadObject.go | 7 +- .../api_op_PutBucketLifecycleConfiguration.go | 51 +- service/s3/api_op_PutObject.go | 10 +- service/s3/api_op_UploadPart.go | 10 +- service/s3/api_op_WriteGetObjectResponse.go | 4 +- service/s3/deserializers.go | 37 +- service/s3/serializers.go | 5 + service/s3/types/enums.go | 20 + service/s3/types/types.go | 24 +- service/sagemaker/api_op_DescribeApp.go | 3 + service/sagemaker/deserializers.go | 27 + service/sagemaker/serializers.go | 10 + service/sagemaker/types/types.go | 10 + service/workspaces/api_op_CreateWorkspaces.go | 4 +- .../workspaces/api_op_ImportWorkspaceImage.go | 16 +- service/workspaces/types/types.go | 3 +- 67 files changed, 4870 insertions(+), 666 deletions(-) create mode 100644 .changelog/0b894cd7cedf48bfaf3e09a2d673f943.json create mode 100644 .changelog/2c808562e1714e25be608e11a90ab100.json create mode 100644 .changelog/305f5c1aa22647878dfd3269866e1907.json create mode 100644 .changelog/4a073370d024474f84979904bf98efce.json create mode 100644 .changelog/5c4ef21f23a14ab0a7bfbf206808dfbe.json create mode 100644 .changelog/640a24e79ae3487ea7dd740cbe05ac0e.json create mode 100644 .changelog/b4020f081268437285571ca85e87124d.json create mode 100644 .changelog/b458caece3074401ac0b18c781eadde2.json create mode 100644 .changelog/ff36e6257e9144139cca84a368e7692a.json create mode 100644 service/b2bi/api_op_CreateStarterMappingTemplate.go create mode 100644 service/b2bi/api_op_TestConversion.go create mode 100644 service/b2bi/snapshot/api_op_CreateStarterMappingTemplate.go.snap create mode 100644 service/b2bi/snapshot/api_op_TestConversion.go.snap diff --git a/.changelog/0b894cd7cedf48bfaf3e09a2d673f943.json b/.changelog/0b894cd7cedf48bfaf3e09a2d673f943.json new file mode 100644 index 00000000000..745865ab0be --- /dev/null +++ b/.changelog/0b894cd7cedf48bfaf3e09a2d673f943.json @@ -0,0 +1,8 @@ +{ + "id": "0b894cd7-cedf-48bf-af3e-09a2d673f943", + "type": "feature", + "description": "Add clientToken attribute and implement idempotency for CreateSuiteDefinition.", + "modules": [ + "service/iotdeviceadvisor" + ] +} \ No newline at end of file diff --git a/.changelog/2c808562e1714e25be608e11a90ab100.json b/.changelog/2c808562e1714e25be608e11a90ab100.json new file mode 100644 index 00000000000..841299d884a --- /dev/null +++ b/.changelog/2c808562e1714e25be608e11a90ab100.json @@ -0,0 +1,8 @@ +{ + "id": "2c808562-e171-4e25-be60-8e11a90ab100", + "type": "feature", + "description": "Added support for Automatic Time Zone Redirection on Amazon AppStream 2.0", + "modules": [ + "service/appstream" + ] +} \ No newline at end of file diff --git a/.changelog/305f5c1aa22647878dfd3269866e1907.json b/.changelog/305f5c1aa22647878dfd3269866e1907.json new file mode 100644 index 00000000000..102dbd4cadc --- /dev/null +++ b/.changelog/305f5c1aa22647878dfd3269866e1907.json @@ -0,0 +1,8 @@ +{ + "id": "305f5c1a-a226-4787-8dfd-3269866e1907", + "type": "documentation", + "description": "WSP is being rebranded to become DCV.", + "modules": [ + "service/workspaces" + ] +} \ No newline at end of file diff --git a/.changelog/4a073370d024474f84979904bf98efce.json b/.changelog/4a073370d024474f84979904bf98efce.json new file mode 100644 index 00000000000..1085dc6fa21 --- /dev/null +++ b/.changelog/4a073370d024474f84979904bf98efce.json @@ -0,0 +1,8 @@ +{ + "id": "4a073370-d024-474f-8497-9904bf98efce", + "type": "feature", + "description": "Added new fields to Amazon Bedrock Guardrails trace", + "modules": [ + "service/bedrockruntime" + ] +} \ No newline at end of file diff --git a/.changelog/5c4ef21f23a14ab0a7bfbf206808dfbe.json b/.changelog/5c4ef21f23a14ab0a7bfbf206808dfbe.json new file mode 100644 index 00000000000..0197acd7cde --- /dev/null +++ b/.changelog/5c4ef21f23a14ab0a7bfbf206808dfbe.json @@ -0,0 +1,8 @@ +{ + "id": "5c4ef21f-23a1-4ab0-a7bf-bf206808dfbe", + "type": "feature", + "description": "Added raw model response and usage metrics to PreProcessing and PostProcessing Trace", + "modules": [ + "service/bedrockagentruntime" + ] +} \ No newline at end of file diff --git a/.changelog/640a24e79ae3487ea7dd740cbe05ac0e.json b/.changelog/640a24e79ae3487ea7dd740cbe05ac0e.json new file mode 100644 index 00000000000..5e93769728d --- /dev/null +++ b/.changelog/640a24e79ae3487ea7dd740cbe05ac0e.json @@ -0,0 +1,8 @@ +{ + "id": "640a24e7-9ae3-487e-a7dd-740cbe05ac0e", + "type": "feature", + "description": "This release introduces a header representing the minimum object size limit for Lifecycle transitions.", + "modules": [ + "service/s3" + ] +} \ No newline at end of file diff --git a/.changelog/b4020f081268437285571ca85e87124d.json b/.changelog/b4020f081268437285571ca85e87124d.json new file mode 100644 index 00000000000..9b1285fe320 --- /dev/null +++ b/.changelog/b4020f081268437285571ca85e87124d.json @@ -0,0 +1,8 @@ +{ + "id": "b4020f08-1268-4372-8557-1ca85e87124d", + "type": "feature", + "description": "releasing builtinlcc to public", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/b458caece3074401ac0b18c781eadde2.json b/.changelog/b458caece3074401ac0b18c781eadde2.json new file mode 100644 index 00000000000..c944e9758b1 --- /dev/null +++ b/.changelog/b458caece3074401ac0b18c781eadde2.json @@ -0,0 +1,8 @@ +{ + "id": "b458caec-e307-4401-ac0b-18c781eadde2", + "type": "feature", + "description": "Added and updated APIs to support outbound EDI transformations", + "modules": [ + "service/b2bi" + ] +} \ No newline at end of file diff --git a/.changelog/ff36e6257e9144139cca84a368e7692a.json b/.changelog/ff36e6257e9144139cca84a368e7692a.json new file mode 100644 index 00000000000..81739436527 --- /dev/null +++ b/.changelog/ff36e6257e9144139cca84a368e7692a.json @@ -0,0 +1,8 @@ +{ + "id": "ff36e625-7e91-4413-9cca-84a368e7692a", + "type": "feature", + "description": "Adds new Stage Health EventErrorCodes applicable to RTMP(S) broadcasts. Bug Fix: Enforces that EncoderConfiguration Video height and width must be even-number values.", + "modules": [ + "service/ivsrealtime" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 3d2f3cf52ad..113a2f3cd9a 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.14.25" +const goModuleVersion = "1.15.8" diff --git a/service/appstream/types/enums.go b/service/appstream/types/enums.go index 140954dfce9..554520209f2 100644 --- a/service/appstream/types/enums.go +++ b/service/appstream/types/enums.go @@ -30,6 +30,7 @@ const ( ActionPrintingToLocalDevice Action = "PRINTING_TO_LOCAL_DEVICE" ActionDomainPasswordSignin Action = "DOMAIN_PASSWORD_SIGNIN" ActionDomainSmartCardSignin Action = "DOMAIN_SMART_CARD_SIGNIN" + ActionAutoTimeZoneRedirection Action = "AUTO_TIME_ZONE_REDIRECTION" ) // Values returns all known values for Action. Note that this can be expanded in @@ -45,6 +46,7 @@ func (Action) Values() []Action { "PRINTING_TO_LOCAL_DEVICE", "DOMAIN_PASSWORD_SIGNIN", "DOMAIN_SMART_CARD_SIGNIN", + "AUTO_TIME_ZONE_REDIRECTION", } } diff --git a/service/b2bi/api_op_CreatePartnership.go b/service/b2bi/api_op_CreatePartnership.go index fb156007a05..89b2deb900e 100644 --- a/service/b2bi/api_op_CreatePartnership.go +++ b/service/b2bi/api_op_CreatePartnership.go @@ -54,6 +54,9 @@ type CreatePartnershipInput struct { // This member is required. ProfileId *string + // Specify the structure that contains the details for the associated capabilities. + CapabilityOptions *types.CapabilityOptions + // Reserved for future use. ClientToken *string @@ -95,6 +98,9 @@ type CreatePartnershipOutput struct { // Returns one or more capabilities associated with this partnership. Capabilities []string + // Returns the structure that contains the details for the associated capabilities. + CapabilityOptions *types.CapabilityOptions + // Returns the email address associated with this trading partner. Email *string diff --git a/service/b2bi/api_op_CreateStarterMappingTemplate.go b/service/b2bi/api_op_CreateStarterMappingTemplate.go new file mode 100644 index 00000000000..de0f1bc51a4 --- /dev/null +++ b/service/b2bi/api_op_CreateStarterMappingTemplate.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package b2bi + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/b2bi/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Amazon Web Services B2B Data Interchange uses a mapping template in JSONata or +// XSLT format to transform a customer input file into a JSON or XML file that can +// be converted to EDI. +// +// If you provide a sample EDI file with the same structure as the EDI files that +// you wish to generate, then the service can generate a mapping template. The +// starter template contains placeholder values which you can replace with JSONata +// or XSLT expressions to take data from your input file and insert it into the +// JSON or XML file that is used to generate the EDI. +// +// If you do not provide a sample EDI file, then the service can generate a +// mapping template based on the EDI settings in the templateDetails parameter. +// +// Currently, we only support generating a template that can generate the input to +// produce an Outbound X12 EDI file. +func (c *Client) CreateStarterMappingTemplate(ctx context.Context, params *CreateStarterMappingTemplateInput, optFns ...func(*Options)) (*CreateStarterMappingTemplateOutput, error) { + if params == nil { + params = &CreateStarterMappingTemplateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateStarterMappingTemplate", params, optFns, c.addOperationCreateStarterMappingTemplateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateStarterMappingTemplateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateStarterMappingTemplateInput struct { + + // Specify the format for the mapping template: either JSONATA or XSLT. + // + // This member is required. + MappingType types.MappingType + + // Describes the details needed for generating the template. Specify the X12 + // transaction set and version for which the template is used: currently, we only + // support X12. + // + // This member is required. + TemplateDetails types.TemplateDetails + + // Specify the location of the sample EDI file that is used to generate the + // mapping template. + OutputSampleLocation *types.S3Location + + noSmithyDocumentSerde +} + +type CreateStarterMappingTemplateOutput struct { + + // Returns a string that represents the mapping template. + // + // This member is required. + MappingTemplate *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateStarterMappingTemplateMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateStarterMappingTemplate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateStarterMappingTemplate{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateStarterMappingTemplate"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpCreateStarterMappingTemplateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateStarterMappingTemplate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateStarterMappingTemplate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateStarterMappingTemplate", + } +} diff --git a/service/b2bi/api_op_CreateTransformer.go b/service/b2bi/api_op_CreateTransformer.go index 6906ed8fc7e..efc551ccb87 100644 --- a/service/b2bi/api_op_CreateTransformer.go +++ b/service/b2bi/api_op_CreateTransformer.go @@ -12,8 +12,30 @@ import ( "time" ) -// Creates a transformer. A transformer describes how to process the incoming EDI -// documents and extract the necessary information to the output file. +// Creates a transformer. Amazon Web Services B2B Data Interchange currently +// supports two scenarios: +// +// - Inbound EDI: the Amazon Web Services customer receives an EDI file from +// their trading partner. Amazon Web Services B2B Data Interchange converts this +// EDI file into a JSON or XML file with a service-defined structure. A mapping +// template provided by the customer, in JSONata or XSLT format, is optionally +// applied to this file to produce a JSON or XML file with the structure the +// customer requires. +// +// - Outbound EDI: the Amazon Web Services customer has a JSON or XML file +// containing data that they wish to use in an EDI file. A mapping template, +// provided by the customer (in either JSONata or XSLT format) is applied to this +// file to generate a JSON or XML file in the service-defined structure. This file +// is then converted to an EDI file. +// +// The following fields are provided for backwards compatibility only: fileFormat , +// mappingTemplate , ediType , and sampleDocument . +// +// - Use the mapping data type in place of mappingTemplate and fileFormat +// +// - Use the sampleDocuments data type in place of sampleDocument +// +// - Use either the inputConversion or outputConversion in place of ediType func (c *Client) CreateTransformer(ctx context.Context, params *CreateTransformerInput, optFns ...func(*Options)) (*CreateTransformerOutput, error) { if params == nil { params = &CreateTransformerInput{} @@ -31,37 +53,64 @@ func (c *Client) CreateTransformer(ctx context.Context, params *CreateTransforme type CreateTransformerInput struct { + // Specifies the name of the transformer, used to identify it. + // + // This member is required. + Name *string + + // Reserved for future use. + ClientToken *string + // Specifies the details for the EDI standard that is being used for the // transformer. Currently, only X12 is supported. X12 is a set of standards and // corresponding messages that define specific business documents. // - // This member is required. + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. EdiType types.EdiType // Specifies that the currently supported file formats for EDI transformations are // JSON and XML . // - // This member is required. + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. FileFormat types.FileFormat + // Specify the InputConversion object, which contains the format options for the + // inbound transformation. + InputConversion *types.InputConversion + + // Specify the structure that contains the mapping template and its language + // (either XSLT or JSONATA). + Mapping *types.Mapping + // Specifies the mapping template for the transformer. This template is used to // map the parsed EDI file using JSONata or XSLT. // - // This member is required. - MappingTemplate *string - - // Specifies the name of the transformer, used to identify it. + // This parameter is available for backwards compatibility. Use the [Mapping] data type + // instead. // - // This member is required. - Name *string + // [Mapping]: https://docs.aws.amazon.com/b2bi/latest/APIReference/API_Mapping.html + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + MappingTemplate *string - // Reserved for future use. - ClientToken *string + // A structure that contains the OutputConversion object, which contains the + // format options for the outbound transformation. + OutputConversion *types.OutputConversion // Specifies a sample EDI document that is used by a transformer as a guide for // processing the EDI data. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. SampleDocument *string + // Specify a structure that contains the Amazon S3 bucket and an array of the + // corresponding keys used to identify the location for your sample documents. + SampleDocuments *types.SampleDocuments + // Specifies the key-value pairs assigned to ARNs that you can use to group and // search for resources by type. You can attach this metadata to resources // (capabilities, partnerships, and so on) for any purpose. @@ -77,25 +126,6 @@ type CreateTransformerOutput struct { // This member is required. CreatedAt *time.Time - // Returns the details for the EDI standard that is being used for the - // transformer. Currently, only X12 is supported. X12 is a set of standards and - // corresponding messages that define specific business documents. - // - // This member is required. - EdiType types.EdiType - - // Returns that the currently supported file formats for EDI transformations are - // JSON and XML . - // - // This member is required. - FileFormat types.FileFormat - - // Returns the mapping template for the transformer. This template is used to map - // the parsed EDI file using JSONata or XSLT. - // - // This member is required. - MappingTemplate *string - // Returns the name of the transformer, used to identify it. // // This member is required. @@ -119,10 +149,51 @@ type CreateTransformerOutput struct { // This member is required. TransformerId *string + // Returns the details for the EDI standard that is being used for the + // transformer. Currently, only X12 is supported. X12 is a set of standards and + // corresponding messages that define specific business documents. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + EdiType types.EdiType + + // Returns that the currently supported file formats for EDI transformations are + // JSON and XML . + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + FileFormat types.FileFormat + + // Returns the InputConversion object, which contains the format options for the + // inbound transformation. + InputConversion *types.InputConversion + + // Returns the structure that contains the mapping template and its language + // (either XSLT or JSONATA). + Mapping *types.Mapping + + // Returns the mapping template for the transformer. This template is used to map + // the parsed EDI file using JSONata or XSLT. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + MappingTemplate *string + + // Returns the OutputConversion object, which contains the format options for the + // outbound transformation. + OutputConversion *types.OutputConversion + // Returns a sample EDI document that is used by a transformer as a guide for // processing the EDI data. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. SampleDocument *string + // Returns a structure that contains the Amazon S3 bucket and an array of the + // corresponding keys used to identify the location for your sample documents. + SampleDocuments *types.SampleDocuments + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/b2bi/api_op_DeleteTransformer.go b/service/b2bi/api_op_DeleteTransformer.go index 168624f43cb..eba2d2de69e 100644 --- a/service/b2bi/api_op_DeleteTransformer.go +++ b/service/b2bi/api_op_DeleteTransformer.go @@ -10,8 +10,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified transformer. A transformer describes how to process the -// incoming EDI documents and extract the necessary information to the output file. +// Deletes the specified transformer. A transformer can take an EDI file as input +// and transform it into a JSON-or XML-formatted document. Alternatively, a +// transformer can take a JSON-or XML-formatted document as input and transform it +// into an EDI file. func (c *Client) DeleteTransformer(ctx context.Context, params *DeleteTransformerInput, optFns ...func(*Options)) (*DeleteTransformerOutput, error) { if params == nil { params = &DeleteTransformerInput{} diff --git a/service/b2bi/api_op_GetPartnership.go b/service/b2bi/api_op_GetPartnership.go index 33a4c3d56ee..6f5a7501c33 100644 --- a/service/b2bi/api_op_GetPartnership.go +++ b/service/b2bi/api_op_GetPartnership.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/b2bi/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" @@ -66,6 +67,9 @@ type GetPartnershipOutput struct { // Returns one or more capabilities associated with this partnership. Capabilities []string + // Contains the details for an Outbound EDI capability. + CapabilityOptions *types.CapabilityOptions + // Returns the email address associated with this trading partner. Email *string diff --git a/service/b2bi/api_op_GetTransformer.go b/service/b2bi/api_op_GetTransformer.go index 256955add79..6ef822b21e1 100644 --- a/service/b2bi/api_op_GetTransformer.go +++ b/service/b2bi/api_op_GetTransformer.go @@ -13,8 +13,9 @@ import ( ) // Retrieves the details for the transformer specified by the transformer ID. A -// transformer describes how to process the incoming EDI documents and extract the -// necessary information to the output file. +// transformer can take an EDI file as input and transform it into a JSON-or +// XML-formatted document. Alternatively, a transformer can take a JSON-or +// XML-formatted document as input and transform it into an EDI file. func (c *Client) GetTransformer(ctx context.Context, params *GetTransformerInput, optFns ...func(*Options)) (*GetTransformerOutput, error) { if params == nil { params = &GetTransformerInput{} @@ -47,25 +48,6 @@ type GetTransformerOutput struct { // This member is required. CreatedAt *time.Time - // Returns the details for the EDI standard that is being used for the - // transformer. Currently, only X12 is supported. X12 is a set of standards and - // corresponding messages that define specific business documents. - // - // This member is required. - EdiType types.EdiType - - // Returns that the currently supported file formats for EDI transformations are - // JSON and XML . - // - // This member is required. - FileFormat types.FileFormat - - // Returns the mapping template for the transformer. This template is used to map - // the parsed EDI file using JSONata or XSLT. - // - // This member is required. - MappingTemplate *string - // Returns the name of the transformer, used to identify it. // // This member is required. @@ -89,13 +71,54 @@ type GetTransformerOutput struct { // This member is required. TransformerId *string + // Returns the details for the EDI standard that is being used for the + // transformer. Currently, only X12 is supported. X12 is a set of standards and + // corresponding messages that define specific business documents. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + EdiType types.EdiType + + // Returns that the currently supported file formats for EDI transformations are + // JSON and XML . + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + FileFormat types.FileFormat + + // Returns the InputConversion object, which contains the format options for the + // inbound transformation. + InputConversion *types.InputConversion + + // Returns the structure that contains the mapping template and its language + // (either XSLT or JSONATA). + Mapping *types.Mapping + + // Returns the mapping template for the transformer. This template is used to map + // the parsed EDI file using JSONata or XSLT. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + MappingTemplate *string + // Returns a timestamp for last time the transformer was modified. ModifiedAt *time.Time + // Returns the OutputConversion object, which contains the format options for the + // outbound transformation. + OutputConversion *types.OutputConversion + // Returns a sample EDI document that is used by a transformer as a guide for // processing the EDI data. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. SampleDocument *string + // Returns a structure that contains the Amazon S3 bucket and an array of the + // corresponding keys used to identify the location for your sample documents. + SampleDocuments *types.SampleDocuments + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/b2bi/api_op_ListTransformers.go b/service/b2bi/api_op_ListTransformers.go index e4efc67813a..726ca027e43 100644 --- a/service/b2bi/api_op_ListTransformers.go +++ b/service/b2bi/api_op_ListTransformers.go @@ -11,8 +11,10 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Lists the available transformers. A transformer describes how to process the -// incoming EDI documents and extract the necessary information to the output file. +// Lists the available transformers. A transformer can take an EDI file as input +// and transform it into a JSON-or XML-formatted document. Alternatively, a +// transformer can take a JSON-or XML-formatted document as input and transform it +// into an EDI file. func (c *Client) ListTransformers(ctx context.Context, params *ListTransformersInput, optFns ...func(*Options)) (*ListTransformersOutput, error) { if params == nil { params = &ListTransformersInput{} diff --git a/service/b2bi/api_op_StartTransformerJob.go b/service/b2bi/api_op_StartTransformerJob.go index cd9608d71cd..591b952bb0a 100644 --- a/service/b2bi/api_op_StartTransformerJob.go +++ b/service/b2bi/api_op_StartTransformerJob.go @@ -12,7 +12,7 @@ import ( ) // Runs a job, using a transformer, to parse input EDI (electronic data -// interchange) file into the output structures used by Amazon Web Services B2BI +// interchange) file into the output structures used by Amazon Web Services B2B // Data Interchange. // // If you only want to transform EDI (electronic data interchange) documents, you diff --git a/service/b2bi/api_op_TestConversion.go b/service/b2bi/api_op_TestConversion.go new file mode 100644 index 00000000000..51bc76261c5 --- /dev/null +++ b/service/b2bi/api_op_TestConversion.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package b2bi + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/b2bi/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation mimics the latter half of a typical Outbound EDI request. It +// takes an input JSON/XML in the B2Bi shape as input, converts it to an X12 EDI +// string, and return that string. +func (c *Client) TestConversion(ctx context.Context, params *TestConversionInput, optFns ...func(*Options)) (*TestConversionOutput, error) { + if params == nil { + params = &TestConversionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestConversion", params, optFns, c.addOperationTestConversionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestConversionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestConversionInput struct { + + // Specify the source file for an outbound EDI request. + // + // This member is required. + Source *types.ConversionSource + + // Specify the format (X12 is the only currently supported format), and other + // details for the conversion target. + // + // This member is required. + Target *types.ConversionTarget + + noSmithyDocumentSerde +} + +type TestConversionOutput struct { + + // Returns the converted file content. + // + // This member is required. + ConvertedFileContent *string + + // Returns an array of strings, each containing a message that Amazon Web Services + // B2B Data Interchange generates during the conversion. + ValidationMessages []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestConversionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpTestConversion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpTestConversion{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TestConversion"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpTestConversionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestConversion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestConversion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestConversion", + } +} diff --git a/service/b2bi/api_op_TestMapping.go b/service/b2bi/api_op_TestMapping.go index 8b60b5a6281..c2c75fef0e4 100644 --- a/service/b2bi/api_op_TestMapping.go +++ b/service/b2bi/api_op_TestMapping.go @@ -46,6 +46,11 @@ type TestMappingInput struct { // Specifies the mapping template for the transformer. This template is used to // map the parsed EDI file using JSONata or XSLT. // + // This parameter is available for backwards compatibility. Use the [Mapping] data type + // instead. + // + // [Mapping]: https://docs.aws.amazon.com/b2bi/latest/APIReference/API_Mapping.html + // // This member is required. MappingTemplate *string diff --git a/service/b2bi/api_op_UpdatePartnership.go b/service/b2bi/api_op_UpdatePartnership.go index b1a078da21f..5969592b6c4 100644 --- a/service/b2bi/api_op_UpdatePartnership.go +++ b/service/b2bi/api_op_UpdatePartnership.go @@ -6,6 +6,7 @@ import ( "context" "fmt" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/b2bi/types" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "time" @@ -39,6 +40,10 @@ type UpdatePartnershipInput struct { // List of the capabilities associated with this partnership. Capabilities []string + // To update, specify the structure that contains the details for the associated + // capabilities. + CapabilityOptions *types.CapabilityOptions + // The name of the partnership, used to identify it. Name *string @@ -73,6 +78,9 @@ type UpdatePartnershipOutput struct { // Returns one or more capabilities associated with this partnership. Capabilities []string + // Returns the structure that contains the details for the associated capabilities. + CapabilityOptions *types.CapabilityOptions + // Returns the email address associated with this trading partner. Email *string diff --git a/service/b2bi/api_op_UpdateTransformer.go b/service/b2bi/api_op_UpdateTransformer.go index e6334b68ba4..d4a91e957fe 100644 --- a/service/b2bi/api_op_UpdateTransformer.go +++ b/service/b2bi/api_op_UpdateTransformer.go @@ -12,9 +12,10 @@ import ( "time" ) -// Updates the specified parameters for a transformer. A transformer describes how -// to process the incoming EDI documents and extract the necessary information to -// the output file. +// Updates the specified parameters for a transformer. A transformer can take an +// EDI file as input and transform it into a JSON-or XML-formatted document. +// Alternatively, a transformer can take a JSON-or XML-formatted document as input +// and transform it into an EDI file. func (c *Client) UpdateTransformer(ctx context.Context, params *UpdateTransformerInput, optFns ...func(*Options)) (*UpdateTransformerOutput, error) { if params == nil { params = &UpdateTransformerInput{} @@ -40,23 +41,56 @@ type UpdateTransformerInput struct { // Specifies the details for the EDI standard that is being used for the // transformer. Currently, only X12 is supported. X12 is a set of standards and // corresponding messages that define specific business documents. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. EdiType types.EdiType // Specifies that the currently supported file formats for EDI transformations are // JSON and XML . + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. FileFormat types.FileFormat + // To update, specify the InputConversion object, which contains the format + // options for the inbound transformation. + InputConversion *types.InputConversion + + // Specify the structure that contains the mapping template and its language + // (either XSLT or JSONATA). + Mapping *types.Mapping + // Specifies the mapping template for the transformer. This template is used to // map the parsed EDI file using JSONata or XSLT. + // + // This parameter is available for backwards compatibility. Use the [Mapping] data type + // instead. + // + // [Mapping]: https://docs.aws.amazon.com/b2bi/latest/APIReference/API_Mapping.html + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. MappingTemplate *string // Specify a new name for the transformer, if you want to update it. Name *string + // To update, specify the OutputConversion object, which contains the format + // options for the outbound transformation. + OutputConversion *types.OutputConversion + // Specifies a sample EDI document that is used by a transformer as a guide for // processing the EDI data. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. SampleDocument *string + // Specify a structure that contains the Amazon S3 bucket and an array of the + // corresponding keys used to identify the location for your sample documents. + SampleDocuments *types.SampleDocuments + // Specifies the transformer's status. You can update the state of the // transformer, from active to inactive , or inactive to active . Status types.TransformerStatus @@ -71,25 +105,6 @@ type UpdateTransformerOutput struct { // This member is required. CreatedAt *time.Time - // Returns the details for the EDI standard that is being used for the - // transformer. Currently, only X12 is supported. X12 is a set of standards and - // corresponding messages that define specific business documents. - // - // This member is required. - EdiType types.EdiType - - // Returns that the currently supported file formats for EDI transformations are - // JSON and XML . - // - // This member is required. - FileFormat types.FileFormat - - // Returns the mapping template for the transformer. This template is used to map - // the parsed EDI file using JSONata or XSLT. - // - // This member is required. - MappingTemplate *string - // Returns a timestamp for last time the transformer was modified. // // This member is required. @@ -118,10 +133,51 @@ type UpdateTransformerOutput struct { // This member is required. TransformerId *string + // Returns the details for the EDI standard that is being used for the + // transformer. Currently, only X12 is supported. X12 is a set of standards and + // corresponding messages that define specific business documents. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + EdiType types.EdiType + + // Returns that the currently supported file formats for EDI transformations are + // JSON and XML . + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + FileFormat types.FileFormat + + // Returns the InputConversion object, which contains the format options for the + // inbound transformation. + InputConversion *types.InputConversion + + // Returns the structure that contains the mapping template and its language + // (either XSLT or JSONATA). + Mapping *types.Mapping + + // Returns the mapping template for the transformer. This template is used to map + // the parsed EDI file using JSONata or XSLT. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + MappingTemplate *string + + // Returns the OutputConversion object, which contains the format options for the + // outbound transformation. + OutputConversion *types.OutputConversion + // Returns a sample EDI document that is used by a transformer as a guide for // processing the EDI data. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. SampleDocument *string + // Returns a structure that contains the Amazon S3 bucket and an array of the + // corresponding keys used to identify the location for your sample documents. + SampleDocuments *types.SampleDocuments + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/b2bi/deserializers.go b/service/b2bi/deserializers.go index 69dafd8ec1c..74fee532002 100644 --- a/service/b2bi/deserializers.go +++ b/service/b2bi/deserializers.go @@ -417,6 +417,126 @@ func awsAwsjson10_deserializeOpErrorCreateProfile(response *smithyhttp.Response, } } +type awsAwsjson10_deserializeOpCreateStarterMappingTemplate struct { +} + +func (*awsAwsjson10_deserializeOpCreateStarterMappingTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpCreateStarterMappingTemplate) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorCreateStarterMappingTemplate(response, &metadata) + } + output := &CreateStarterMappingTemplateOutput{} + 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 = awsAwsjson10_deserializeOpDocumentCreateStarterMappingTemplateOutput(&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 awsAwsjson10_deserializeOpErrorCreateStarterMappingTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpCreateTransformer struct { } @@ -2401,6 +2521,129 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } +type awsAwsjson10_deserializeOpTestConversion struct { +} + +func (*awsAwsjson10_deserializeOpTestConversion) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpTestConversion) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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, awsAwsjson10_deserializeOpErrorTestConversion(response, &metadata) + } + output := &TestConversionOutput{} + 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 = awsAwsjson10_deserializeOpDocumentTestConversionOutput(&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 awsAwsjson10_deserializeOpErrorTestConversion(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson10_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson10_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpTestMapping struct { } @@ -3617,7 +3860,7 @@ func awsAwsjson10_deserializeDocumentCapabilityList(v *[]types.CapabilitySummary return nil } -func awsAwsjson10_deserializeDocumentCapabilitySummary(v **types.CapabilitySummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentCapabilityOptions(v **types.CapabilityOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3630,39 +3873,75 @@ func awsAwsjson10_deserializeDocumentCapabilitySummary(v **types.CapabilitySumma return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CapabilitySummary + var sv *types.CapabilityOptions if *v == nil { - sv = &types.CapabilitySummary{} + sv = &types.CapabilityOptions{} } else { sv = *v } for key, value := range shape { switch key { - case "capabilityId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CapabilityId to be of type string, got %T instead", value) - } - sv.CapabilityId = ptr.String(jtv) + case "outboundEdi": + if err := awsAwsjson10_deserializeDocumentOutboundEdiOptions(&sv.OutboundEdi, value); err != nil { + return err } - case "createdAt": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) - } + default: + _, _ = key, value - case "modifiedAt": - if value != nil { + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCapabilitySummary(v **types.CapabilitySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.CapabilitySummary + if *v == nil { + sv = &types.CapabilitySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "capabilityId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityId to be of type string, got %T instead", value) + } + sv.CapabilityId = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "modifiedAt": + if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ModifiedDate to be of type string, got %T instead", value) @@ -3763,6 +4042,15 @@ func awsAwsjson10_deserializeDocumentEdiConfiguration(v **types.EdiConfiguration for key, value := range shape { switch key { + case "capabilityDirection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CapabilityDirection to be of type string, got %T instead", value) + } + sv.CapabilityDirection = types.CapabilityDirection(jtv) + } + case "inputLocation": if err := awsAwsjson10_deserializeDocumentS3Location(&sv.InputLocation, value); err != nil { return err @@ -3836,7 +4124,7 @@ loop: return nil } -func awsAwsjson10_deserializeDocumentInstructionsDocuments(v *[]types.S3Location, value interface{}) error { +func awsAwsjson10_deserializeDocumentFormatOptions(v *types.FormatOptions, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3844,33 +4132,39 @@ func awsAwsjson10_deserializeDocumentInstructionsDocuments(v *[]types.S3Location return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.S3Location - if *v == nil { - cv = []types.S3Location{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.S3Location - destAddr := &col - if err := awsAwsjson10_deserializeDocumentS3Location(&destAddr, value); err != nil { - return err + var uv types.FormatOptions +loop: + for key, value := range shape { + if value == nil { + continue } - col = *destAddr - cv = append(cv, col) + switch key { + case "x12": + var mv types.X12Details + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentX12Details(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.FormatOptionsMemberX12{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + } } - *v = cv + *v = uv return nil } -func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { +func awsAwsjson10_deserializeDocumentInputConversion(v **types.InputConversion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3883,35 +4177,27 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.InternalServerException + var sv *types.InputConversion if *v == nil { - sv = &types.InternalServerException{} + sv = &types.InputConversion{} } 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 "formatOptions": + if err := awsAwsjson10_deserializeDocumentFormatOptions(&sv.FormatOptions, value); err != nil { + return err } - case "retryAfterSeconds": + case "fromFormat": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected FromFormat to be of type string, got %T instead", value) } - sv.RetryAfterSeconds = ptr.Int32(int32(i64)) + sv.FromFormat = types.FromFormat(jtv) } default: @@ -3923,43 +4209,7 @@ func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalS return nil } -func awsAwsjson10_deserializeDocumentPartnershipCapabilities(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 CapabilityId to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson10_deserializeDocumentPartnershipList(v *[]types.PartnershipSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentInstructionsDocuments(v *[]types.S3Location, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3972,17 +4222,17 @@ func awsAwsjson10_deserializeDocumentPartnershipList(v *[]types.PartnershipSumma return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PartnershipSummary + var cv []types.S3Location if *v == nil { - cv = []types.PartnershipSummary{} + cv = []types.S3Location{} } else { cv = *v } for _, value := range shape { - var col types.PartnershipSummary + var col types.S3Location destAddr := &col - if err := awsAwsjson10_deserializeDocumentPartnershipSummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentS3Location(&destAddr, value); err != nil { return err } col = *destAddr @@ -3993,7 +4243,7 @@ func awsAwsjson10_deserializeDocumentPartnershipList(v *[]types.PartnershipSumma return nil } -func awsAwsjson10_deserializeDocumentPartnershipSummary(v **types.PartnershipSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4006,80 +4256,35 @@ func awsAwsjson10_deserializeDocumentPartnershipSummary(v **types.PartnershipSum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PartnershipSummary + var sv *types.InternalServerException if *v == nil { - sv = &types.PartnershipSummary{} + sv = &types.InternalServerException{} } else { sv = *v } for key, value := range shape { switch key { - case "capabilities": - if err := awsAwsjson10_deserializeDocumentPartnershipCapabilities(&sv.Capabilities, value); err != nil { - return err - } - - case "createdAt": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.CreatedAt = ptr.Time(t) + sv.Message = ptr.String(jtv) } - case "modifiedAt": + case "retryAfterSeconds": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ModifiedDate to be of type string, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) + i64, err := jtv.Int64() if err != nil { return err } - sv.ModifiedAt = ptr.Time(t) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "partnershipId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PartnershipId to be of type string, got %T instead", value) - } - sv.PartnershipId = ptr.String(jtv) - } - - case "profileId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProfileId to be of type string, got %T instead", value) - } - sv.ProfileId = ptr.String(jtv) - } - - case "tradingPartnerId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TradingPartnerId to be of type string, got %T instead", value) - } - sv.TradingPartnerId = ptr.String(jtv) + sv.RetryAfterSeconds = ptr.Int32(int32(i64)) } default: @@ -4091,7 +4296,7 @@ func awsAwsjson10_deserializeDocumentPartnershipSummary(v **types.PartnershipSum return nil } -func awsAwsjson10_deserializeDocumentProfileList(v *[]types.ProfileSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentKeyList(v *[]types.SampleDocumentKeys, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4104,17 +4309,17 @@ func awsAwsjson10_deserializeDocumentProfileList(v *[]types.ProfileSummary, valu return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ProfileSummary + var cv []types.SampleDocumentKeys if *v == nil { - cv = []types.ProfileSummary{} + cv = []types.SampleDocumentKeys{} } else { cv = *v } for _, value := range shape { - var col types.ProfileSummary + var col types.SampleDocumentKeys destAddr := &col - if err := awsAwsjson10_deserializeDocumentProfileSummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentSampleDocumentKeys(&destAddr, value); err != nil { return err } col = *destAddr @@ -4125,7 +4330,7 @@ func awsAwsjson10_deserializeDocumentProfileList(v *[]types.ProfileSummary, valu return nil } -func awsAwsjson10_deserializeDocumentProfileSummary(v **types.ProfileSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentMapping(v **types.Mapping, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4138,53 +4343,240 @@ func awsAwsjson10_deserializeDocumentProfileSummary(v **types.ProfileSummary, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ProfileSummary + var sv *types.Mapping if *v == nil { - sv = &types.ProfileSummary{} + sv = &types.Mapping{} } else { sv = *v } for key, value := range shape { switch key { - case "businessName": + case "template": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BusinessName to be of type string, got %T instead", value) + return fmt.Errorf("expected MappingTemplate to be of type string, got %T instead", value) } - sv.BusinessName = ptr.String(jtv) + sv.Template = ptr.String(jtv) } - case "createdAt": + case "templateLanguage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected MappingTemplateLanguage to be of type string, got %T instead", value) } - sv.CreatedAt = ptr.Time(t) + sv.TemplateLanguage = types.MappingTemplateLanguage(jtv) } - case "logging": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Logging to be of type string, got %T instead", value) - } - sv.Logging = types.Logging(jtv) - } + default: + _, _ = key, value - case "logGroupName": + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentOutboundEdiOptions(v *types.OutboundEdiOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var uv types.OutboundEdiOptions +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "x12": + var mv types.X12Envelope + destAddr := &mv + if err := awsAwsjson10_deserializeDocumentX12Envelope(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.OutboundEdiOptionsMemberX12{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + +func awsAwsjson10_deserializeDocumentOutputConversion(v **types.OutputConversion, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.OutputConversion + if *v == nil { + sv = &types.OutputConversion{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "formatOptions": + if err := awsAwsjson10_deserializeDocumentFormatOptions(&sv.FormatOptions, value); err != nil { + return err + } + + case "toFormat": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + return fmt.Errorf("expected ToFormat to be of type string, got %T instead", value) } - sv.LogGroupName = ptr.String(jtv) + sv.ToFormat = types.ToFormat(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentPartnershipCapabilities(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 CapabilityId to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentPartnershipList(v *[]types.PartnershipSummary, 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.PartnershipSummary + if *v == nil { + cv = []types.PartnershipSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PartnershipSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentPartnershipSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentPartnershipSummary(v **types.PartnershipSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.PartnershipSummary + if *v == nil { + sv = &types.PartnershipSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "capabilities": + if err := awsAwsjson10_deserializeDocumentPartnershipCapabilities(&sv.Capabilities, value); err != nil { + return err + } + + case "capabilityOptions": + if err := awsAwsjson10_deserializeDocumentCapabilityOptions(&sv.CapabilityOptions, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } case "modifiedAt": @@ -4204,11 +4596,20 @@ func awsAwsjson10_deserializeDocumentProfileSummary(v **types.ProfileSummary, va if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProfileName to be of type string, got %T instead", value) + return fmt.Errorf("expected PartnerName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } + case "partnershipId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PartnershipId to be of type string, got %T instead", value) + } + sv.PartnershipId = ptr.String(jtv) + } + case "profileId": if value != nil { jtv, ok := value.(string) @@ -4218,6 +4619,15 @@ func awsAwsjson10_deserializeDocumentProfileSummary(v **types.ProfileSummary, va sv.ProfileId = ptr.String(jtv) } + case "tradingPartnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TradingPartnerId to be of type string, got %T instead", value) + } + sv.TradingPartnerId = ptr.String(jtv) + } + default: _, _ = key, value @@ -4227,7 +4637,41 @@ func awsAwsjson10_deserializeDocumentProfileSummary(v **types.ProfileSummary, va return nil } -func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { +func awsAwsjson10_deserializeDocumentProfileList(v *[]types.ProfileSummary, 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.ProfileSummary + if *v == nil { + cv = []types.ProfileSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ProfileSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentProfileSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentProfileSummary(v **types.ProfileSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4240,34 +4684,472 @@ func awsAwsjson10_deserializeDocumentResourceNotFoundException(v **types.Resourc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceNotFoundException + var sv *types.ProfileSummary if *v == nil { - sv = &types.ResourceNotFoundException{} + sv = &types.ProfileSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "businessName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected BusinessName to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.BusinessName = ptr.String(jtv) } - default: - _, _ = key, value + case "createdAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) + } + + case "logging": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Logging to be of type string, got %T instead", value) + } + sv.Logging = types.Logging(jtv) + } + + case "logGroupName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LogGroupName to be of type string, got %T instead", value) + } + sv.LogGroupName = ptr.String(jtv) + } + + case "modifiedAt": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ModifiedDate to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProfileName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "profileId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ProfileId to be of type string, got %T instead", value) + } + sv.ProfileId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_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 awsAwsjson10_deserializeDocumentS3Location(v **types.S3Location, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.S3Location + if *v == nil { + sv = &types.S3Location{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BucketName to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentS3LocationList(v *[]types.S3Location, 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.S3Location + if *v == nil { + cv = []types.S3Location{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.S3Location + destAddr := &col + if err := awsAwsjson10_deserializeDocumentS3Location(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentSampleDocumentKeys(v **types.SampleDocumentKeys, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SampleDocumentKeys + if *v == nil { + sv = &types.SampleDocumentKeys{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "input": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) + } + sv.Input = ptr.String(jtv) + } + + case "output": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) + } + sv.Output = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentSampleDocuments(v **types.SampleDocuments, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.SampleDocuments + if *v == nil { + sv = &types.SampleDocuments{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bucketName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BucketName to be of type string, got %T instead", value) + } + sv.BucketName = ptr.String(jtv) + } + + case "keys": + if err := awsAwsjson10_deserializeDocumentKeyList(&sv.Keys, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } 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 "quotaCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.QuotaCode = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "serviceCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ServiceCode = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_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 awsAwsjson10_deserializeDocumentTagList(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 := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsAwsjson10_deserializeDocumentS3Location(v **types.S3Location, value interface{}) error { +func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4280,31 +5162,35 @@ func awsAwsjson10_deserializeDocumentS3Location(v **types.S3Location, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.S3Location + var sv *types.ThrottlingException if *v == nil { - sv = &types.S3Location{} + sv = &types.ThrottlingException{} } else { sv = *v } for key, value := range shape { switch key { - case "bucketName": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BucketName to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.BucketName = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "key": + case "retryAfterSeconds": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } - sv.Key = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetryAfterSeconds = ptr.Int32(int32(i64)) } default: @@ -4316,7 +5202,7 @@ func awsAwsjson10_deserializeDocumentS3Location(v **types.S3Location, value inte return nil } -func awsAwsjson10_deserializeDocumentS3LocationList(v *[]types.S3Location, value interface{}) error { +func awsAwsjson10_deserializeDocumentTransformerList(v *[]types.TransformerSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4329,17 +5215,17 @@ func awsAwsjson10_deserializeDocumentS3LocationList(v *[]types.S3Location, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.S3Location + var cv []types.TransformerSummary if *v == nil { - cv = []types.S3Location{} + cv = []types.TransformerSummary{} } else { cv = *v } for _, value := range shape { - var col types.S3Location + var col types.TransformerSummary destAddr := &col - if err := awsAwsjson10_deserializeDocumentS3Location(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentTransformerSummary(&destAddr, value); err != nil { return err } col = *destAddr @@ -4350,7 +5236,7 @@ func awsAwsjson10_deserializeDocumentS3LocationList(v *[]types.S3Location, value return nil } -func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { +func awsAwsjson10_deserializeDocumentTransformerSummary(v **types.TransformerSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4363,58 +5249,118 @@ func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.Ser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceQuotaExceededException + var sv *types.TransformerSummary if *v == nil { - sv = &types.ServiceQuotaExceededException{} + sv = &types.TransformerSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "createdAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedAt = ptr.Time(t) } - case "quotaCode": + case "ediType": + if err := awsAwsjson10_deserializeDocumentEdiType(&sv.EdiType, value); err != nil { + return err + } + + case "fileFormat": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected FileFormat to be of type string, got %T instead", value) } - sv.QuotaCode = ptr.String(jtv) + sv.FileFormat = types.FileFormat(jtv) } - case "resourceId": + case "inputConversion": + if err := awsAwsjson10_deserializeDocumentInputConversion(&sv.InputConversion, value); err != nil { + return err + } + + case "mapping": + if err := awsAwsjson10_deserializeDocumentMapping(&sv.Mapping, value); err != nil { + return err + } + + case "mappingTemplate": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected MappingTemplate to be of type string, got %T instead", value) } - sv.ResourceId = ptr.String(jtv) + sv.MappingTemplate = ptr.String(jtv) } - case "resourceType": + case "modifiedAt": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected ModifiedDate to be of type string, got %T instead", value) } - sv.ResourceType = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.ModifiedAt = ptr.Time(t) } - case "serviceCode": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected TransformerName to be of type string, got %T instead", value) } - sv.ServiceCode = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "outputConversion": + if err := awsAwsjson10_deserializeDocumentOutputConversion(&sv.OutputConversion, value); err != nil { + return err + } + + case "sampleDocument": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileLocation to be of type string, got %T instead", value) + } + sv.SampleDocument = ptr.String(jtv) + } + + case "sampleDocuments": + if err := awsAwsjson10_deserializeDocumentSampleDocuments(&sv.SampleDocuments, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransformerStatus to be of type string, got %T instead", value) + } + sv.Status = types.TransformerStatus(jtv) + } + + case "transformerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransformerId to be of type string, got %T instead", value) + } + sv.TransformerId = ptr.String(jtv) } default: @@ -4426,7 +5372,7 @@ func awsAwsjson10_deserializeDocumentServiceQuotaExceededException(v **types.Ser return nil } -func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error { +func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4439,31 +5385,22 @@ func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Tag + var sv *types.ValidationException if *v == nil { - sv = &types.Tag{} + sv = &types.ValidationException{} } 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": + case "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -4475,7 +5412,7 @@ func awsAwsjson10_deserializeDocumentTag(v **types.Tag, value interface{}) error return nil } -func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { +func awsAwsjson10_deserializeDocumentValidationMessages(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4488,20 +5425,22 @@ func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Tag + var cv []string if *v == nil { - cv = []types.Tag{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.Tag - destAddr := &col - if err := awsAwsjson10_deserializeDocumentTag(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -4509,7 +5448,7 @@ func awsAwsjson10_deserializeDocumentTagList(v *[]types.Tag, value interface{}) return nil } -func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { +func awsAwsjson10_deserializeDocumentX12Delimiters(v **types.X12Delimiters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4522,35 +5461,40 @@ func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ThrottlingException + var sv *types.X12Delimiters if *v == nil { - sv = &types.ThrottlingException{} + sv = &types.X12Delimiters{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "componentSeparator": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected X12ComponentSeparator to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ComponentSeparator = ptr.String(jtv) } - case "retryAfterSeconds": + case "dataElementSeparator": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected X12DataElementSeparator to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.DataElementSeparator = ptr.String(jtv) + } + + case "segmentTerminator": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected X12SegmentTerminator to be of type string, got %T instead", value) } - sv.RetryAfterSeconds = ptr.Int32(int32(i64)) + sv.SegmentTerminator = ptr.String(jtv) } default: @@ -4562,7 +5506,7 @@ func awsAwsjson10_deserializeDocumentThrottlingException(v **types.ThrottlingExc return nil } -func awsAwsjson10_deserializeDocumentTransformerList(v *[]types.TransformerSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentX12Details(v **types.X12Details, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4570,33 +5514,84 @@ func awsAwsjson10_deserializeDocumentTransformerList(v *[]types.TransformerSumma return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.TransformerSummary + var sv *types.X12Details if *v == nil { - cv = []types.TransformerSummary{} + sv = &types.X12Details{} } else { - cv = *v + sv = *v + } + + for key, value := range shape { + switch key { + case "transactionSet": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected X12TransactionSet to be of type string, got %T instead", value) + } + sv.TransactionSet = types.X12TransactionSet(jtv) + } + + case "version": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected X12Version to be of type string, got %T instead", value) + } + sv.Version = types.X12Version(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentX12Envelope(v **types.X12Envelope, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.X12Envelope + if *v == nil { + sv = &types.X12Envelope{} + } else { + sv = *v } - for _, value := range shape { - var col types.TransformerSummary - destAddr := &col - if err := awsAwsjson10_deserializeDocumentTransformerSummary(&destAddr, value); err != nil { - return err + for key, value := range shape { + switch key { + case "common": + if err := awsAwsjson10_deserializeDocumentX12OutboundEdiHeaders(&sv.Common, value); err != nil { + return err + } + + default: + _, _ = key, value + } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentTransformerSummary(v **types.TransformerSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentX12FunctionalGroupHeaders(v **types.X12FunctionalGroupHeaders, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4609,138 +5604,134 @@ func awsAwsjson10_deserializeDocumentTransformerSummary(v **types.TransformerSum return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TransformerSummary + var sv *types.X12FunctionalGroupHeaders if *v == nil { - sv = &types.TransformerSummary{} + sv = &types.X12FunctionalGroupHeaders{} } else { sv = *v } for key, value := range shape { switch key { - case "createdAt": + case "applicationReceiverCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CreatedDate to be of type string, got %T instead", value) + return fmt.Errorf("expected X12ApplicationReceiverCode to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedAt = ptr.Time(t) + sv.ApplicationReceiverCode = ptr.String(jtv) } - case "ediType": - if err := awsAwsjson10_deserializeDocumentEdiType(&sv.EdiType, value); err != nil { - return err + case "applicationSenderCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected X12ApplicationSenderCode to be of type string, got %T instead", value) + } + sv.ApplicationSenderCode = ptr.String(jtv) } - case "fileFormat": + case "responsibleAgencyCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FileFormat to be of type string, got %T instead", value) + return fmt.Errorf("expected X12ResponsibleAgencyCode to be of type string, got %T instead", value) } - sv.FileFormat = types.FileFormat(jtv) + sv.ResponsibleAgencyCode = ptr.String(jtv) } - case "mappingTemplate": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentX12InterchangeControlHeaders(v **types.X12InterchangeControlHeaders, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.X12InterchangeControlHeaders + if *v == nil { + sv = &types.X12InterchangeControlHeaders{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "acknowledgmentRequestedCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected MappingTemplate to be of type string, got %T instead", value) + return fmt.Errorf("expected X12AcknowledgmentRequestedCode to be of type string, got %T instead", value) } - sv.MappingTemplate = ptr.String(jtv) + sv.AcknowledgmentRequestedCode = ptr.String(jtv) } - case "modifiedAt": + case "receiverId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ModifiedDate to be of type string, got %T instead", value) + return fmt.Errorf("expected X12ReceiverId to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.ModifiedAt = ptr.Time(t) + sv.ReceiverId = ptr.String(jtv) } - case "name": + case "receiverIdQualifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TransformerName to be of type string, got %T instead", value) + return fmt.Errorf("expected X12IdQualifier to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.ReceiverIdQualifier = ptr.String(jtv) } - case "sampleDocument": + case "repetitionSeparator": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FileLocation to be of type string, got %T instead", value) + return fmt.Errorf("expected X12RepetitionSeparator to be of type string, got %T instead", value) } - sv.SampleDocument = ptr.String(jtv) + sv.RepetitionSeparator = ptr.String(jtv) } - case "status": + case "senderId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TransformerStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected X12SenderId to be of type string, got %T instead", value) } - sv.Status = types.TransformerStatus(jtv) + sv.SenderId = ptr.String(jtv) } - case "transformerId": + case "senderIdQualifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TransformerId to be of type string, got %T instead", value) + return fmt.Errorf("expected X12IdQualifier to be of type string, got %T instead", value) } - sv.TransformerId = ptr.String(jtv) + sv.SenderIdQualifier = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ValidationException - if *v == nil { - sv = &types.ValidationException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Message": + case "usageIndicatorCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected X12UsageIndicatorCode to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.UsageIndicatorCode = ptr.String(jtv) } default: @@ -4752,7 +5743,7 @@ func awsAwsjson10_deserializeDocumentValidationException(v **types.ValidationExc return nil } -func awsAwsjson10_deserializeDocumentX12Details(v **types.X12Details, value interface{}) error { +func awsAwsjson10_deserializeDocumentX12OutboundEdiHeaders(v **types.X12OutboundEdiHeaders, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4765,31 +5756,37 @@ func awsAwsjson10_deserializeDocumentX12Details(v **types.X12Details, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.X12Details + var sv *types.X12OutboundEdiHeaders if *v == nil { - sv = &types.X12Details{} + sv = &types.X12OutboundEdiHeaders{} } else { sv = *v } for key, value := range shape { switch key { - case "transactionSet": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected X12TransactionSet to be of type string, got %T instead", value) - } - sv.TransactionSet = types.X12TransactionSet(jtv) + case "delimiters": + if err := awsAwsjson10_deserializeDocumentX12Delimiters(&sv.Delimiters, value); err != nil { + return err } - case "version": + case "functionalGroupHeaders": + if err := awsAwsjson10_deserializeDocumentX12FunctionalGroupHeaders(&sv.FunctionalGroupHeaders, value); err != nil { + return err + } + + case "interchangeControlHeaders": + if err := awsAwsjson10_deserializeDocumentX12InterchangeControlHeaders(&sv.InterchangeControlHeaders, value); err != nil { + return err + } + + case "validateEdi": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected X12Version to be of type string, got %T instead", value) + return fmt.Errorf("expected X12ValidateEdi to be of type *bool, got %T instead", value) } - sv.Version = types.X12Version(jtv) + sv.ValidateEdi = ptr.Bool(jtv) } default: @@ -4918,6 +5915,11 @@ func awsAwsjson10_deserializeOpDocumentCreatePartnershipOutput(v **CreatePartner return err } + case "capabilityOptions": + if err := awsAwsjson10_deserializeDocumentCapabilityOptions(&sv.CapabilityOptions, value); err != nil { + return err + } + case "createdAt": if value != nil { jtv, ok := value.(string) @@ -5119,6 +6121,46 @@ func awsAwsjson10_deserializeOpDocumentCreateProfileOutput(v **CreateProfileOutp return nil } +func awsAwsjson10_deserializeOpDocumentCreateStarterMappingTemplateOutput(v **CreateStarterMappingTemplateOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateStarterMappingTemplateOutput + if *v == nil { + sv = &CreateStarterMappingTemplateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "mappingTemplate": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.MappingTemplate = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentCreateTransformerOutput(v **CreateTransformerOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -5168,6 +6210,16 @@ func awsAwsjson10_deserializeOpDocumentCreateTransformerOutput(v **CreateTransfo sv.FileFormat = types.FileFormat(jtv) } + case "inputConversion": + if err := awsAwsjson10_deserializeDocumentInputConversion(&sv.InputConversion, value); err != nil { + return err + } + + case "mapping": + if err := awsAwsjson10_deserializeDocumentMapping(&sv.Mapping, value); err != nil { + return err + } + case "mappingTemplate": if value != nil { jtv, ok := value.(string) @@ -5186,6 +6238,11 @@ func awsAwsjson10_deserializeOpDocumentCreateTransformerOutput(v **CreateTransfo sv.Name = ptr.String(jtv) } + case "outputConversion": + if err := awsAwsjson10_deserializeDocumentOutputConversion(&sv.OutputConversion, value); err != nil { + return err + } + case "sampleDocument": if value != nil { jtv, ok := value.(string) @@ -5195,6 +6252,11 @@ func awsAwsjson10_deserializeOpDocumentCreateTransformerOutput(v **CreateTransfo sv.SampleDocument = ptr.String(jtv) } + case "sampleDocuments": + if err := awsAwsjson10_deserializeDocumentSampleDocuments(&sv.SampleDocuments, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) @@ -5361,6 +6423,11 @@ func awsAwsjson10_deserializeOpDocumentGetPartnershipOutput(v **GetPartnershipOu return err } + case "capabilityOptions": + if err := awsAwsjson10_deserializeDocumentCapabilityOptions(&sv.CapabilityOptions, value); err != nil { + return err + } + case "createdAt": if value != nil { jtv, ok := value.(string) @@ -5691,6 +6758,16 @@ func awsAwsjson10_deserializeOpDocumentGetTransformerOutput(v **GetTransformerOu sv.FileFormat = types.FileFormat(jtv) } + case "inputConversion": + if err := awsAwsjson10_deserializeDocumentInputConversion(&sv.InputConversion, value); err != nil { + return err + } + + case "mapping": + if err := awsAwsjson10_deserializeDocumentMapping(&sv.Mapping, value); err != nil { + return err + } + case "mappingTemplate": if value != nil { jtv, ok := value.(string) @@ -5722,6 +6799,11 @@ func awsAwsjson10_deserializeOpDocumentGetTransformerOutput(v **GetTransformerOu sv.Name = ptr.String(jtv) } + case "outputConversion": + if err := awsAwsjson10_deserializeDocumentOutputConversion(&sv.OutputConversion, value); err != nil { + return err + } + case "sampleDocument": if value != nil { jtv, ok := value.(string) @@ -5731,6 +6813,11 @@ func awsAwsjson10_deserializeOpDocumentGetTransformerOutput(v **GetTransformerOu sv.SampleDocument = ptr.String(jtv) } + case "sampleDocuments": + if err := awsAwsjson10_deserializeDocumentSampleDocuments(&sv.SampleDocuments, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) @@ -6023,6 +7110,51 @@ func awsAwsjson10_deserializeOpDocumentStartTransformerJobOutput(v **StartTransf return nil } +func awsAwsjson10_deserializeOpDocumentTestConversionOutput(v **TestConversionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *TestConversionOutput + if *v == nil { + sv = &TestConversionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "convertedFileContent": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConvertedFileContent = ptr.String(jtv) + } + + case "validationMessages": + if err := awsAwsjson10_deserializeDocumentValidationMessages(&sv.ValidationMessages, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentTestMappingOutput(v **TestMappingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6233,6 +7365,11 @@ func awsAwsjson10_deserializeOpDocumentUpdatePartnershipOutput(v **UpdatePartner return err } + case "capabilityOptions": + if err := awsAwsjson10_deserializeDocumentCapabilityOptions(&sv.CapabilityOptions, value); err != nil { + return err + } + case "createdAt": if value != nil { jtv, ok := value.(string) @@ -6509,6 +7646,16 @@ func awsAwsjson10_deserializeOpDocumentUpdateTransformerOutput(v **UpdateTransfo sv.FileFormat = types.FileFormat(jtv) } + case "inputConversion": + if err := awsAwsjson10_deserializeDocumentInputConversion(&sv.InputConversion, value); err != nil { + return err + } + + case "mapping": + if err := awsAwsjson10_deserializeDocumentMapping(&sv.Mapping, value); err != nil { + return err + } + case "mappingTemplate": if value != nil { jtv, ok := value.(string) @@ -6540,6 +7687,11 @@ func awsAwsjson10_deserializeOpDocumentUpdateTransformerOutput(v **UpdateTransfo sv.Name = ptr.String(jtv) } + case "outputConversion": + if err := awsAwsjson10_deserializeDocumentOutputConversion(&sv.OutputConversion, value); err != nil { + return err + } + case "sampleDocument": if value != nil { jtv, ok := value.(string) @@ -6549,6 +7701,11 @@ func awsAwsjson10_deserializeOpDocumentUpdateTransformerOutput(v **UpdateTransfo sv.SampleDocument = ptr.String(jtv) } + case "sampleDocuments": + if err := awsAwsjson10_deserializeDocumentSampleDocuments(&sv.SampleDocuments, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) diff --git a/service/b2bi/generated.json b/service/b2bi/generated.json index bdfa5d56edc..6222277d95a 100644 --- a/service/b2bi/generated.json +++ b/service/b2bi/generated.json @@ -11,6 +11,7 @@ "api_op_CreateCapability.go", "api_op_CreatePartnership.go", "api_op_CreateProfile.go", + "api_op_CreateStarterMappingTemplate.go", "api_op_CreateTransformer.go", "api_op_DeleteCapability.go", "api_op_DeletePartnership.go", @@ -28,6 +29,7 @@ "api_op_ListTransformers.go", "api_op_StartTransformerJob.go", "api_op_TagResource.go", + "api_op_TestConversion.go", "api_op_TestMapping.go", "api_op_TestParsing.go", "api_op_UntagResource.go", diff --git a/service/b2bi/serializers.go b/service/b2bi/serializers.go index e904f584d19..0ee5a8e5d55 100644 --- a/service/b2bi/serializers.go +++ b/service/b2bi/serializers.go @@ -199,6 +199,67 @@ func (m *awsAwsjson10_serializeOpCreateProfile) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpCreateStarterMappingTemplate struct { +} + +func (*awsAwsjson10_serializeOpCreateStarterMappingTemplate) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateStarterMappingTemplate) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateStarterMappingTemplateInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("B2BI.CreateStarterMappingTemplate") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateStarterMappingTemplateInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpCreateTransformer struct { } @@ -1236,6 +1297,67 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpTestConversion struct { +} + +func (*awsAwsjson10_serializeOpTestConversion) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpTestConversion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*TestConversionInput) + _ = 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.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("B2BI.TestConversion") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentTestConversionInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpTestMapping struct { } @@ -1680,10 +1802,92 @@ func awsAwsjson10_serializeDocumentCapabilityConfiguration(v types.CapabilityCon return nil } +func awsAwsjson10_serializeDocumentCapabilityOptions(v *types.CapabilityOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OutboundEdi != nil { + ok := object.Key("outboundEdi") + if err := awsAwsjson10_serializeDocumentOutboundEdiOptions(v.OutboundEdi, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentConversionSource(v *types.ConversionSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FileFormat) > 0 { + ok := object.Key("fileFormat") + ok.String(string(v.FileFormat)) + } + + if v.InputFile != nil { + ok := object.Key("inputFile") + if err := awsAwsjson10_serializeDocumentInputFileSource(v.InputFile, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentConversionTarget(v *types.ConversionTarget, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.FileFormat) > 0 { + ok := object.Key("fileFormat") + ok.String(string(v.FileFormat)) + } + + if v.FormatDetails != nil { + ok := object.Key("formatDetails") + if err := awsAwsjson10_serializeDocumentConversionTargetFormatDetails(v.FormatDetails, ok); err != nil { + return err + } + } + + if v.OutputSampleFile != nil { + ok := object.Key("outputSampleFile") + if err := awsAwsjson10_serializeDocumentOutputSampleFileSource(v.OutputSampleFile, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentConversionTargetFormatDetails(v types.ConversionTargetFormatDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.ConversionTargetFormatDetailsMemberX12: + av := object.Key("x12") + if err := awsAwsjson10_serializeDocumentX12Details(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsAwsjson10_serializeDocumentEdiConfiguration(v *types.EdiConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() + if len(v.CapabilityDirection) > 0 { + ok := object.Key("capabilityDirection") + ok.String(string(v.CapabilityDirection)) + } + if v.InputLocation != nil { ok := object.Key("inputLocation") if err := awsAwsjson10_serializeDocumentS3Location(v.InputLocation, ok); err != nil { @@ -1731,6 +1935,59 @@ func awsAwsjson10_serializeDocumentEdiType(v types.EdiType, value smithyjson.Val return nil } +func awsAwsjson10_serializeDocumentFormatOptions(v types.FormatOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.FormatOptionsMemberX12: + av := object.Key("x12") + if err := awsAwsjson10_serializeDocumentX12Details(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsAwsjson10_serializeDocumentInputConversion(v *types.InputConversion, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FormatOptions != nil { + ok := object.Key("formatOptions") + if err := awsAwsjson10_serializeDocumentFormatOptions(v.FormatOptions, ok); err != nil { + return err + } + } + + if len(v.FromFormat) > 0 { + ok := object.Key("fromFormat") + ok.String(string(v.FromFormat)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentInputFileSource(v types.InputFileSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.InputFileSourceMemberFileContent: + av := object.Key("fileContent") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsAwsjson10_serializeDocumentInstructionsDocuments(v []types.S3Location, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1744,6 +2001,91 @@ func awsAwsjson10_serializeDocumentInstructionsDocuments(v []types.S3Location, v return nil } +func awsAwsjson10_serializeDocumentKeyList(v []types.SampleDocumentKeys, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentSampleDocumentKeys(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentMapping(v *types.Mapping, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Template != nil { + ok := object.Key("template") + ok.String(*v.Template) + } + + if len(v.TemplateLanguage) > 0 { + ok := object.Key("templateLanguage") + ok.String(string(v.TemplateLanguage)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentOutboundEdiOptions(v types.OutboundEdiOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.OutboundEdiOptionsMemberX12: + av := object.Key("x12") + if err := awsAwsjson10_serializeDocumentX12Envelope(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsAwsjson10_serializeDocumentOutputConversion(v *types.OutputConversion, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FormatOptions != nil { + ok := object.Key("formatOptions") + if err := awsAwsjson10_serializeDocumentFormatOptions(v.FormatOptions, ok); err != nil { + return err + } + } + + if len(v.ToFormat) > 0 { + ok := object.Key("toFormat") + ok.String(string(v.ToFormat)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentOutputSampleFileSource(v types.OutputSampleFileSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.OutputSampleFileSourceMemberFileLocation: + av := object.Key("fileLocation") + if err := awsAwsjson10_serializeDocumentS3Location(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsAwsjson10_serializeDocumentPartnershipCapabilities(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1772,6 +2114,42 @@ func awsAwsjson10_serializeDocumentS3Location(v *types.S3Location, value smithyj return nil } +func awsAwsjson10_serializeDocumentSampleDocumentKeys(v *types.SampleDocumentKeys, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Input != nil { + ok := object.Key("input") + ok.String(*v.Input) + } + + if v.Output != nil { + ok := object.Key("output") + ok.String(*v.Output) + } + + return nil +} + +func awsAwsjson10_serializeDocumentSampleDocuments(v *types.SampleDocuments, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BucketName != nil { + ok := object.Key("bucketName") + ok.String(*v.BucketName) + } + + if v.Keys != nil { + ok := object.Key("keys") + if err := awsAwsjson10_serializeDocumentKeyList(v.Keys, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1813,6 +2191,46 @@ func awsAwsjson10_serializeDocumentTagList(v []types.Tag, value smithyjson.Value return nil } +func awsAwsjson10_serializeDocumentTemplateDetails(v types.TemplateDetails, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.TemplateDetailsMemberX12: + av := object.Key("x12") + if err := awsAwsjson10_serializeDocumentX12Details(&uv.Value, av); err != nil { + return err + } + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + +func awsAwsjson10_serializeDocumentX12Delimiters(v *types.X12Delimiters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ComponentSeparator != nil { + ok := object.Key("componentSeparator") + ok.String(*v.ComponentSeparator) + } + + if v.DataElementSeparator != nil { + ok := object.Key("dataElementSeparator") + ok.String(*v.DataElementSeparator) + } + + if v.SegmentTerminator != nil { + ok := object.Key("segmentTerminator") + ok.String(*v.SegmentTerminator) + } + + return nil +} + func awsAwsjson10_serializeDocumentX12Details(v *types.X12Details, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1830,6 +2248,117 @@ func awsAwsjson10_serializeDocumentX12Details(v *types.X12Details, value smithyj return nil } +func awsAwsjson10_serializeDocumentX12Envelope(v *types.X12Envelope, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Common != nil { + ok := object.Key("common") + if err := awsAwsjson10_serializeDocumentX12OutboundEdiHeaders(v.Common, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeDocumentX12FunctionalGroupHeaders(v *types.X12FunctionalGroupHeaders, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ApplicationReceiverCode != nil { + ok := object.Key("applicationReceiverCode") + ok.String(*v.ApplicationReceiverCode) + } + + if v.ApplicationSenderCode != nil { + ok := object.Key("applicationSenderCode") + ok.String(*v.ApplicationSenderCode) + } + + if v.ResponsibleAgencyCode != nil { + ok := object.Key("responsibleAgencyCode") + ok.String(*v.ResponsibleAgencyCode) + } + + return nil +} + +func awsAwsjson10_serializeDocumentX12InterchangeControlHeaders(v *types.X12InterchangeControlHeaders, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AcknowledgmentRequestedCode != nil { + ok := object.Key("acknowledgmentRequestedCode") + ok.String(*v.AcknowledgmentRequestedCode) + } + + if v.ReceiverId != nil { + ok := object.Key("receiverId") + ok.String(*v.ReceiverId) + } + + if v.ReceiverIdQualifier != nil { + ok := object.Key("receiverIdQualifier") + ok.String(*v.ReceiverIdQualifier) + } + + if v.RepetitionSeparator != nil { + ok := object.Key("repetitionSeparator") + ok.String(*v.RepetitionSeparator) + } + + if v.SenderId != nil { + ok := object.Key("senderId") + ok.String(*v.SenderId) + } + + if v.SenderIdQualifier != nil { + ok := object.Key("senderIdQualifier") + ok.String(*v.SenderIdQualifier) + } + + if v.UsageIndicatorCode != nil { + ok := object.Key("usageIndicatorCode") + ok.String(*v.UsageIndicatorCode) + } + + return nil +} + +func awsAwsjson10_serializeDocumentX12OutboundEdiHeaders(v *types.X12OutboundEdiHeaders, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Delimiters != nil { + ok := object.Key("delimiters") + if err := awsAwsjson10_serializeDocumentX12Delimiters(v.Delimiters, ok); err != nil { + return err + } + } + + if v.FunctionalGroupHeaders != nil { + ok := object.Key("functionalGroupHeaders") + if err := awsAwsjson10_serializeDocumentX12FunctionalGroupHeaders(v.FunctionalGroupHeaders, ok); err != nil { + return err + } + } + + if v.InterchangeControlHeaders != nil { + ok := object.Key("interchangeControlHeaders") + if err := awsAwsjson10_serializeDocumentX12InterchangeControlHeaders(v.InterchangeControlHeaders, ok); err != nil { + return err + } + } + + if v.ValidateEdi != nil { + ok := object.Key("validateEdi") + ok.Boolean(*v.ValidateEdi) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentCreateCapabilityInput(v *CreateCapabilityInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1884,6 +2413,13 @@ func awsAwsjson10_serializeOpDocumentCreatePartnershipInput(v *CreatePartnership } } + if v.CapabilityOptions != nil { + ok := object.Key("capabilityOptions") + if err := awsAwsjson10_serializeDocumentCapabilityOptions(v.CapabilityOptions, ok); err != nil { + return err + } + } + if v.ClientToken != nil { ok := object.Key("clientToken") ok.String(*v.ClientToken) @@ -1963,6 +2499,32 @@ func awsAwsjson10_serializeOpDocumentCreateProfileInput(v *CreateProfileInput, v return nil } +func awsAwsjson10_serializeOpDocumentCreateStarterMappingTemplateInput(v *CreateStarterMappingTemplateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.MappingType) > 0 { + ok := object.Key("mappingType") + ok.String(string(v.MappingType)) + } + + if v.OutputSampleLocation != nil { + ok := object.Key("outputSampleLocation") + if err := awsAwsjson10_serializeDocumentS3Location(v.OutputSampleLocation, ok); err != nil { + return err + } + } + + if v.TemplateDetails != nil { + ok := object.Key("templateDetails") + if err := awsAwsjson10_serializeDocumentTemplateDetails(v.TemplateDetails, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentCreateTransformerInput(v *CreateTransformerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -1984,6 +2546,20 @@ func awsAwsjson10_serializeOpDocumentCreateTransformerInput(v *CreateTransformer ok.String(string(v.FileFormat)) } + if v.InputConversion != nil { + ok := object.Key("inputConversion") + if err := awsAwsjson10_serializeDocumentInputConversion(v.InputConversion, ok); err != nil { + return err + } + } + + if v.Mapping != nil { + ok := object.Key("mapping") + if err := awsAwsjson10_serializeDocumentMapping(v.Mapping, ok); err != nil { + return err + } + } + if v.MappingTemplate != nil { ok := object.Key("mappingTemplate") ok.String(*v.MappingTemplate) @@ -1994,11 +2570,25 @@ func awsAwsjson10_serializeOpDocumentCreateTransformerInput(v *CreateTransformer ok.String(*v.Name) } + if v.OutputConversion != nil { + ok := object.Key("outputConversion") + if err := awsAwsjson10_serializeDocumentOutputConversion(v.OutputConversion, ok); err != nil { + return err + } + } + if v.SampleDocument != nil { ok := object.Key("sampleDocument") ok.String(*v.SampleDocument) } + if v.SampleDocuments != nil { + ok := object.Key("sampleDocuments") + if err := awsAwsjson10_serializeDocumentSampleDocuments(v.SampleDocuments, ok); err != nil { + return err + } + } + if v.Tags != nil { ok := object.Key("tags") if err := awsAwsjson10_serializeDocumentTagList(v.Tags, ok); err != nil { @@ -2257,6 +2847,27 @@ func awsAwsjson10_serializeOpDocumentTagResourceInput(v *TagResourceInput, value return nil } +func awsAwsjson10_serializeOpDocumentTestConversionInput(v *TestConversionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Source != nil { + ok := object.Key("source") + if err := awsAwsjson10_serializeDocumentConversionSource(v.Source, ok); err != nil { + return err + } + } + + if v.Target != nil { + ok := object.Key("target") + if err := awsAwsjson10_serializeDocumentConversionTarget(v.Target, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentTestMappingInput(v *TestMappingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2366,6 +2977,13 @@ func awsAwsjson10_serializeOpDocumentUpdatePartnershipInput(v *UpdatePartnership } } + if v.CapabilityOptions != nil { + ok := object.Key("capabilityOptions") + if err := awsAwsjson10_serializeDocumentCapabilityOptions(v.CapabilityOptions, ok); err != nil { + return err + } + } + if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) @@ -2427,6 +3045,20 @@ func awsAwsjson10_serializeOpDocumentUpdateTransformerInput(v *UpdateTransformer ok.String(string(v.FileFormat)) } + if v.InputConversion != nil { + ok := object.Key("inputConversion") + if err := awsAwsjson10_serializeDocumentInputConversion(v.InputConversion, ok); err != nil { + return err + } + } + + if v.Mapping != nil { + ok := object.Key("mapping") + if err := awsAwsjson10_serializeDocumentMapping(v.Mapping, ok); err != nil { + return err + } + } + if v.MappingTemplate != nil { ok := object.Key("mappingTemplate") ok.String(*v.MappingTemplate) @@ -2437,11 +3069,25 @@ func awsAwsjson10_serializeOpDocumentUpdateTransformerInput(v *UpdateTransformer ok.String(*v.Name) } + if v.OutputConversion != nil { + ok := object.Key("outputConversion") + if err := awsAwsjson10_serializeDocumentOutputConversion(v.OutputConversion, ok); err != nil { + return err + } + } + if v.SampleDocument != nil { ok := object.Key("sampleDocument") ok.String(*v.SampleDocument) } + if v.SampleDocuments != nil { + ok := object.Key("sampleDocuments") + if err := awsAwsjson10_serializeDocumentSampleDocuments(v.SampleDocuments, ok); err != nil { + return err + } + } + if len(v.Status) > 0 { ok := object.Key("status") ok.String(string(v.Status)) diff --git a/service/b2bi/snapshot/api_op_CreateStarterMappingTemplate.go.snap b/service/b2bi/snapshot/api_op_CreateStarterMappingTemplate.go.snap new file mode 100644 index 00000000000..abc382af4a6 --- /dev/null +++ b/service/b2bi/snapshot/api_op_CreateStarterMappingTemplate.go.snap @@ -0,0 +1,41 @@ +CreateStarterMappingTemplate + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/b2bi/snapshot/api_op_TestConversion.go.snap b/service/b2bi/snapshot/api_op_TestConversion.go.snap new file mode 100644 index 00000000000..32ce37e350e --- /dev/null +++ b/service/b2bi/snapshot/api_op_TestConversion.go.snap @@ -0,0 +1,41 @@ +TestConversion + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + spanRetryLoop + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/b2bi/snapshot_test.go b/service/b2bi/snapshot_test.go index ba7d889223c..44a5b372d5c 100644 --- a/service/b2bi/snapshot_test.go +++ b/service/b2bi/snapshot_test.go @@ -98,6 +98,18 @@ func TestCheckSnapshot_CreateProfile(t *testing.T) { } } +func TestCheckSnapshot_CreateStarterMappingTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateStarterMappingTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateStarterMappingTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateTransformer(t *testing.T) { svc := New(Options{}) _, err := svc.CreateTransformer(context.Background(), nil, func(o *Options) { @@ -302,6 +314,18 @@ func TestCheckSnapshot_TagResource(t *testing.T) { } } +func TestCheckSnapshot_TestConversion(t *testing.T) { + svc := New(Options{}) + _, err := svc.TestConversion(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "TestConversion") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_TestMapping(t *testing.T) { svc := New(Options{}) _, err := svc.TestMapping(context.Background(), nil, func(o *Options) { @@ -421,6 +445,18 @@ func TestUpdateSnapshot_CreateProfile(t *testing.T) { } } +func TestUpdateSnapshot_CreateStarterMappingTemplate(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateStarterMappingTemplate(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateStarterMappingTemplate") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateTransformer(t *testing.T) { svc := New(Options{}) _, err := svc.CreateTransformer(context.Background(), nil, func(o *Options) { @@ -625,6 +661,18 @@ func TestUpdateSnapshot_TagResource(t *testing.T) { } } +func TestUpdateSnapshot_TestConversion(t *testing.T) { + svc := New(Options{}) + _, err := svc.TestConversion(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "TestConversion") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_TestMapping(t *testing.T) { svc := New(Options{}) _, err := svc.TestMapping(context.Background(), nil, func(o *Options) { diff --git a/service/b2bi/types/enums.go b/service/b2bi/types/enums.go index 474a5ab6c16..8b7c19e308c 100644 --- a/service/b2bi/types/enums.go +++ b/service/b2bi/types/enums.go @@ -2,6 +2,25 @@ package types +type CapabilityDirection string + +// Enum values for CapabilityDirection +const ( + CapabilityDirectionInbound CapabilityDirection = "INBOUND" + CapabilityDirectionOutbound CapabilityDirection = "OUTBOUND" +) + +// Values returns all known values for CapabilityDirection. 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 (CapabilityDirection) Values() []CapabilityDirection { + return []CapabilityDirection{ + "INBOUND", + "OUTBOUND", + } +} + type CapabilityType string // Enum values for CapabilityType @@ -19,12 +38,49 @@ func (CapabilityType) Values() []CapabilityType { } } +type ConversionSourceFormat string + +// Enum values for ConversionSourceFormat +const ( + ConversionSourceFormatJson ConversionSourceFormat = "JSON" + ConversionSourceFormatXml ConversionSourceFormat = "XML" +) + +// Values returns all known values for ConversionSourceFormat. 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 (ConversionSourceFormat) Values() []ConversionSourceFormat { + return []ConversionSourceFormat{ + "JSON", + "XML", + } +} + +type ConversionTargetFormat string + +// Enum values for ConversionTargetFormat +const ( + ConversionTargetFormatX12 ConversionTargetFormat = "X12" +) + +// Values returns all known values for ConversionTargetFormat. 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 (ConversionTargetFormat) Values() []ConversionTargetFormat { + return []ConversionTargetFormat{ + "X12", + } +} + type FileFormat string // Enum values for FileFormat const ( - FileFormatXml FileFormat = "XML" - FileFormatJson FileFormat = "JSON" + FileFormatXml FileFormat = "XML" + FileFormatJson FileFormat = "JSON" + FileFormatNotUsed FileFormat = "NOT_USED" ) // Values returns all known values for FileFormat. Note that this can be expanded @@ -35,6 +91,24 @@ func (FileFormat) Values() []FileFormat { return []FileFormat{ "XML", "JSON", + "NOT_USED", + } +} + +type FromFormat string + +// Enum values for FromFormat +const ( + FromFormatX12 FromFormat = "X12" +) + +// Values returns all known values for FromFormat. 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 (FromFormat) Values() []FromFormat { + return []FromFormat{ + "X12", } } @@ -57,6 +131,61 @@ func (Logging) Values() []Logging { } } +type MappingTemplateLanguage string + +// Enum values for MappingTemplateLanguage +const ( + MappingTemplateLanguageXslt MappingTemplateLanguage = "XSLT" + MappingTemplateLanguageJsonata MappingTemplateLanguage = "JSONATA" +) + +// Values returns all known values for MappingTemplateLanguage. 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 (MappingTemplateLanguage) Values() []MappingTemplateLanguage { + return []MappingTemplateLanguage{ + "XSLT", + "JSONATA", + } +} + +type MappingType string + +// Enum values for MappingType +const ( + MappingTypeJsonata MappingType = "JSONATA" + MappingTypeXslt MappingType = "XSLT" +) + +// Values returns all known values for MappingType. 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 (MappingType) Values() []MappingType { + return []MappingType{ + "JSONATA", + "XSLT", + } +} + +type ToFormat string + +// Enum values for ToFormat +const ( + ToFormatX12 ToFormat = "X12" +) + +// Values returns all known values for ToFormat. 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 (ToFormat) Values() []ToFormat { + return []ToFormat{ + "X12", + } +} + type TransformerJobStatus string // Enum values for TransformerJobStatus diff --git a/service/b2bi/types/types.go b/service/b2bi/types/types.go index 6d5f2d31f67..6a148093ac6 100644 --- a/service/b2bi/types/types.go +++ b/service/b2bi/types/types.go @@ -27,6 +27,15 @@ type CapabilityConfigurationMemberEdi struct { func (*CapabilityConfigurationMemberEdi) isCapabilityConfiguration() {} +// Contains the details for an Outbound EDI capability. +type CapabilityOptions struct { + + // A structure that contains the outbound EDI options. + OutboundEdi OutboundEdiOptions + + noSmithyDocumentSerde +} + // Returns the capability summary details. A trading capability contains the // information required to transform incoming EDI documents into JSON or XML // outputs. @@ -59,6 +68,64 @@ type CapabilitySummary struct { noSmithyDocumentSerde } +// Describes the input for an outbound transformation. +type ConversionSource struct { + + // The format for the input file: either JSON or XML. + // + // This member is required. + FileFormat ConversionSourceFormat + + // File to be converted + // + // This member is required. + InputFile InputFileSource + + noSmithyDocumentSerde +} + +// Provide a sample of what the output of the transformation should look like. +type ConversionTarget struct { + + // Currently, only X12 format is supported. + // + // This member is required. + FileFormat ConversionTargetFormat + + // A structure that contains the formatting details for the conversion target. + FormatDetails ConversionTargetFormatDetails + + // Customer uses this to provide a sample on what should file look like after + // conversion X12 EDI use case around this would be discovering the file syntax + OutputSampleFile OutputSampleFileSource + + noSmithyDocumentSerde +} + +// Contains a structure describing the X12 details for the conversion target. +// +// The following types satisfy this interface: +// +// ConversionTargetFormatDetailsMemberX12 +type ConversionTargetFormatDetails interface { + isConversionTargetFormatDetails() +} + +// A structure that contains the X12 transaction set and version. The X12 +// structure is used when the system transforms an EDI (electronic data +// interchange) file. +// +// If an EDI input file contains more than one transaction, each transaction must +// have the same transaction set and version, for example 214/4010. If not, the +// transformer cannot parse the file. +type ConversionTargetFormatDetailsMemberX12 struct { + Value X12Details + + noSmithyDocumentSerde +} + +func (*ConversionTargetFormatDetailsMemberX12) isConversionTargetFormatDetails() {} + // Specifies the details for the EDI (electronic data interchange) transformation. type EdiConfiguration struct { @@ -84,6 +151,9 @@ type EdiConfiguration struct { // This member is required. Type EdiType + // Specifies whether this is capability is for inbound or outbound transformations. + CapabilityDirection CapabilityDirection + noSmithyDocumentSerde } @@ -109,6 +179,136 @@ type EdiTypeMemberX12Details struct { func (*EdiTypeMemberX12Details) isEdiType() {} +// A structure that contains the X12 transaction set and version. +// +// The following types satisfy this interface: +// +// FormatOptionsMemberX12 +type FormatOptions interface { + isFormatOptions() +} + +// A structure that contains the X12 transaction set and version. The X12 +// structure is used when the system transforms an EDI (electronic data +// interchange) file. +// +// If an EDI input file contains more than one transaction, each transaction must +// have the same transaction set and version, for example 214/4010. If not, the +// transformer cannot parse the file. +type FormatOptionsMemberX12 struct { + Value X12Details + + noSmithyDocumentSerde +} + +func (*FormatOptionsMemberX12) isFormatOptions() {} + +// Contains the input formatting options for an inbound transformer (takes an +// X12-formatted EDI document as input and converts it to JSON or XML. +type InputConversion struct { + + // The format for the transformer input: currently on X12 is supported. + // + // This member is required. + FromFormat FromFormat + + // A structure that contains the formatting options for an inbound transformer. + FormatOptions FormatOptions + + noSmithyDocumentSerde +} + +// The input file to use for an outbound transformation. +// +// The following types satisfy this interface: +// +// InputFileSourceMemberFileContent +type InputFileSource interface { + isInputFileSource() +} + +// Specify the input contents, as a string, for the source of an outbound +// transformation. +type InputFileSourceMemberFileContent struct { + Value string + + noSmithyDocumentSerde +} + +func (*InputFileSourceMemberFileContent) isInputFileSource() {} + +// Specifies the mapping template for the transformer. This template is used to +// map the parsed EDI file using JSONata or XSLT. +type Mapping struct { + + // The transformation language for the template, either XSLT or JSONATA. + // + // This member is required. + TemplateLanguage MappingTemplateLanguage + + // A string that represents the mapping template, in the transformation language + // specified in templateLanguage . + Template *string + + noSmithyDocumentSerde +} + +// A container for outbound EDI options. +// +// The following types satisfy this interface: +// +// OutboundEdiOptionsMemberX12 +type OutboundEdiOptions interface { + isOutboundEdiOptions() +} + +// A structure that contains an X12 envelope structure. +type OutboundEdiOptionsMemberX12 struct { + Value X12Envelope + + noSmithyDocumentSerde +} + +func (*OutboundEdiOptionsMemberX12) isOutboundEdiOptions() {} + +// Contains the formatting options for an outbound transformer (takes JSON or XML +// as input and converts it to an EDI document (currently only X12 format is +// supported). +type OutputConversion struct { + + // The format for the output from an outbound transformer: only X12 is currently + // supported. + // + // This member is required. + ToFormat ToFormat + + // A structure that contains the X12 transaction set and version for the + // transformer output. + FormatOptions FormatOptions + + noSmithyDocumentSerde +} + +// Container for the location of a sample file used for outbound transformations. +// +// The following types satisfy this interface: +// +// OutputSampleFileSourceMemberFileLocation +type OutputSampleFileSource interface { + isOutputSampleFileSource() +} + +// Specifies the details for the Amazon S3 file location that is being used with +// Amazon Web Services B2B Data Interchange. File locations in Amazon S3 are +// identified using a combination of the bucket and key. +type OutputSampleFileSourceMemberFileLocation struct { + Value S3Location + + noSmithyDocumentSerde +} + +func (*OutputSampleFileSourceMemberFileLocation) isOutputSampleFileSource() {} + // A structure that contains the details for a partnership. A partnership // represents the connection between you and your trading partner. It ties together // a profile and one or more trading capabilities. @@ -133,6 +333,9 @@ type PartnershipSummary struct { // Returns one or more capabilities associated with this partnership. Capabilities []string + // Contains the details for an Outbound EDI capability. + CapabilityOptions *CapabilityOptions + // Returns a timestamp that identifies the most recent date and time that the // partnership was modified. ModifiedAt *time.Time @@ -184,7 +387,7 @@ type ProfileSummary struct { } // Specifies the details for the Amazon S3 file location that is being used with -// Amazon Web Services B2BI Data Interchange. File locations in Amazon S3 are +// Amazon Web Services B2B Data Interchange. File locations in Amazon S3 are // identified using a combination of the bucket and key. type S3Location struct { @@ -197,6 +400,37 @@ type S3Location struct { noSmithyDocumentSerde } +// An array of the Amazon S3 keys used to identify the location for your sample +// documents. +type SampleDocumentKeys struct { + + // An array of keys for your input sample documents. + Input *string + + // An array of keys for your output sample documents. + Output *string + + noSmithyDocumentSerde +} + +// Describes a structure that contains the Amazon S3 bucket and an array of the +// corresponding keys used to identify the location for your sample documents. +type SampleDocuments struct { + + // Contains the Amazon S3 bucket that is used to hold your sample documents. + // + // This member is required. + BucketName *string + + // Contains an array of the Amazon S3 keys used to identify the location for your + // sample documents. + // + // This member is required. + Keys []SampleDocumentKeys + + noSmithyDocumentSerde +} + // Creates a key-value pair for a specific resource. Tags are metadata that you // can use to search for and group a resource for various purposes. You can apply // tags to capabilities, partnerships, profiles and transformers. A tag key can @@ -218,9 +452,35 @@ type Tag struct { noSmithyDocumentSerde } -// Contains the details for a transformer object. A transformer describes how to -// process the incoming EDI documents and extract the necessary information to the -// output file. +// A data structure that contains the information to use when generating a mapping +// template. +// +// The following types satisfy this interface: +// +// TemplateDetailsMemberX12 +type TemplateDetails interface { + isTemplateDetails() +} + +// A structure that contains the X12 transaction set and version. The X12 +// structure is used when the system transforms an EDI (electronic data +// interchange) file. +// +// If an EDI input file contains more than one transaction, each transaction must +// have the same transaction set and version, for example 214/4010. If not, the +// transformer cannot parse the file. +type TemplateDetailsMemberX12 struct { + Value X12Details + + noSmithyDocumentSerde +} + +func (*TemplateDetailsMemberX12) isTemplateDetails() {} + +// Contains the details for a transformer object. A transformer can take an EDI +// file as input and transform it into a JSON-or XML-formatted document. +// Alternatively, a transformer can take a JSON-or XML-formatted document as input +// and transform it into an EDI file. type TransformerSummary struct { // Returns a timestamp indicating when the transformer was created. For example, @@ -229,25 +489,6 @@ type TransformerSummary struct { // This member is required. CreatedAt *time.Time - // Returns the details for the EDI standard that is being used for the - // transformer. Currently, only X12 is supported. X12 is a set of standards and - // corresponding messages that define specific business documents. - // - // This member is required. - EdiType EdiType - - // Returns that the currently supported file formats for EDI transformations are - // JSON and XML . - // - // This member is required. - FileFormat FileFormat - - // Returns the mapping template for the transformer. This template is used to map - // the parsed EDI file using JSONata or XSLT. - // - // This member is required. - MappingTemplate *string - // Returns the descriptive name for the transformer. // // This member is required. @@ -265,14 +506,71 @@ type TransformerSummary struct { // This member is required. TransformerId *string + // Returns the details for the EDI standard that is being used for the + // transformer. Currently, only X12 is supported. X12 is a set of standards and + // corresponding messages that define specific business documents. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + EdiType EdiType + + // Returns that the currently supported file formats for EDI transformations are + // JSON and XML . + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + FileFormat FileFormat + + // Returns a structure that contains the format options for the transformation. + InputConversion *InputConversion + + // Returns the structure that contains the mapping template and its language + // (either XSLT or JSONATA). + Mapping *Mapping + + // Returns the mapping template for the transformer. This template is used to map + // the parsed EDI file using JSONata or XSLT. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. + MappingTemplate *string + // Returns a timestamp representing the date and time for the most recent change // for the transformer object. ModifiedAt *time.Time + // Returns the OutputConversion object, which contains the format options for the + // outbound transformation. + OutputConversion *OutputConversion + // Returns a sample EDI document that is used by a transformer as a guide for // processing the EDI data. + // + // Deprecated: This is a legacy trait. Please use input-conversion or + // output-conversion. SampleDocument *string + // Returns a structure that contains the Amazon S3 bucket and an array of the + // corresponding keys used to identify the location for your sample documents. + SampleDocuments *SampleDocuments + + noSmithyDocumentSerde +} + +// In X12 EDI messages, delimiters are used to mark the end of segments or +// elements, and are defined in the interchange control header. The delimiters are +// part of the message's syntax and divide up its different elements. +type X12Delimiters struct { + + // The component, or sub-element, separator. The default value is : (colon). + ComponentSeparator *string + + // The data element separator. The default value is * (asterisk). + DataElementSeparator *string + + // The segment terminator. The default value is ~ (tilde). + SegmentTerminator *string + noSmithyDocumentSerde } @@ -295,6 +593,117 @@ type X12Details struct { noSmithyDocumentSerde } +// A wrapper structure for an X12 definition object. +// +// the X12 envelope ensures the integrity of the data and the efficiency of the +// information exchange. The X12 message structure has hierarchical levels. From +// highest to the lowest, they are: +// +// - Interchange Envelope +// +// - Functional Group +// +// - Transaction Set +type X12Envelope struct { + + // A container for the X12 outbound EDI headers. + Common *X12OutboundEdiHeaders + + noSmithyDocumentSerde +} + +// Part of the X12 message structure. These are the functional group headers for +// the X12 EDI object. +type X12FunctionalGroupHeaders struct { + + // A value representing the code used to identify the party receiving a message, + // at position GS-03. + ApplicationReceiverCode *string + + // A value representing the code used to identify the party transmitting a + // message, at position GS-02. + ApplicationSenderCode *string + + // A code that identifies the issuer of the standard, at position GS-07. + ResponsibleAgencyCode *string + + noSmithyDocumentSerde +} + +// In X12, the Interchange Control Header is the first segment of an EDI document +// and is part of the Interchange Envelope. It contains information about the +// sender and receiver, the date and time of transmission, and the X12 version +// being used. It also includes delivery information, such as the sender and +// receiver IDs. +type X12InterchangeControlHeaders struct { + + // Located at position ISA-14 in the header. The value "1" indicates that the + // sender is requesting an interchange acknowledgment at receipt of the + // interchange. The value "0" is used otherwise. + AcknowledgmentRequestedCode *string + + // Located at position ISA-08 in the header. This value (along with the + // receiverIdQualifier ) identifies the intended recipient of the interchange. + ReceiverId *string + + // Located at position ISA-07 in the header. Qualifier for the receiver ID. + // Together, the ID and qualifier uniquely identify the receiving trading partner. + ReceiverIdQualifier *string + + // Located at position ISA-11 in the header. This string makes it easier when you + // need to group similar adjacent element values together without using extra + // segments. + // + // This parameter is only honored for version greater than 401 ( VERSION_4010 and + // higher). + // + // For versions less than 401, this field is called [StandardsId], in which case our service + // sets the value to U . + // + // [StandardsId]: https://www.stedi.com/edi/x12-004010/segment/ISA#ISA-11 + RepetitionSeparator *string + + // Located at position ISA-06 in the header. This value (along with the + // senderIdQualifier ) identifies the sender of the interchange. + SenderId *string + + // Located at position ISA-05 in the header. Qualifier for the sender ID. + // Together, the ID and qualifier uniquely identify the sending trading partner. + SenderIdQualifier *string + + // Located at position ISA-15 in the header. Specifies how this interchange is + // being used: + // + // - T indicates this interchange is for testing. + // + // - P indicates this interchange is for production. + // + // - I indicates this interchange is informational. + UsageIndicatorCode *string + + noSmithyDocumentSerde +} + +// A structure containing the details for an outbound EDI object. +type X12OutboundEdiHeaders struct { + + // The delimiters, for example semicolon ( ; ), that separates sections of the + // headers for the X12 object. + Delimiters *X12Delimiters + + // The functional group headers for the X12 object. + FunctionalGroupHeaders *X12FunctionalGroupHeaders + + // In X12 EDI messages, delimiters are used to mark the end of segments or + // elements, and are defined in the interchange control header. + InterchangeControlHeaders *X12InterchangeControlHeaders + + // Specifies whether or not to validate the EDI for this X12 object: TRUE or FALSE . + ValidateEdi *bool + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde // UnknownUnionMember is returned when a union member is returned over the wire, @@ -306,5 +715,11 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isCapabilityConfiguration() {} -func (*UnknownUnionMember) isEdiType() {} +func (*UnknownUnionMember) isCapabilityConfiguration() {} +func (*UnknownUnionMember) isConversionTargetFormatDetails() {} +func (*UnknownUnionMember) isEdiType() {} +func (*UnknownUnionMember) isFormatOptions() {} +func (*UnknownUnionMember) isInputFileSource() {} +func (*UnknownUnionMember) isOutboundEdiOptions() {} +func (*UnknownUnionMember) isOutputSampleFileSource() {} +func (*UnknownUnionMember) isTemplateDetails() {} diff --git a/service/b2bi/types/types_exported_test.go b/service/b2bi/types/types_exported_test.go index 95e210aef71..4b25732637b 100644 --- a/service/b2bi/types/types_exported_test.go +++ b/service/b2bi/types/types_exported_test.go @@ -25,6 +25,24 @@ func ExampleCapabilityConfiguration_outputUsage() { var _ *types.EdiConfiguration +func ExampleConversionTargetFormatDetails_outputUsage() { + var union types.ConversionTargetFormatDetails + // type switches can be used to check the union value + switch v := union.(type) { + case *types.ConversionTargetFormatDetailsMemberX12: + _ = v.Value // Value is types.X12Details + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.X12Details + func ExampleEdiType_outputUsage() { var union types.EdiType // type switches can be used to check the union value @@ -42,3 +60,93 @@ func ExampleEdiType_outputUsage() { } var _ *types.X12Details + +func ExampleFormatOptions_outputUsage() { + var union types.FormatOptions + // type switches can be used to check the union value + switch v := union.(type) { + case *types.FormatOptionsMemberX12: + _ = v.Value // Value is types.X12Details + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.X12Details + +func ExampleInputFileSource_outputUsage() { + var union types.InputFileSource + // type switches can be used to check the union value + switch v := union.(type) { + case *types.InputFileSourceMemberFileContent: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string + +func ExampleOutboundEdiOptions_outputUsage() { + var union types.OutboundEdiOptions + // type switches can be used to check the union value + switch v := union.(type) { + case *types.OutboundEdiOptionsMemberX12: + _ = v.Value // Value is types.X12Envelope + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.X12Envelope + +func ExampleOutputSampleFileSource_outputUsage() { + var union types.OutputSampleFileSource + // type switches can be used to check the union value + switch v := union.(type) { + case *types.OutputSampleFileSourceMemberFileLocation: + _ = v.Value // Value is types.S3Location + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.S3Location + +func ExampleTemplateDetails_outputUsage() { + var union types.TemplateDetails + // type switches can be used to check the union value + switch v := union.(type) { + case *types.TemplateDetailsMemberX12: + _ = v.Value // Value is types.X12Details + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.X12Details diff --git a/service/b2bi/validators.go b/service/b2bi/validators.go index 708e0c64e7d..be8305dc279 100644 --- a/service/b2bi/validators.go +++ b/service/b2bi/validators.go @@ -70,6 +70,26 @@ func (m *validateOpCreateProfile) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpCreateStarterMappingTemplate struct { +} + +func (*validateOpCreateStarterMappingTemplate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateStarterMappingTemplate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateStarterMappingTemplateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateStarterMappingTemplateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateTransformer struct { } @@ -330,6 +350,26 @@ func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpTestConversion struct { +} + +func (*validateOpTestConversion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTestConversion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TestConversionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTestConversionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpTestMapping struct { } @@ -482,6 +522,10 @@ func addOpCreateProfileValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateProfile{}, middleware.After) } +func addOpCreateStarterMappingTemplateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateStarterMappingTemplate{}, middleware.After) +} + func addOpCreateTransformerValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateTransformer{}, middleware.After) } @@ -534,6 +578,10 @@ func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } +func addOpTestConversionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTestConversion{}, middleware.After) +} + func addOpTestMappingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTestMapping{}, middleware.After) } @@ -581,6 +629,39 @@ func validateCapabilityConfiguration(v types.CapabilityConfiguration) error { } } +func validateConversionSource(v *types.ConversionSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConversionSource"} + if len(v.FileFormat) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("FileFormat")) + } + if v.InputFile == nil { + invalidParams.Add(smithy.NewErrParamRequired("InputFile")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateConversionTarget(v *types.ConversionTarget) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ConversionTarget"} + if len(v.FileFormat) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("FileFormat")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateEdiConfiguration(v *types.EdiConfiguration) error { if v == nil { return nil @@ -605,6 +686,69 @@ func validateEdiConfiguration(v *types.EdiConfiguration) error { } } +func validateInputConversion(v *types.InputConversion) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InputConversion"} + if len(v.FromFormat) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("FromFormat")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateMapping(v *types.Mapping) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Mapping"} + if len(v.TemplateLanguage) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("TemplateLanguage")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOutputConversion(v *types.OutputConversion) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OutputConversion"} + if len(v.ToFormat) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ToFormat")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateSampleDocuments(v *types.SampleDocuments) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SampleDocuments"} + if v.BucketName == nil { + invalidParams.Add(smithy.NewErrParamRequired("BucketName")) + } + if v.Keys == nil { + invalidParams.Add(smithy.NewErrParamRequired("Keys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -728,6 +872,24 @@ func validateOpCreateProfileInput(v *CreateProfileInput) error { } } +func validateOpCreateStarterMappingTemplateInput(v *CreateStarterMappingTemplateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateStarterMappingTemplateInput"} + if len(v.MappingType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("MappingType")) + } + if v.TemplateDetails == nil { + invalidParams.Add(smithy.NewErrParamRequired("TemplateDetails")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateTransformerInput(v *CreateTransformerInput) error { if v == nil { return nil @@ -736,20 +898,31 @@ func validateOpCreateTransformerInput(v *CreateTransformerInput) error { if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } - if len(v.FileFormat) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("FileFormat")) - } - if v.MappingTemplate == nil { - invalidParams.Add(smithy.NewErrParamRequired("MappingTemplate")) - } - if v.EdiType == nil { - invalidParams.Add(smithy.NewErrParamRequired("EdiType")) - } if v.Tags != nil { if err := validateTagList(v.Tags); err != nil { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.InputConversion != nil { + if err := validateInputConversion(v.InputConversion); err != nil { + invalidParams.AddNested("InputConversion", err.(smithy.InvalidParamsError)) + } + } + if v.Mapping != nil { + if err := validateMapping(v.Mapping); err != nil { + invalidParams.AddNested("Mapping", err.(smithy.InvalidParamsError)) + } + } + if v.OutputConversion != nil { + if err := validateOutputConversion(v.OutputConversion); err != nil { + invalidParams.AddNested("OutputConversion", err.(smithy.InvalidParamsError)) + } + } + if v.SampleDocuments != nil { + if err := validateSampleDocuments(v.SampleDocuments); err != nil { + invalidParams.AddNested("SampleDocuments", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -953,6 +1126,32 @@ func validateOpTagResourceInput(v *TagResourceInput) error { } } +func validateOpTestConversionInput(v *TestConversionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TestConversionInput"} + if v.Source == nil { + invalidParams.Add(smithy.NewErrParamRequired("Source")) + } else if v.Source != nil { + if err := validateConversionSource(v.Source); err != nil { + invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) + } + } + if v.Target == nil { + invalidParams.Add(smithy.NewErrParamRequired("Target")) + } else if v.Target != nil { + if err := validateConversionTarget(v.Target); err != nil { + invalidParams.AddNested("Target", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpTestMappingInput(v *TestMappingInput) error { if v == nil { return nil @@ -1071,6 +1270,26 @@ func validateOpUpdateTransformerInput(v *UpdateTransformerInput) error { if v.TransformerId == nil { invalidParams.Add(smithy.NewErrParamRequired("TransformerId")) } + if v.InputConversion != nil { + if err := validateInputConversion(v.InputConversion); err != nil { + invalidParams.AddNested("InputConversion", err.(smithy.InvalidParamsError)) + } + } + if v.Mapping != nil { + if err := validateMapping(v.Mapping); err != nil { + invalidParams.AddNested("Mapping", err.(smithy.InvalidParamsError)) + } + } + if v.OutputConversion != nil { + if err := validateOutputConversion(v.OutputConversion); err != nil { + invalidParams.AddNested("OutputConversion", err.(smithy.InvalidParamsError)) + } + } + if v.SampleDocuments != nil { + if err := validateSampleDocuments(v.SampleDocuments); err != nil { + invalidParams.AddNested("SampleDocuments", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/bedrock/internal/endpoints/endpoints.go b/service/bedrock/internal/endpoints/endpoints.go index b0ed9384164..589bcc7d8b6 100644 --- a/service/bedrock/internal/endpoints/endpoints.go +++ b/service/bedrock/internal/endpoints/endpoints.go @@ -142,6 +142,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, @@ -159,6 +162,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-northeast-1", }, }, + endpoints.EndpointKey{ + Region: "bedrock-ap-northeast-2", + }: endpoints.Endpoint{ + Hostname: "bedrock.ap-northeast-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-northeast-2", + }, + }, endpoints.EndpointKey{ Region: "bedrock-ap-south-1", }: endpoints.Endpoint{ @@ -239,6 +250,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-east-1", }, }, + endpoints.EndpointKey{ + Region: "bedrock-fips-us-east-2", + }: endpoints.Endpoint{ + Hostname: "bedrock-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + }, endpoints.EndpointKey{ Region: "bedrock-fips-us-west-2", }: endpoints.Endpoint{ @@ -255,6 +274,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "ap-northeast-1", }, }, + endpoints.EndpointKey{ + Region: "bedrock-runtime-ap-northeast-2", + }: endpoints.Endpoint{ + Hostname: "bedrock-runtime.ap-northeast-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-northeast-2", + }, + }, endpoints.EndpointKey{ Region: "bedrock-runtime-ap-south-1", }: endpoints.Endpoint{ @@ -335,6 +362,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-east-1", }, }, + endpoints.EndpointKey{ + Region: "bedrock-runtime-fips-us-east-2", + }: endpoints.Endpoint{ + Hostname: "bedrock-runtime-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + }, endpoints.EndpointKey{ Region: "bedrock-runtime-fips-us-west-2", }: endpoints.Endpoint{ @@ -359,6 +394,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-east-1", }, }, + endpoints.EndpointKey{ + Region: "bedrock-runtime-us-east-2", + }: endpoints.Endpoint{ + Hostname: "bedrock-runtime.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + }, endpoints.EndpointKey{ Region: "bedrock-runtime-us-west-2", }: endpoints.Endpoint{ @@ -383,6 +426,14 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-east-1", }, }, + endpoints.EndpointKey{ + Region: "bedrock-us-east-2", + }: endpoints.Endpoint{ + Hostname: "bedrock.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + }, endpoints.EndpointKey{ Region: "bedrock-us-west-2", }: endpoints.Endpoint{ @@ -412,6 +463,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, diff --git a/service/bedrockagentruntime/deserializers.go b/service/bedrockagentruntime/deserializers.go index cf969b6ea63..01264bf46ac 100644 --- a/service/bedrockagentruntime/deserializers.go +++ b/service/bedrockagentruntime/deserializers.go @@ -4586,11 +4586,21 @@ func awsRestjson1_deserializeDocumentPostProcessingModelInvocationOutput(v **typ for key, value := range shape { switch key { + case "metadata": + if err := awsRestjson1_deserializeDocumentMetadata(&sv.Metadata, value); err != nil { + return err + } + case "parsedResponse": if err := awsRestjson1_deserializeDocumentPostProcessingParsedResponse(&sv.ParsedResponse, value); err != nil { return err } + case "rawResponse": + if err := awsRestjson1_deserializeDocumentRawResponse(&sv.RawResponse, value); err != nil { + return err + } + case "traceId": if value != nil { jtv, ok := value.(string) @@ -4721,11 +4731,21 @@ func awsRestjson1_deserializeDocumentPreProcessingModelInvocationOutput(v **type for key, value := range shape { switch key { + case "metadata": + if err := awsRestjson1_deserializeDocumentMetadata(&sv.Metadata, value); err != nil { + return err + } + case "parsedResponse": if err := awsRestjson1_deserializeDocumentPreProcessingParsedResponse(&sv.ParsedResponse, value); err != nil { return err } + case "rawResponse": + if err := awsRestjson1_deserializeDocumentRawResponse(&sv.RawResponse, value); err != nil { + return err + } + case "traceId": if value != nil { jtv, ok := value.(string) diff --git a/service/bedrockagentruntime/types/types.go b/service/bedrockagentruntime/types/types.go index 57a92ff83e4..42952dc09ae 100644 --- a/service/bedrockagentruntime/types/types.go +++ b/service/bedrockagentruntime/types/types.go @@ -329,14 +329,14 @@ type ExternalSourcesGenerationConfiguration struct { // retrieveAndGenerate function. type ExternalSourcesRetrieveAndGenerateConfiguration struct { - // The modelArn used with the external source wrapper object in the - // retrieveAndGenerate function. + // The model Amazon Resource Name (ARN) for the external source wrapper object in + // the retrieveAndGenerate function. // // This member is required. ModelArn *string - // The document used with the external source wrapper object in the - // retrieveAndGenerate function. + // The document for the external source wrapper object in the retrieveAndGenerate + // function. // // This member is required. Sources []ExternalSource @@ -1540,10 +1540,16 @@ type PayloadPart struct { // The foundation model output from the post-processing step. type PostProcessingModelInvocationOutput struct { + // Provides details of the foundation model. + Metadata *Metadata + // Details about the response from the Lambda parsing of the output of the // post-processing step. ParsedResponse *PostProcessingParsedResponse + // Contains the raw output from the foundation model. + RawResponse *RawResponse + // The unique identifier of the trace. TraceId *string @@ -1600,10 +1606,16 @@ func (*PostProcessingTraceMemberModelInvocationOutput) isPostProcessingTrace() { // The foundation model output from the pre-processing step. type PreProcessingModelInvocationOutput struct { + // Provides details of the foundation model. + Metadata *Metadata + // Details about the response from the Lambda parsing of the output of the // pre-processing step. ParsedResponse *PreProcessingParsedResponse + // Contains the raw output from the foundation model. + RawResponse *RawResponse + // The unique identifier of the trace. TraceId *string @@ -2190,16 +2202,21 @@ type RetrievalResultWebLocation struct { // [RetrieveAndGenerate request]: https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax type RetrieveAndGenerateConfiguration struct { - // The type of resource that is queried by the request. + // The type of resource that contains your data for retrieving information and + // generating responses. + // + // If you choose ot use EXTERNAL_SOURCES , then currently only Claude 3 Sonnet + // models for knowledge bases are supported. // // This member is required. Type RetrieveAndGenerateType - // The configuration used with the external source wrapper object in the + // The configuration for the external source wrapper object in the // retrieveAndGenerate function. ExternalSourcesConfiguration *ExternalSourcesRetrieveAndGenerateConfiguration - // Contains details about the resource being queried. + // Contains details about the knowledge base for retrieving information and + // generating responses. KnowledgeBaseConfiguration *KnowledgeBaseRetrieveAndGenerateConfiguration noSmithyDocumentSerde diff --git a/service/bedrockruntime/api_op_ApplyGuardrail.go b/service/bedrockruntime/api_op_ApplyGuardrail.go index 8308c0a4d8d..9fbc5d23281 100644 --- a/service/bedrockruntime/api_op_ApplyGuardrail.go +++ b/service/bedrockruntime/api_op_ApplyGuardrail.go @@ -74,6 +74,9 @@ type ApplyGuardrailOutput struct { // This member is required. Usage *types.GuardrailUsage + // The guardrail coverage details in the apply guardrail response. + GuardrailCoverage *types.GuardrailCoverage + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/bedrockruntime/deserializers.go b/service/bedrockruntime/deserializers.go index 036a66f5b1f..8bd68281fe1 100644 --- a/service/bedrockruntime/deserializers.go +++ b/service/bedrockruntime/deserializers.go @@ -202,6 +202,11 @@ func awsRestjson1_deserializeOpDocumentApplyGuardrailOutput(v **ApplyGuardrailOu return err } + case "guardrailCoverage": + if err := awsRestjson1_deserializeDocumentGuardrailCoverage(&sv.GuardrailCoverage, value); err != nil { + return err + } + case "outputs": if err := awsRestjson1_deserializeDocumentGuardrailOutputContentList(&sv.Outputs, value); err != nil { return err @@ -2215,6 +2220,11 @@ func awsRestjson1_deserializeDocumentGuardrailAssessment(v **types.GuardrailAsse return err } + case "invocationMetrics": + if err := awsRestjson1_deserializeDocumentGuardrailInvocationMetrics(&sv.InvocationMetrics, value); err != nil { + return err + } + case "sensitiveInformationPolicy": if err := awsRestjson1_deserializeDocumentGuardrailSensitiveInformationPolicyAssessment(&sv.SensitiveInformationPolicy, value); err != nil { return err @@ -2382,6 +2392,15 @@ func awsRestjson1_deserializeDocumentGuardrailContentFilter(v **types.GuardrailC sv.Confidence = types.GuardrailContentFilterConfidence(jtv) } + case "filterStrength": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GuardrailContentFilterStrength to be of type string, got %T instead", value) + } + sv.FilterStrength = types.GuardrailContentFilterStrength(jtv) + } + case "type": if value != nil { jtv, ok := value.(string) @@ -2657,6 +2676,42 @@ func awsRestjson1_deserializeDocumentGuardrailContextualGroundingPolicyAssessmen return nil } +func awsRestjson1_deserializeDocumentGuardrailCoverage(v **types.GuardrailCoverage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.GuardrailCoverage + if *v == nil { + sv = &types.GuardrailCoverage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "textCharacters": + if err := awsRestjson1_deserializeDocumentGuardrailTextCharactersCoverage(&sv.TextCharacters, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGuardrailCustomWord(v **types.GuardrailCustomWord, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -2740,6 +2795,60 @@ func awsRestjson1_deserializeDocumentGuardrailCustomWordList(v *[]types.Guardrai return nil } +func awsRestjson1_deserializeDocumentGuardrailInvocationMetrics(v **types.GuardrailInvocationMetrics, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.GuardrailInvocationMetrics + if *v == nil { + sv = &types.GuardrailInvocationMetrics{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "guardrailCoverage": + if err := awsRestjson1_deserializeDocumentGuardrailCoverage(&sv.GuardrailCoverage, value); err != nil { + return err + } + + case "guardrailProcessingLatency": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GuardrailProcessingLatency to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.GuardrailProcessingLatency = ptr.Int64(i64) + } + + case "usage": + if err := awsRestjson1_deserializeDocumentGuardrailUsage(&sv.Usage, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGuardrailManagedWord(v **types.GuardrailManagedWord, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3066,6 +3175,63 @@ func awsRestjson1_deserializeDocumentGuardrailSensitiveInformationPolicyAssessme return nil } +func awsRestjson1_deserializeDocumentGuardrailTextCharactersCoverage(v **types.GuardrailTextCharactersCoverage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.GuardrailTextCharactersCoverage + if *v == nil { + sv = &types.GuardrailTextCharactersCoverage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "guarded": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TextCharactersGuarded to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Guarded = ptr.Int32(int32(i64)) + } + + case "total": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TextCharactersTotal to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Total = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGuardrailTopic(v **types.GuardrailTopic, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -3240,6 +3406,115 @@ func awsRestjson1_deserializeDocumentGuardrailTraceAssessment(v **types.Guardrai return nil } +func awsRestjson1_deserializeDocumentGuardrailUsage(v **types.GuardrailUsage, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.GuardrailUsage + if *v == nil { + sv = &types.GuardrailUsage{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "contentPolicyUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GuardrailContentPolicyUnitsProcessed to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ContentPolicyUnits = ptr.Int32(int32(i64)) + } + + case "contextualGroundingPolicyUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GuardrailContextualGroundingPolicyUnitsProcessed to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ContextualGroundingPolicyUnits = ptr.Int32(int32(i64)) + } + + case "sensitiveInformationPolicyFreeUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GuardrailSensitiveInformationPolicyFreeUnitsProcessed to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SensitiveInformationPolicyFreeUnits = ptr.Int32(int32(i64)) + } + + case "sensitiveInformationPolicyUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GuardrailSensitiveInformationPolicyUnitsProcessed to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SensitiveInformationPolicyUnits = ptr.Int32(int32(i64)) + } + + case "topicPolicyUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GuardrailTopicPolicyUnitsProcessed to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TopicPolicyUnits = ptr.Int32(int32(i64)) + } + + case "wordPolicyUnits": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected GuardrailWordPolicyUnitsProcessed to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WordPolicyUnits = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentGuardrailWordPolicyAssessment(v **types.GuardrailWordPolicyAssessment, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -4542,115 +4817,6 @@ func awsRestjson1_deserializeDocumentGuardrailOutputContentList(v *[]types.Guard return nil } -func awsRestjson1_deserializeDocumentGuardrailUsage(v **types.GuardrailUsage, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.GuardrailUsage - if *v == nil { - sv = &types.GuardrailUsage{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "contentPolicyUnits": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected GuardrailContentPolicyUnitsProcessed to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ContentPolicyUnits = ptr.Int32(int32(i64)) - } - - case "contextualGroundingPolicyUnits": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected GuardrailContextualGroundingPolicyUnitsProcessed to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ContextualGroundingPolicyUnits = ptr.Int32(int32(i64)) - } - - case "sensitiveInformationPolicyFreeUnits": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected GuardrailSensitiveInformationPolicyFreeUnitsProcessed to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.SensitiveInformationPolicyFreeUnits = ptr.Int32(int32(i64)) - } - - case "sensitiveInformationPolicyUnits": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected GuardrailSensitiveInformationPolicyUnitsProcessed to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.SensitiveInformationPolicyUnits = ptr.Int32(int32(i64)) - } - - case "topicPolicyUnits": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected GuardrailTopicPolicyUnitsProcessed to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.TopicPolicyUnits = ptr.Int32(int32(i64)) - } - - case "wordPolicyUnits": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected GuardrailWordPolicyUnitsProcessed to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.WordPolicyUnits = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeDocumentImageBlock(v **types.ImageBlock, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/bedrockruntime/types/enums.go b/service/bedrockruntime/types/enums.go index 9aa3798b53a..726bcd7c415 100644 --- a/service/bedrockruntime/types/enums.go +++ b/service/bedrockruntime/types/enums.go @@ -97,6 +97,30 @@ func (GuardrailContentFilterConfidence) Values() []GuardrailContentFilterConfide } } +type GuardrailContentFilterStrength string + +// Enum values for GuardrailContentFilterStrength +const ( + GuardrailContentFilterStrengthNone GuardrailContentFilterStrength = "NONE" + GuardrailContentFilterStrengthLow GuardrailContentFilterStrength = "LOW" + GuardrailContentFilterStrengthMedium GuardrailContentFilterStrength = "MEDIUM" + GuardrailContentFilterStrengthHigh GuardrailContentFilterStrength = "HIGH" +) + +// Values returns all known values for GuardrailContentFilterStrength. 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 (GuardrailContentFilterStrength) Values() []GuardrailContentFilterStrength { + return []GuardrailContentFilterStrength{ + "NONE", + "LOW", + "MEDIUM", + "HIGH", + } +} + type GuardrailContentFilterType string // Enum values for GuardrailContentFilterType diff --git a/service/bedrockruntime/types/types.go b/service/bedrockruntime/types/types.go index 42c713f4fd4..1583fec4b19 100644 --- a/service/bedrockruntime/types/types.go +++ b/service/bedrockruntime/types/types.go @@ -407,6 +407,9 @@ type GuardrailAssessment struct { // The contextual grounding policy used for the guardrail assessment. ContextualGroundingPolicy *GuardrailContextualGroundingPolicyAssessment + // The invocation metrics for the guardrail assessment. + InvocationMetrics *GuardrailInvocationMetrics + // The sensitive information policy. SensitiveInformationPolicy *GuardrailSensitiveInformationPolicyAssessment @@ -476,6 +479,9 @@ type GuardrailContentFilter struct { // This member is required. Type GuardrailContentFilterType + // The filter strength setting for the guardrail content filter. + FilterStrength GuardrailContentFilterStrength + noSmithyDocumentSerde } @@ -562,6 +568,15 @@ type GuardrailConverseTextBlock struct { noSmithyDocumentSerde } +// The action of the guardrail coverage details. +type GuardrailCoverage struct { + + // The text characters of the guardrail coverage details. + TextCharacters *GuardrailTextCharactersCoverage + + noSmithyDocumentSerde +} + // A custom word configured in a guardrail. type GuardrailCustomWord struct { @@ -578,6 +593,21 @@ type GuardrailCustomWord struct { noSmithyDocumentSerde } +// The invocation metrics for the guardrail. +type GuardrailInvocationMetrics struct { + + // The coverage details for the guardrail invocation metrics. + GuardrailCoverage *GuardrailCoverage + + // The processing latency details for the guardrail invocation metrics. + GuardrailProcessingLatency *int64 + + // The usage details for the guardrail invocation metrics. + Usage *GuardrailUsage + + noSmithyDocumentSerde +} + // A managed word configured in a guardrail. type GuardrailManagedWord struct { @@ -704,6 +734,18 @@ type GuardrailTextBlock struct { noSmithyDocumentSerde } +// The guardrail coverage for the text characters. +type GuardrailTextCharactersCoverage struct { + + // The text characters that were guarded by the guardrail coverage. + Guarded *int32 + + // The total text characters by the guardrail coverage. + Total *int32 + + noSmithyDocumentSerde +} + // Information about a topic guardrail. type GuardrailTopic struct { diff --git a/service/firehose/internal/endpoints/endpoints.go b/service/firehose/internal/endpoints/endpoints.go index 53cb200a8ba..af487bcf675 100644 --- a/service/firehose/internal/endpoints/endpoints.go +++ b/service/firehose/internal/endpoints/endpoints.go @@ -142,69 +142,195 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "af-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.af-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-northeast-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-northeast-2.api.aws", + }, endpoints.EndpointKey{ Region: "ap-northeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-northeast-3.api.aws", + }, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-south-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-south-2.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-southeast-1.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-southeast-2.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-southeast-3.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-4", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ap-southeast-4.api.aws", + }, endpoints.EndpointKey{ Region: "ap-southeast-5", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ca-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "ca-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.ca-west-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-central-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-central-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-north-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-south-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-south-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-west-1.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-west-2.api.aws", + }, endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.eu-west-3.api.aws", + }, endpoints.EndpointKey{ Region: "fips-us-east-1", }: endpoints.Endpoint{ @@ -244,15 +370,39 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "il-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.il-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.me-central-1.api.aws", + }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.me-south-1.api.aws", + }, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.sa-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, @@ -262,6 +412,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "firehose-fips.us-east-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "firehose-fips.us-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.us-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, @@ -271,6 +433,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "firehose-fips.us-east-2.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "firehose-fips.us-east-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.us-east-2.api.aws", + }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, @@ -280,6 +454,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "firehose-fips.us-west-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "firehose-fips.us-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.us-west-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, @@ -289,6 +475,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "firehose-fips.us-west-2.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "firehose-fips.us-west-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "firehose.us-west-2.api.aws", + }, }, }, { diff --git a/service/iotdeviceadvisor/api_client.go b/service/iotdeviceadvisor/api_client.go index 9039095b4b5..284e48cd902 100644 --- a/service/iotdeviceadvisor/api_client.go +++ b/service/iotdeviceadvisor/api_client.go @@ -4,6 +4,7 @@ package iotdeviceadvisor import ( "context" + cryptorand "crypto/rand" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" @@ -22,6 +23,7 @@ import ( "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" @@ -185,6 +187,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4(&options) + resolveIdempotencyTokenProvider(&options) + resolveEndpointResolverV2(&options) resolveMeterProvider(&options) @@ -678,6 +682,13 @@ func addIsPaginatorUserAgent(o *Options) { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -772,6 +783,11 @@ func resolveMeterProvider(options *Options) { } } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go b/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go index 48dd0be63bc..501e7649326 100644 --- a/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go +++ b/service/iotdeviceadvisor/api_op_CreateSuiteDefinition.go @@ -39,6 +39,11 @@ type CreateSuiteDefinitionInput struct { // This member is required. SuiteDefinitionConfiguration *types.SuiteDefinitionConfiguration + // The client token for the test suite definition creation. This token is used for + // tracking test suite definition creation using retries and obtaining its status. + // This parameter is optional. + ClientToken *string + // The tags to be attached to the suite definition. Tags map[string]string @@ -129,6 +134,9 @@ func (c *Client) addOperationCreateSuiteDefinitionMiddlewares(stack *middleware. if err = addUserAgentRetryMode(stack, options); err != nil { return err } + if err = addIdempotencyToken_opCreateSuiteDefinitionMiddleware(stack, options); err != nil { + return err + } if err = addOpCreateSuiteDefinitionValidationMiddleware(stack); err != nil { return err } @@ -165,6 +173,39 @@ func (c *Client) addOperationCreateSuiteDefinitionMiddlewares(stack *middleware. return nil } +type idempotencyToken_initializeOpCreateSuiteDefinition struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateSuiteDefinition) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateSuiteDefinition) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateSuiteDefinitionInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateSuiteDefinitionInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateSuiteDefinitionMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateSuiteDefinition{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + func newServiceMetadataMiddleware_opCreateSuiteDefinition(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, diff --git a/service/iotdeviceadvisor/options.go b/service/iotdeviceadvisor/options.go index 337c6d3dc15..7300219aab6 100644 --- a/service/iotdeviceadvisor/options.go +++ b/service/iotdeviceadvisor/options.go @@ -65,6 +65,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger diff --git a/service/iotdeviceadvisor/serializers.go b/service/iotdeviceadvisor/serializers.go index d9cd7692c6e..49e7a9052ee 100644 --- a/service/iotdeviceadvisor/serializers.go +++ b/service/iotdeviceadvisor/serializers.go @@ -88,6 +88,11 @@ func awsRestjson1_serializeOpDocumentCreateSuiteDefinitionInput(v *CreateSuiteDe object := value.Object() defer object.Close() + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + if v.SuiteDefinitionConfiguration != nil { ok := object.Key("suiteDefinitionConfiguration") if err := awsRestjson1_serializeDocumentSuiteDefinitionConfiguration(v.SuiteDefinitionConfiguration, ok); err != nil { diff --git a/service/iotdeviceadvisor/snapshot/api_op_CreateSuiteDefinition.go.snap b/service/iotdeviceadvisor/snapshot/api_op_CreateSuiteDefinition.go.snap index 030ca6d3504..a1764fe8b6a 100644 --- a/service/iotdeviceadvisor/snapshot/api_op_CreateSuiteDefinition.go.snap +++ b/service/iotdeviceadvisor/snapshot/api_op_CreateSuiteDefinition.go.snap @@ -2,6 +2,7 @@ CreateSuiteDefinition Initialize stack step spanInitializeStart RegisterServiceMetadata + OperationIdempotencyTokenAutoFill legacyEndpointContextSetter SetLogger OperationInputValidation diff --git a/service/ivsrealtime/types/enums.go b/service/ivsrealtime/types/enums.go index 31bcccee87c..927519b390a 100644 --- a/service/ivsrealtime/types/enums.go +++ b/service/ivsrealtime/types/enums.go @@ -69,6 +69,9 @@ const ( EventErrorCodeInvalidProtocol EventErrorCode = "INVALID_PROTOCOL" EventErrorCodeInvalidStreamKey EventErrorCode = "INVALID_STREAM_KEY" EventErrorCodeReuseOfStreamKey EventErrorCode = "REUSE_OF_STREAM_KEY" + EventErrorCodeBFramePresent EventErrorCode = "B_FRAME_PRESENT" + EventErrorCodeInvalidInput EventErrorCode = "INVALID_INPUT" + EventErrorCodeInternalServerException EventErrorCode = "INTERNAL_SERVER_EXCEPTION" ) // Values returns all known values for EventErrorCode. Note that this can be @@ -88,6 +91,9 @@ func (EventErrorCode) Values() []EventErrorCode { "INVALID_PROTOCOL", "INVALID_STREAM_KEY", "REUSE_OF_STREAM_KEY", + "B_FRAME_PRESENT", + "INVALID_INPUT", + "INTERNAL_SERVER_EXCEPTION", } } diff --git a/service/ivsrealtime/types/types.go b/service/ivsrealtime/types/types.go index 20fb6206381..0db2b3933ea 100644 --- a/service/ivsrealtime/types/types.go +++ b/service/ivsrealtime/types/types.go @@ -270,15 +270,53 @@ type Event struct { // If the event is an error event, the error code is provided to give insight into // the specific error that occurred. If the event is not an error event, this field - // is null. INSUFFICIENT_CAPABILITIES indicates that the participant tried to take - // an action that the participant’s token is not allowed to do. For more - // information about participant capabilities, see the capabilities field in CreateParticipantToken. - // QUOTA_EXCEEDED indicates that the number of participants who want to - // publish/subscribe to a stage exceeds the quota; for more information, see [Service Quotas]. - // PUBLISHER_NOT_FOUND indicates that the participant tried to subscribe to a - // publisher that doesn’t exist. + // is null. // + // - B_FRAME_PRESENT — The participant's stream includes B-frames. For details, + // see [IVS RTMP Publishing]. + // + // - BITRATE_EXCEEDED — The participant exceeded the maximum supported bitrate. + // For details, see [Service Quotas]. + // + // - INSUFFICIENT_CAPABILITIES — The participant tried to take an action that the + // participant’s token is not allowed to do. For details on participant + // capabilities, see the capabilities field in CreateParticipantToken. + // + // - INTERNAL_SERVER_EXCEPTION — The participant failed to publish to the stage + // due to an internal server error. + // + // - INVALID_AUDIO_CODEC — The participant is using an invalid audio codec. For + // details, see [Stream Ingest]. + // + // - INVALID_INPUT — The participant is using an invalid input stream. + // + // - INVALID_PROTOCOL — The participant's IngestConfiguration resource is + // configured for RTMPS but they tried streaming with RTMP. For details, see [IVS RTMP Publishing]. + // + // - INVALID_STREAM_KEY — The participant is using an invalid stream key. For + // details, see [IVS RTMP Publishing]. + // + // - INVALID_VIDEO_CODEC — The participant is using an invalid video codec. For + // details, see [Stream Ingest]. + // + // - PUBLISHER_NOT_FOUND — The participant tried to subscribe to a publisher that + // doesn’t exist. + // + // - QUOTA_EXCEEDED — The number of participants who want to publish/subscribe to + // a stage exceeds the quota. For details, see [Service Quotas]. + // + // - RESOLUTION_EXCEEDED — The participant exceeded the maximum supported + // resolution. For details, see [Service Quotas]. + // + // - REUSE_OF_STREAM_KEY — The participant tried to use a stream key that is + // associated with another active stage session. + // + // - STREAM_DURATION_EXCEEDED — The participant exceeded the maximum allowed + // stream duration. For details, see [Service Quotas]. + // + // [Stream Ingest]: https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-stream-ingest.html // [Service Quotas]: https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/service-quotas.html + // [IVS RTMP Publishing]: https://docs.aws.amazon.com/ivs/latest/RealTimeUserGuide/rt-rtmp-publishing.html ErrorCode EventErrorCode // ISO 8601 timestamp (returned as a string) for when the event occurred. @@ -934,14 +972,14 @@ type Video struct { // Video frame rate, in fps. Default: 30. Framerate *float32 - // Video-resolution height. Note that the maximum value is determined by width - // times height , such that the maximum total pixels is 2073600 (1920x1080 or - // 1080x1920). Default: 720. + // Video-resolution height. This must be an even number. Note that the maximum + // value is determined by width times height , such that the maximum total pixels + // is 2073600 (1920x1080 or 1080x1920). Default: 720. Height *int32 - // Video-resolution width. Note that the maximum value is determined by width - // times height , such that the maximum total pixels is 2073600 (1920x1080 or - // 1080x1920). Default: 1280. + // Video-resolution width. This must be an even number. Note that the maximum + // value is determined by width times height , such that the maximum total pixels + // is 2073600 (1920x1080 or 1080x1920). Default: 1280. Width *int32 noSmithyDocumentSerde diff --git a/service/s3/api_op_CompleteMultipartUpload.go b/service/s3/api_op_CompleteMultipartUpload.go index 67397d8b1dc..84279309232 100644 --- a/service/s3/api_op_CompleteMultipartUpload.go +++ b/service/s3/api_op_CompleteMultipartUpload.go @@ -209,7 +209,7 @@ type CompleteMultipartUploadInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html @@ -217,8 +217,8 @@ type CompleteMultipartUploadInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32C checksum of the object. For more information, see [Checking object integrity] - // in the Amazon S3 User Guide. + // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see + // [Checking object integrity]in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32C *string @@ -325,7 +325,7 @@ type CompleteMultipartUploadOutput struct { // encryption with Key Management Service (KMS) keys (SSE-KMS). BucketKeyEnabled *bool - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -336,7 +336,7 @@ type CompleteMultipartUploadOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the diff --git a/service/s3/api_op_GetBucketLifecycleConfiguration.go b/service/s3/api_op_GetBucketLifecycleConfiguration.go index 325519fb3a3..d717617e847 100644 --- a/service/s3/api_op_GetBucketLifecycleConfiguration.go +++ b/service/s3/api_op_GetBucketLifecycleConfiguration.go @@ -100,6 +100,22 @@ type GetBucketLifecycleConfigurationOutput struct { // Container for a lifecycle rule. Rules []types.LifecycleRule + // Indicates which default minimum object size behavior is applied to the + // lifecycle configuration. + // + // - all_storage_classes_128K - Objects smaller than 128 KB will not transition + // to any storage class by default. + // + // - varies_by_storage_class - Objects smaller than 128 KB will transition to + // Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, + // all other storage classes will prevent transitions smaller than 128 KB. + // + // To customize the minimum object size for any transition you can add a filter + // that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body + // of your transition rule. Custom filters always take precedence over the default + // transition behavior. + TransitionDefaultMinimumObjectSize types.TransitionDefaultMinimumObjectSize + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/s3/api_op_GetObject.go b/service/s3/api_op_GetObject.go index 3dc9b36a5a1..0a9785d2e32 100644 --- a/service/s3/api_op_GetObject.go +++ b/service/s3/api_op_GetObject.go @@ -446,14 +446,14 @@ type GetObjectOutput struct { // Specifies caching behavior along the request/reply chain. CacheControl *string - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // diff --git a/service/s3/api_op_HeadObject.go b/service/s3/api_op_HeadObject.go index 8c23e5c0f58..198d05f1773 100644 --- a/service/s3/api_op_HeadObject.go +++ b/service/s3/api_op_HeadObject.go @@ -35,7 +35,8 @@ import ( // - General purpose bucket permissions - To use HEAD , you must have the // s3:GetObject permission. You need the relevant read object (or version) // permission for this operation. For more information, see [Actions, resources, and condition keys for Amazon S3]in the Amazon S3 -// User Guide. +// User Guide. For more information about the permissions to S3 API operations by +// S3 resource types, see Required permissions for Amazon S3 API operationsin the Amazon S3 User Guide. // // If the object you request doesn't exist, the error that Amazon S3 returns // @@ -377,7 +378,7 @@ type HeadObjectOutput struct { // Specifies caching behavior along the request/reply chain. CacheControl *string - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -388,7 +389,7 @@ type HeadObjectOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the diff --git a/service/s3/api_op_PutBucketLifecycleConfiguration.go b/service/s3/api_op_PutBucketLifecycleConfiguration.go index 399104dfe08..4ab7b63b01e 100644 --- a/service/s3/api_op_PutBucketLifecycleConfiguration.go +++ b/service/s3/api_op_PutBucketLifecycleConfiguration.go @@ -23,17 +23,19 @@ import ( // they must be included in the new lifecycle configuration. For information about // lifecycle configuration, see [Managing your storage lifecycle]. // -// Bucket lifecycle configuration now supports specifying a lifecycle rule using -// an object key name prefix, one or more object tags, object size, or any -// combination of these. Accordingly, this section describes the latest API. The -// previous version of the API supported filtering based only on an object key name -// prefix, which is supported for backward compatibility. For the related API -// description, see [PutBucketLifecycle]. -// // Rules You specify the lifecycle configuration in your request body. The // lifecycle configuration is specified as XML consisting of one or more rules. An // Amazon S3 Lifecycle configuration can have up to 1,000 rules. This limit is not -// adjustable. Each rule consists of the following: +// adjustable. +// +// Bucket lifecycle configuration supports specifying a lifecycle rule using an +// object key name prefix, one or more object tags, object size, or any combination +// of these. Accordingly, this section describes the latest API. The previous +// version of the API supported filtering based only on an object key name prefix, +// which is supported for backward compatibility. For the related API description, +// see [PutBucketLifecycle]. +// +// A lifecycle rule consists of the following: // // - A filter identifying a subset of objects to which the rule applies. The // filter can be based on a key name prefix, object tags, object size, or any @@ -129,6 +131,22 @@ type PutBucketLifecycleConfigurationInput struct { // Container for lifecycle rules. You can add as many as 1,000 rules. LifecycleConfiguration *types.BucketLifecycleConfiguration + // Indicates which default minimum object size behavior is applied to the + // lifecycle configuration. + // + // - all_storage_classes_128K - Objects smaller than 128 KB will not transition + // to any storage class by default. + // + // - varies_by_storage_class - Objects smaller than 128 KB will transition to + // Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, + // all other storage classes will prevent transitions smaller than 128 KB. + // + // To customize the minimum object size for any transition you can add a filter + // that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body + // of your transition rule. Custom filters always take precedence over the default + // transition behavior. + TransitionDefaultMinimumObjectSize types.TransitionDefaultMinimumObjectSize + noSmithyDocumentSerde } @@ -139,6 +157,23 @@ func (in *PutBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointPa } type PutBucketLifecycleConfigurationOutput struct { + + // Indicates which default minimum object size behavior is applied to the + // lifecycle configuration. + // + // - all_storage_classes_128K - Objects smaller than 128 KB will not transition + // to any storage class by default. + // + // - varies_by_storage_class - Objects smaller than 128 KB will transition to + // Glacier Flexible Retrieval or Glacier Deep Archive storage classes. By default, + // all other storage classes will prevent transitions smaller than 128 KB. + // + // To customize the minimum object size for any transition you can add a filter + // that specifies a custom ObjectSizeGreaterThan or ObjectSizeLessThan in the body + // of your transition rule. Custom filters always take precedence over the default + // transition behavior. + TransitionDefaultMinimumObjectSize types.TransitionDefaultMinimumObjectSize + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata diff --git a/service/s3/api_op_PutObject.go b/service/s3/api_op_PutObject.go index d1f61a79b8e..9dc442f7d82 100644 --- a/service/s3/api_op_PutObject.go +++ b/service/s3/api_op_PutObject.go @@ -264,7 +264,7 @@ type PutObjectInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html @@ -272,8 +272,8 @@ type PutObjectInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32C checksum of the object. For more information, see [Checking object integrity] - // in the Amazon S3 User Guide. + // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see + // [Checking object integrity]in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32C *string @@ -600,7 +600,7 @@ type PutObjectOutput struct { // encryption with Key Management Service (KMS) keys (SSE-KMS). BucketKeyEnabled *bool - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -611,7 +611,7 @@ type PutObjectOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the diff --git a/service/s3/api_op_UploadPart.go b/service/s3/api_op_UploadPart.go index 90c7bc9ee4b..62ee5938c0f 100644 --- a/service/s3/api_op_UploadPart.go +++ b/service/s3/api_op_UploadPart.go @@ -263,7 +263,7 @@ type UploadPartInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html @@ -271,8 +271,8 @@ type UploadPartInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32C checksum of the object. For more information, see [Checking object integrity] - // in the Amazon S3 User Guide. + // base64-encoded, 32-bit CRC-32C checksum of the object. For more information, see + // [Checking object integrity]in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32C *string @@ -359,7 +359,7 @@ type UploadPartOutput struct { // encryption with Key Management Service (KMS) keys (SSE-KMS). BucketKeyEnabled *bool - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -370,7 +370,7 @@ type UploadPartOutput struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the diff --git a/service/s3/api_op_WriteGetObjectResponse.go b/service/s3/api_op_WriteGetObjectResponse.go index f1880f5822a..a72c98bfba6 100644 --- a/service/s3/api_op_WriteGetObjectResponse.go +++ b/service/s3/api_op_WriteGetObjectResponse.go @@ -109,7 +109,7 @@ type WriteGetObjectResponseInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This specifies the - // base64-encoded, 32-bit CRC32 checksum of the object returned by the Object + // base64-encoded, 32-bit CRC-32 checksum of the object returned by the Object // Lambda function. This may not match the checksum for the object stored in Amazon // S3. Amazon S3 will perform validation of the checksum values only when the // original GetObject request required checksum validation. For more information @@ -123,7 +123,7 @@ type WriteGetObjectResponseInput struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This specifies the - // base64-encoded, 32-bit CRC32C checksum of the object returned by the Object + // base64-encoded, 32-bit CRC-32C checksum of the object returned by the Object // Lambda function. This may not match the checksum for the object stored in Amazon // S3. Amazon S3 will perform validation of the checksum values only when the // original GetObject request required checksum validation. For more information diff --git a/service/s3/deserializers.go b/service/s3/deserializers.go index bc6b9f46271..5695bf6a173 100644 --- a/service/s3/deserializers.go +++ b/service/s3/deserializers.go @@ -3714,6 +3714,11 @@ func (m *awsRestxml_deserializeOpGetBucketLifecycleConfiguration) HandleDeserial output := &GetBucketLifecycleConfigurationOutput{} out.Result = output + err = awsRestxml_deserializeOpHttpBindingsGetBucketLifecycleConfigurationOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) @@ -3786,6 +3791,18 @@ func awsRestxml_deserializeOpErrorGetBucketLifecycleConfiguration(response *smit } } +func awsRestxml_deserializeOpHttpBindingsGetBucketLifecycleConfigurationOutput(v *GetBucketLifecycleConfigurationOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-transition-default-minimum-object-size"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.TransitionDefaultMinimumObjectSize = types.TransitionDefaultMinimumObjectSize(headerValues[0]) + } + + return nil +} func awsRestxml_deserializeOpDocumentGetBucketLifecycleConfigurationOutput(v **GetBucketLifecycleConfigurationOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10742,10 +10759,9 @@ func (m *awsRestxml_deserializeOpPutBucketLifecycleConfiguration) HandleDeserial output := &PutBucketLifecycleConfigurationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } + err = awsRestxml_deserializeOpHttpBindingsPutBucketLifecycleConfigurationOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } span.End() @@ -10792,6 +10808,19 @@ func awsRestxml_deserializeOpErrorPutBucketLifecycleConfiguration(response *smit } } +func awsRestxml_deserializeOpHttpBindingsPutBucketLifecycleConfigurationOutput(v *PutBucketLifecycleConfigurationOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-transition-default-minimum-object-size"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.TransitionDefaultMinimumObjectSize = types.TransitionDefaultMinimumObjectSize(headerValues[0]) + } + + return nil +} + type awsRestxml_deserializeOpPutBucketLogging struct { } diff --git a/service/s3/serializers.go b/service/s3/serializers.go index 7f7bdecb68e..96dbb6b934a 100644 --- a/service/s3/serializers.go +++ b/service/s3/serializers.go @@ -6359,6 +6359,11 @@ func awsRestxml_serializeOpHttpBindingsPutBucketLifecycleConfigurationInput(v *P encoder.SetHeader(locationName).String(*v.ExpectedBucketOwner) } + if len(v.TransitionDefaultMinimumObjectSize) > 0 { + locationName := "X-Amz-Transition-Default-Minimum-Object-Size" + encoder.SetHeader(locationName).String(string(v.TransitionDefaultMinimumObjectSize)) + } + return nil } diff --git a/service/s3/types/enums.go b/service/s3/types/enums.go index bcb956b2618..223aaba99b1 100644 --- a/service/s3/types/enums.go +++ b/service/s3/types/enums.go @@ -1370,6 +1370,26 @@ func (Tier) Values() []Tier { } } +type TransitionDefaultMinimumObjectSize string + +// Enum values for TransitionDefaultMinimumObjectSize +const ( + TransitionDefaultMinimumObjectSizeVariesByStorageClass TransitionDefaultMinimumObjectSize = "varies_by_storage_class" + TransitionDefaultMinimumObjectSizeAllStorageClasses128k TransitionDefaultMinimumObjectSize = "all_storage_classes_128K" +) + +// Values returns all known values for TransitionDefaultMinimumObjectSize. 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 (TransitionDefaultMinimumObjectSize) Values() []TransitionDefaultMinimumObjectSize { + return []TransitionDefaultMinimumObjectSize{ + "varies_by_storage_class", + "all_storage_classes_128K", + } +} + type TransitionStorageClass string // Enum values for TransitionStorageClass diff --git a/service/s3/types/types.go b/service/s3/types/types.go index d28e93c1b7d..66dfa88142c 100644 --- a/service/s3/types/types.go +++ b/service/s3/types/types.go @@ -236,7 +236,7 @@ type BucketLoggingStatus struct { // Contains all the possible checksum or digest values for an object. type Checksum struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -247,7 +247,7 @@ type Checksum struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -311,7 +311,7 @@ type CompletedMultipartUpload struct { // Details of the parts that were uploaded. type CompletedPart struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -322,7 +322,7 @@ type CompletedPart struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -412,14 +412,14 @@ type ContinuationEvent struct { // Container for all response elements. type CopyObjectResult struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. For more information, see [Checking object integrity]in the // Amazon S3 User Guide. // @@ -453,7 +453,7 @@ type CopyObjectResult struct { // Container for all response elements. type CopyPartResult struct { - // The base64-encoded, 32-bit CRC32 checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32 checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -464,7 +464,7 @@ type CopyPartResult struct { // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html#large-object-checksums ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -2777,13 +2777,13 @@ type ObjectPart struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the @@ -2976,13 +2976,13 @@ type Part struct { // This header can be used as a data integrity check to verify that the data // received is the same data that was originally sent. This header specifies the - // base64-encoded, 32-bit CRC32 checksum of the object. For more information, see [Checking object integrity] + // base64-encoded, 32-bit CRC-32 checksum of the object. For more information, see [Checking object integrity] // in the Amazon S3 User Guide. // // [Checking object integrity]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/checking-object-integrity.html ChecksumCRC32 *string - // The base64-encoded, 32-bit CRC32C checksum of the object. This will only be + // The base64-encoded, 32-bit CRC-32C checksum of the object. This will only be // present if it was uploaded with the object. When you use an API operation on an // object that was uploaded using multipart uploads, this value may not be a direct // checksum value of the full object. Instead, it's a calculation based on the diff --git a/service/sagemaker/api_op_DescribeApp.go b/service/sagemaker/api_op_DescribeApp.go index 6786634cd81..8e87609bf2d 100644 --- a/service/sagemaker/api_op_DescribeApp.go +++ b/service/sagemaker/api_op_DescribeApp.go @@ -65,6 +65,9 @@ type DescribeAppOutput struct { // The type of app. AppType types.AppType + // The lifecycle configuration that runs before the default lifecycle configuration + BuiltInLifecycleConfigArn *string + // The creation time of the application. // // After an application has been shut down for 24 hours, SageMaker deletes all diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 7b133aa2c37..40ef5b7dc57 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -43417,6 +43417,15 @@ func awsAwsjson11_deserializeDocumentCodeEditorAppSettings(v **types.CodeEditorA return err } + case "BuiltInLifecycleConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StudioLifecycleConfigArn to be of type string, got %T instead", value) + } + sv.BuiltInLifecycleConfigArn = ptr.String(jtv) + } + case "CustomImages": if err := awsAwsjson11_deserializeDocumentCustomImages(&sv.CustomImages, value); err != nil { return err @@ -58069,6 +58078,15 @@ func awsAwsjson11_deserializeDocumentJupyterLabAppSettings(v **types.JupyterLabA return err } + case "BuiltInLifecycleConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StudioLifecycleConfigArn to be of type string, got %T instead", value) + } + sv.BuiltInLifecycleConfigArn = ptr.String(jtv) + } + case "CodeRepositories": if err := awsAwsjson11_deserializeDocumentCodeRepositories(&sv.CodeRepositories, value); err != nil { return err @@ -87035,6 +87053,15 @@ func awsAwsjson11_deserializeOpDocumentDescribeAppOutput(v **DescribeAppOutput, sv.AppType = types.AppType(jtv) } + case "BuiltInLifecycleConfigArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StudioLifecycleConfigArn to be of type string, got %T instead", value) + } + sv.BuiltInLifecycleConfigArn = ptr.String(jtv) + } + case "CreationTime": if value != nil { switch jtv := value.(type) { diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 9598571d538..52bb50b40b5 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -22409,6 +22409,11 @@ func awsAwsjson11_serializeDocumentCodeEditorAppSettings(v *types.CodeEditorAppS } } + if v.BuiltInLifecycleConfigArn != nil { + ok := object.Key("BuiltInLifecycleConfigArn") + ok.String(*v.BuiltInLifecycleConfigArn) + } + if v.CustomImages != nil { ok := object.Key("CustomImages") if err := awsAwsjson11_serializeDocumentCustomImages(v.CustomImages, ok); err != nil { @@ -25940,6 +25945,11 @@ func awsAwsjson11_serializeDocumentJupyterLabAppSettings(v *types.JupyterLabAppS } } + if v.BuiltInLifecycleConfigArn != nil { + ok := object.Key("BuiltInLifecycleConfigArn") + ok.String(*v.BuiltInLifecycleConfigArn) + } + if v.CodeRepositories != nil { ok := object.Key("CodeRepositories") if err := awsAwsjson11_serializeDocumentCodeRepositories(v.CodeRepositories, ok); err != nil { diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 329be9e5ca3..e9a84675c6d 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -3540,6 +3540,11 @@ type CodeEditorAppSettings struct { // applications. AppLifecycleManagement *AppLifecycleManagement + // The lifecycle configuration that runs before the default lifecycle + // configuration. It can override changes made in the default lifecycle + // configuration. + BuiltInLifecycleConfigArn *string + // A list of custom SageMaker images that are configured to run as a Code Editor // app. CustomImages []CustomImage @@ -9600,6 +9605,11 @@ type JupyterLabAppSettings struct { // Indicates whether idle shutdown is activated for JupyterLab applications. AppLifecycleManagement *AppLifecycleManagement + // The lifecycle configuration that runs before the default lifecycle + // configuration. It can override changes made in the default lifecycle + // configuration. + BuiltInLifecycleConfigArn *string + // A list of Git repositories that SageMaker automatically displays to users for // cloning in the JupyterLab application. CodeRepositories []CodeRepository diff --git a/service/workspaces/api_op_CreateWorkspaces.go b/service/workspaces/api_op_CreateWorkspaces.go index ac7808010d6..1bb30061122 100644 --- a/service/workspaces/api_op_CreateWorkspaces.go +++ b/service/workspaces/api_op_CreateWorkspaces.go @@ -19,8 +19,8 @@ import ( // Contact your account team to be allow-listed to use this value. For more // information, see [Amazon WorkSpaces Core]. // -// - You don't need to specify the PCOIP protocol for Linux bundles because WSP -// is the default protocol for those bundles. +// - You don't need to specify the PCOIP protocol for Linux bundles because DCV +// (formerly WSP) is the default protocol for those bundles. // // - User-decoupled WorkSpaces are only supported by Amazon WorkSpaces Core. // diff --git a/service/workspaces/api_op_ImportWorkspaceImage.go b/service/workspaces/api_op_ImportWorkspaceImage.go index 65efc02e4c4..5ac8a6b8c4e 100644 --- a/service/workspaces/api_op_ImportWorkspaceImage.go +++ b/service/workspaces/api_op_ImportWorkspaceImage.go @@ -50,13 +50,13 @@ type ImportWorkspaceImageInput struct { ImageName *string // The ingestion process to be used when importing the image, depending on which - // protocol you want to use for your BYOL Workspace image, either PCoIP, WorkSpaces - // Streaming Protocol (WSP), or bring your own protocol (BYOP). To use WSP, specify - // a value that ends in _WSP . To use PCoIP, specify a value that does not end in - // _WSP . To use BYOP, specify a value that ends in _BYOP . + // protocol you want to use for your BYOL Workspace image, either PCoIP, DCV, or + // bring your own protocol (BYOP). To use WSP, specify a value that ends in _DCV . + // To use PCoIP, specify a value that does not end in _DCV . To use BYOP, specify a + // value that ends in _BYOP . // // For non-GPU-enabled bundles (bundles other than Graphics or GraphicsPro), - // specify BYOL_REGULAR , BYOL_REGULAR_WSP , or BYOL_REGULAR_BYOP , depending on + // specify BYOL_REGULAR , BYOL_REGULAR_DCV , or BYOL_REGULAR_BYOP , depending on // the protocol. // // The BYOL_REGULAR_BYOP and BYOL_GRAPHICS_G4DN_BYOP values are only supported by @@ -74,9 +74,9 @@ type ImportWorkspaceImageInput struct { // // - Although this parameter is an array, only one item is allowed at this time. // - // - During the image import process, non-GPU WSP WorkSpaces with Windows 11 - // support only Microsoft_Office_2019 . GPU WSP WorkSpaces with Windows 11 do not - // support Office installation. + // - During the image import process, non-GPU DCV (formerly WSP) WorkSpaces with + // Windows 11 support only Microsoft_Office_2019 . GPU DCV (formerly WSP) + // WorkSpaces with Windows 11 do not support Office installation. // // [Bring Your Own Windows Desktop Licenses]: https://docs.aws.amazon.com/workspaces/latest/adminguide/byol-windows-images.html Applications []types.Application diff --git a/service/workspaces/types/types.go b/service/workspaces/types/types.go index 4cdc604f472..d148fcb767c 100644 --- a/service/workspaces/types/types.go +++ b/service/workspaces/types/types.go @@ -1670,7 +1670,8 @@ type WorkspaceProperties struct { // // - Only available for WorkSpaces created with PCoIP bundles. // - // - The Protocols property is case sensitive. Ensure you use PCOIP or WSP . + // - The Protocols property is case sensitive. Ensure you use PCOIP or DCV + // (formerly WSP). // // - Unavailable for Windows 7 WorkSpaces and WorkSpaces using GPU-based bundles // (Graphics, GraphicsPro, Graphics.g4dn, and GraphicsPro.g4dn).