diff --git a/.changelog/01df2968b7834157aa492b54873a14cd.json b/.changelog/01df2968b7834157aa492b54873a14cd.json new file mode 100644 index 00000000000..921ef1837fb --- /dev/null +++ b/.changelog/01df2968b7834157aa492b54873a14cd.json @@ -0,0 +1,8 @@ +{ + "id": "01df2968-b783-4157-aa49-2b54873a14cd", + "type": "feature", + "description": "Fix SDK logging of certain fields.", + "modules": [ + "service/mediapackage" + ] +} \ No newline at end of file diff --git a/.changelog/ad11804059984870b20d368d4647692f.json b/.changelog/ad11804059984870b20d368d4647692f.json new file mode 100644 index 00000000000..ea72b28b2b3 --- /dev/null +++ b/.changelog/ad11804059984870b20d368d4647692f.json @@ -0,0 +1,8 @@ +{ + "id": "ad118040-5998-4870-b20d-368d4647692f", + "type": "feature", + "description": "This release provides support for annotation store versioning and cross account sharing for Omics Analytics", + "modules": [ + "service/omics" + ] +} \ No newline at end of file diff --git a/.changelog/c8ef05433978484bafed9827414cedf8.json b/.changelog/c8ef05433978484bafed9827414cedf8.json new file mode 100644 index 00000000000..c72ff12ed0d --- /dev/null +++ b/.changelog/c8ef05433978484bafed9827414cedf8.json @@ -0,0 +1,8 @@ +{ + "id": "c8ef0543-3978-484b-afed-9827414cedf8", + "type": "documentation", + "description": "Documentation updates for AWS Transfer Family", + "modules": [ + "service/transfer" + ] +} \ No newline at end of file diff --git a/service/acmpca/internal/endpoints/endpoints.go b/service/acmpca/internal/endpoints/endpoints.go index 8b6636fba2a..0794b2371b0 100644 --- a/service/acmpca/internal/endpoints/endpoints.go +++ b/service/acmpca/internal/endpoints/endpoints.go @@ -250,6 +250,9 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-central-1", }: endpoints.Endpoint{}, diff --git a/service/mediapackage/deserializers.go b/service/mediapackage/deserializers.go index 84722aed2bd..24d1085ea64 100644 --- a/service/mediapackage/deserializers.go +++ b/service/mediapackage/deserializers.go @@ -5337,7 +5337,7 @@ func awsRestjson1_deserializeDocumentIngestEndpoint(v **types.IngestEndpoint, va if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } sv.Password = ptr.String(jtv) } @@ -5355,7 +5355,7 @@ func awsRestjson1_deserializeDocumentIngestEndpoint(v **types.IngestEndpoint, va if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } sv.Username = ptr.String(jtv) } diff --git a/service/mediapackage/endpoints_test.go b/service/mediapackage/endpoints_test.go index a65bdb00714..071210853ac 100644 --- a/service/mediapackage/endpoints_test.go +++ b/service/mediapackage/endpoints_test.go @@ -1067,8 +1067,28 @@ func TestEndpointCase26(t *testing.T) { } } -// For region us-iso-east-1 with FIPS enabled and DualStack disabled +// For region us-iso-east-1 with FIPS enabled and DualStack enabled func TestEndpointCase27(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-iso-east-1 with FIPS enabled and DualStack disabled +func TestEndpointCase28(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-iso-east-1"), UseFIPS: ptr.Bool(true), @@ -1106,8 +1126,48 @@ func TestEndpointCase27(t *testing.T) { } } +// For region us-iso-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase29(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-iso-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + +// For region us-isob-east-1 with FIPS enabled and DualStack enabled +func TestEndpointCase30(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(true), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase28(t *testing.T) { +func TestEndpointCase31(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(true), @@ -1145,8 +1205,28 @@ func TestEndpointCase28(t *testing.T) { } } +// For region us-isob-east-1 with FIPS disabled and DualStack enabled +func TestEndpointCase32(t *testing.T) { + var params = EndpointParameters{ + Region: ptr.String("us-isob-east-1"), + UseFIPS: ptr.Bool(false), + UseDualStack: ptr.Bool(true), + } + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} + // For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { +func TestEndpointCase33(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-isob-east-1"), UseFIPS: ptr.Bool(false), @@ -1185,7 +1265,7 @@ func TestEndpointCase29(t *testing.T) { } // For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase30(t *testing.T) { +func TestEndpointCase34(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1225,7 +1305,7 @@ func TestEndpointCase30(t *testing.T) { } // For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase31(t *testing.T) { +func TestEndpointCase35(t *testing.T) { var params = EndpointParameters{ UseFIPS: ptr.Bool(false), UseDualStack: ptr.Bool(false), @@ -1264,7 +1344,7 @@ func TestEndpointCase31(t *testing.T) { } // For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { +func TestEndpointCase36(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(true), @@ -1285,7 +1365,7 @@ func TestEndpointCase32(t *testing.T) { } // For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase33(t *testing.T) { +func TestEndpointCase37(t *testing.T) { var params = EndpointParameters{ Region: ptr.String("us-east-1"), UseFIPS: ptr.Bool(false), @@ -1304,3 +1384,19 @@ func TestEndpointCase33(t *testing.T) { t.Errorf("expect %v error in %v", e, a) } } + +// Missing region +func TestEndpointCase38(t *testing.T) { + var params = EndpointParameters{} + + resolver := NewDefaultEndpointResolverV2() + result, err := resolver.ResolveEndpoint(context.Background(), params) + _, _ = result, err + + if err == nil { + t.Fatalf("expect error, got none") + } + if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { + t.Errorf("expect %v error in %v", e, a) + } +} diff --git a/service/networkmanager/internal/endpoints/endpoints.go b/service/networkmanager/internal/endpoints/endpoints.go index 0625fc4af2a..b6eb3651475 100644 --- a/service/networkmanager/internal/endpoints/endpoints.go +++ b/service/networkmanager/internal/endpoints/endpoints.go @@ -148,6 +148,24 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-west-2", }, }, + endpoints.EndpointKey{ + Region: "aws-global", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "networkmanager-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + }, + endpoints.EndpointKey{ + Region: "fips-aws-global", + }: endpoints.Endpoint{ + Hostname: "networkmanager-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, }, }, { @@ -313,6 +331,24 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-gov-west-1", }, }, + endpoints.EndpointKey{ + Region: "aws-us-gov-global", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "networkmanager.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "fips-aws-us-gov-global", + }: endpoints.Endpoint{ + Hostname: "networkmanager.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, }, }, } diff --git a/service/omics/api_op_AcceptShare.go b/service/omics/api_op_AcceptShare.go new file mode 100644 index 00000000000..1612142a5a6 --- /dev/null +++ b/service/omics/api_op_AcceptShare.go @@ -0,0 +1,291 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Accepts a share for an analytics store. +func (c *Client) AcceptShare(ctx context.Context, params *AcceptShareInput, optFns ...func(*Options)) (*AcceptShareOutput, error) { + if params == nil { + params = &AcceptShareInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcceptShare", params, optFns, c.addOperationAcceptShareMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcceptShareOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AcceptShareInput struct { + + // The ID for a share offer for analytics store data. + // + // This member is required. + ShareId *string + + noSmithyDocumentSerde +} + +type AcceptShareOutput struct { + + // The status of an analytics store share. + Status types.ShareStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAcceptShareMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAcceptShare{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcceptShare{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opAcceptShareMiddleware(stack); err != nil { + return err + } + if err = addAcceptShareResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpAcceptShareValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptShare(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opAcceptShareMiddleware struct { +} + +func (*endpointPrefix_opAcceptShareMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opAcceptShareMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opAcceptShareMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opAcceptShareMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opAcceptShare(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "AcceptShare", + } +} + +type opAcceptShareResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opAcceptShareResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opAcceptShareResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addAcceptShareResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opAcceptShareResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_CreateAnnotationStore.go b/service/omics/api_op_CreateAnnotationStore.go index e6db6fad905..b76597fd027 100644 --- a/service/omics/api_op_CreateAnnotationStore.go +++ b/service/omics/api_op_CreateAnnotationStore.go @@ -58,6 +58,10 @@ type CreateAnnotationStoreInput struct { // Tags for the store. Tags map[string]string + // The name given to an annotation store version to distinguish it from other + // versions. + VersionName *string + noSmithyDocumentSerde } @@ -83,6 +87,12 @@ type CreateAnnotationStoreOutput struct { // This member is required. Status types.StoreStatus + // The name given to an annotation store version to distinguish it from other + // versions. + // + // This member is required. + VersionName *string + // The store's genome reference. Required for all stores except TSV format with // generic annotations. Reference types.ReferenceItem diff --git a/service/omics/api_op_CreateAnnotationStoreVersion.go b/service/omics/api_op_CreateAnnotationStoreVersion.go new file mode 100644 index 00000000000..d3ed6be6842 --- /dev/null +++ b/service/omics/api_op_CreateAnnotationStoreVersion.go @@ -0,0 +1,339 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a new version of an annotation store. +func (c *Client) CreateAnnotationStoreVersion(ctx context.Context, params *CreateAnnotationStoreVersionInput, optFns ...func(*Options)) (*CreateAnnotationStoreVersionOutput, error) { + if params == nil { + params = &CreateAnnotationStoreVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAnnotationStoreVersion", params, optFns, c.addOperationCreateAnnotationStoreVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAnnotationStoreVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAnnotationStoreVersionInput struct { + + // The name of an annotation store version from which versions are being created. + // + // This member is required. + Name *string + + // The name given to an annotation store version to distinguish it from other + // versions. + // + // This member is required. + VersionName *string + + // The description of an annotation store version. + Description *string + + // Any tags added to annotation store version. + Tags map[string]string + + // The options for an annotation store version. + VersionOptions types.VersionOptions + + noSmithyDocumentSerde +} + +type CreateAnnotationStoreVersionOutput struct { + + // The time stamp for the creation of an annotation store version. + // + // This member is required. + CreationTime *time.Time + + // A generated ID for the annotation store + // + // This member is required. + Id *string + + // The name given to an annotation store version to distinguish it from other + // versions. + // + // This member is required. + Name *string + + // The status of a annotation store version. + // + // This member is required. + Status types.VersionStatus + + // The ID for the annotation store from which new versions are being created. + // + // This member is required. + StoreId *string + + // The name given to an annotation store version to distinguish it from other + // versions. + // + // This member is required. + VersionName *string + + // The options for an annotation store version. + VersionOptions types.VersionOptions + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAnnotationStoreVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAnnotationStoreVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAnnotationStoreVersion{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opCreateAnnotationStoreVersionMiddleware(stack); err != nil { + return err + } + if err = addCreateAnnotationStoreVersionResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateAnnotationStoreVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAnnotationStoreVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opCreateAnnotationStoreVersionMiddleware struct { +} + +func (*endpointPrefix_opCreateAnnotationStoreVersionMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opCreateAnnotationStoreVersionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opCreateAnnotationStoreVersionMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opCreateAnnotationStoreVersionMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opCreateAnnotationStoreVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "CreateAnnotationStoreVersion", + } +} + +type opCreateAnnotationStoreVersionResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opCreateAnnotationStoreVersionResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opCreateAnnotationStoreVersionResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addCreateAnnotationStoreVersionResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opCreateAnnotationStoreVersionResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_CreateShare.go b/service/omics/api_op_CreateShare.go new file mode 100644 index 00000000000..053e13a6dd2 --- /dev/null +++ b/service/omics/api_op_CreateShare.go @@ -0,0 +1,307 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a share offer that can be accepted outside the account by a subscriber. +// The share is created by the owner and accepted by the principal subscriber. +func (c *Client) CreateShare(ctx context.Context, params *CreateShareInput, optFns ...func(*Options)) (*CreateShareOutput, error) { + if params == nil { + params = &CreateShareInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateShare", params, optFns, c.addOperationCreateShareMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateShareOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateShareInput struct { + + // The principal subscriber is the account being given access to the analytics + // store data through the share offer. + // + // This member is required. + PrincipalSubscriber *string + + // The resource ARN for the analytics store to be shared. + // + // This member is required. + ResourceArn *string + + // A name given to the share. + ShareName *string + + noSmithyDocumentSerde +} + +type CreateShareOutput struct { + + // An ID generated for the share. + ShareId *string + + // A name given to the share. + ShareName *string + + // The status of a share. + Status types.ShareStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateShareMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateShare{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateShare{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opCreateShareMiddleware(stack); err != nil { + return err + } + if err = addCreateShareResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateShareValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateShare(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opCreateShareMiddleware struct { +} + +func (*endpointPrefix_opCreateShareMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opCreateShareMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opCreateShareMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opCreateShareMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opCreateShare(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "CreateShare", + } +} + +type opCreateShareResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opCreateShareResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opCreateShareResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addCreateShareResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opCreateShareResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_DeleteAnnotationStoreVersions.go b/service/omics/api_op_DeleteAnnotationStoreVersions.go new file mode 100644 index 00000000000..d1b1e385e11 --- /dev/null +++ b/service/omics/api_op_DeleteAnnotationStoreVersions.go @@ -0,0 +1,300 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes one or multiple versions of an annotation store. +func (c *Client) DeleteAnnotationStoreVersions(ctx context.Context, params *DeleteAnnotationStoreVersionsInput, optFns ...func(*Options)) (*DeleteAnnotationStoreVersionsOutput, error) { + if params == nil { + params = &DeleteAnnotationStoreVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAnnotationStoreVersions", params, optFns, c.addOperationDeleteAnnotationStoreVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAnnotationStoreVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAnnotationStoreVersionsInput struct { + + // The name of the annotation store from which versions are being deleted. + // + // This member is required. + Name *string + + // The versions of an annotation store to be deleted. + // + // This member is required. + Versions []string + + // Forces the deletion of an annotation store version when imports are + // in-progress.. + Force bool + + noSmithyDocumentSerde +} + +type DeleteAnnotationStoreVersionsOutput struct { + + // Any errors that occur when attempting to delete an annotation store version. + Errors []types.VersionDeleteError + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAnnotationStoreVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAnnotationStoreVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAnnotationStoreVersions{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opDeleteAnnotationStoreVersionsMiddleware(stack); err != nil { + return err + } + if err = addDeleteAnnotationStoreVersionsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteAnnotationStoreVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAnnotationStoreVersions(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opDeleteAnnotationStoreVersionsMiddleware struct { +} + +func (*endpointPrefix_opDeleteAnnotationStoreVersionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDeleteAnnotationStoreVersionsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opDeleteAnnotationStoreVersionsMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opDeleteAnnotationStoreVersionsMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opDeleteAnnotationStoreVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "DeleteAnnotationStoreVersions", + } +} + +type opDeleteAnnotationStoreVersionsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDeleteAnnotationStoreVersionsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDeleteAnnotationStoreVersionsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDeleteAnnotationStoreVersionsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDeleteAnnotationStoreVersionsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_DeleteShare.go b/service/omics/api_op_DeleteShare.go new file mode 100644 index 00000000000..fa5e8c27d8a --- /dev/null +++ b/service/omics/api_op_DeleteShare.go @@ -0,0 +1,291 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a share of an analytics store. +func (c *Client) DeleteShare(ctx context.Context, params *DeleteShareInput, optFns ...func(*Options)) (*DeleteShareOutput, error) { + if params == nil { + params = &DeleteShareInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteShare", params, optFns, c.addOperationDeleteShareMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteShareOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteShareInput struct { + + // The ID for the share request to be deleted. + // + // This member is required. + ShareId *string + + noSmithyDocumentSerde +} + +type DeleteShareOutput struct { + + // The status of the share being deleted. + Status types.ShareStatus + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteShareMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteShare{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteShare{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opDeleteShareMiddleware(stack); err != nil { + return err + } + if err = addDeleteShareResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteShareValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteShare(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opDeleteShareMiddleware struct { +} + +func (*endpointPrefix_opDeleteShareMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opDeleteShareMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opDeleteShareMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opDeleteShareMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opDeleteShare(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "DeleteShare", + } +} + +type opDeleteShareResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDeleteShareResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDeleteShareResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDeleteShareResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDeleteShareResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_GetAnnotationImportJob.go b/service/omics/api_op_GetAnnotationImportJob.go index 6cb1216b59f..4f521b22c0c 100644 --- a/service/omics/api_op_GetAnnotationImportJob.go +++ b/service/omics/api_op_GetAnnotationImportJob.go @@ -103,6 +103,11 @@ type GetAnnotationImportJobOutput struct { // This member is required. UpdateTime *time.Time + // The name of the annotation store version. + // + // This member is required. + VersionName *string + // The annotation schema generated by the parsed annotation data. AnnotationFields map[string]string diff --git a/service/omics/api_op_GetAnnotationStore.go b/service/omics/api_op_GetAnnotationStore.go index 71b6e6b8d9a..11415aa36a9 100644 --- a/service/omics/api_op_GetAnnotationStore.go +++ b/service/omics/api_op_GetAnnotationStore.go @@ -68,6 +68,11 @@ type GetAnnotationStoreOutput struct { // This member is required. Name *string + // An integer indicating how many versions of an annotation store exist. + // + // This member is required. + NumVersions *int32 + // The store's genome reference. // // This member is required. diff --git a/service/omics/api_op_GetAnnotationStoreVersion.go b/service/omics/api_op_GetAnnotationStoreVersion.go new file mode 100644 index 00000000000..d52df534290 --- /dev/null +++ b/service/omics/api_op_GetAnnotationStoreVersion.go @@ -0,0 +1,773 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + smithywaiter "github.com/aws/smithy-go/waiter" + "github.com/jmespath/go-jmespath" + "time" +) + +// Retrieves the metadata for an annotation store version. +func (c *Client) GetAnnotationStoreVersion(ctx context.Context, params *GetAnnotationStoreVersionInput, optFns ...func(*Options)) (*GetAnnotationStoreVersionOutput, error) { + if params == nil { + params = &GetAnnotationStoreVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetAnnotationStoreVersion", params, optFns, c.addOperationGetAnnotationStoreVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetAnnotationStoreVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetAnnotationStoreVersionInput struct { + + // The name given to an annotation store version to distinguish it from others. + // + // This member is required. + Name *string + + // The name given to an annotation store version to distinguish it from others. + // + // This member is required. + VersionName *string + + noSmithyDocumentSerde +} + +type GetAnnotationStoreVersionOutput struct { + + // The time stamp for when an annotation store version was created. + // + // This member is required. + CreationTime *time.Time + + // The description for an annotation store version. + // + // This member is required. + Description *string + + // The annotation store version ID. + // + // This member is required. + Id *string + + // The name of the annotation store. + // + // This member is required. + Name *string + + // The status of an annotation store version. + // + // This member is required. + Status types.VersionStatus + + // The status of an annotation store version. + // + // This member is required. + StatusMessage *string + + // The store ID for annotation store version. + // + // This member is required. + StoreId *string + + // Any tags associated with an annotation store version. + // + // This member is required. + Tags map[string]string + + // The time stamp for when an annotation store version was updated. + // + // This member is required. + UpdateTime *time.Time + + // The Arn for the annotation store. + // + // This member is required. + VersionArn *string + + // The name given to an annotation store version to distinguish it from others. + // + // This member is required. + VersionName *string + + // The size of the annotation store version in Bytes. + // + // This member is required. + VersionSizeBytes *int64 + + // The options for an annotation store version. + VersionOptions types.VersionOptions + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetAnnotationStoreVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAnnotationStoreVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAnnotationStoreVersion{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opGetAnnotationStoreVersionMiddleware(stack); err != nil { + return err + } + if err = addGetAnnotationStoreVersionResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetAnnotationStoreVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAnnotationStoreVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opGetAnnotationStoreVersionMiddleware struct { +} + +func (*endpointPrefix_opGetAnnotationStoreVersionMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetAnnotationStoreVersionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opGetAnnotationStoreVersionMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opGetAnnotationStoreVersionMiddleware{}, `OperationSerializer`, middleware.After) +} + +// GetAnnotationStoreVersionAPIClient is a client that implements the +// GetAnnotationStoreVersion operation. +type GetAnnotationStoreVersionAPIClient interface { + GetAnnotationStoreVersion(context.Context, *GetAnnotationStoreVersionInput, ...func(*Options)) (*GetAnnotationStoreVersionOutput, error) +} + +var _ GetAnnotationStoreVersionAPIClient = (*Client)(nil) + +// AnnotationStoreVersionCreatedWaiterOptions are waiter options for +// AnnotationStoreVersionCreatedWaiter +type AnnotationStoreVersionCreatedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // AnnotationStoreVersionCreatedWaiter will use default minimum delay of 30 + // seconds. Note that MinDelay must resolve to a value lesser than or equal to the + // MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, AnnotationStoreVersionCreatedWaiter will use default max delay of + // 600 seconds. Note that MaxDelay must resolve to value greater than or equal to + // the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetAnnotationStoreVersionInput, *GetAnnotationStoreVersionOutput, error) (bool, error) +} + +// AnnotationStoreVersionCreatedWaiter defines the waiters for +// AnnotationStoreVersionCreated +type AnnotationStoreVersionCreatedWaiter struct { + client GetAnnotationStoreVersionAPIClient + + options AnnotationStoreVersionCreatedWaiterOptions +} + +// NewAnnotationStoreVersionCreatedWaiter constructs a +// AnnotationStoreVersionCreatedWaiter. +func NewAnnotationStoreVersionCreatedWaiter(client GetAnnotationStoreVersionAPIClient, optFns ...func(*AnnotationStoreVersionCreatedWaiterOptions)) *AnnotationStoreVersionCreatedWaiter { + options := AnnotationStoreVersionCreatedWaiterOptions{} + options.MinDelay = 30 * time.Second + options.MaxDelay = 600 * time.Second + options.Retryable = annotationStoreVersionCreatedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &AnnotationStoreVersionCreatedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for AnnotationStoreVersionCreated waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *AnnotationStoreVersionCreatedWaiter) Wait(ctx context.Context, params *GetAnnotationStoreVersionInput, maxWaitDur time.Duration, optFns ...func(*AnnotationStoreVersionCreatedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for AnnotationStoreVersionCreated +// waiter and returns the output of the successful operation. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *AnnotationStoreVersionCreatedWaiter) WaitForOutput(ctx context.Context, params *GetAnnotationStoreVersionInput, maxWaitDur time.Duration, optFns ...func(*AnnotationStoreVersionCreatedWaiterOptions)) (*GetAnnotationStoreVersionOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 600 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetAnnotationStoreVersion(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for AnnotationStoreVersionCreated waiter") +} + +func annotationStoreVersionCreatedStateRetryable(ctx context.Context, input *GetAnnotationStoreVersionInput, output *GetAnnotationStoreVersionOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "ACTIVE" + value, ok := pathValue.(types.VersionStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.VersionStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "CREATING" + value, ok := pathValue.(types.VersionStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.VersionStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "UPDATING" + value, ok := pathValue.(types.VersionStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.VersionStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "FAILED" + value, ok := pathValue.(types.VersionStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.VersionStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, fmt.Errorf("waiter state transitioned to Failure") + } + } + + return true, nil +} + +// AnnotationStoreVersionDeletedWaiterOptions are waiter options for +// AnnotationStoreVersionDeletedWaiter +type AnnotationStoreVersionDeletedWaiterOptions struct { + + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // MinDelay is the minimum amount of time to delay between retries. If unset, + // AnnotationStoreVersionDeletedWaiter will use default minimum delay of 30 + // seconds. Note that MinDelay must resolve to a value lesser than or equal to the + // MaxDelay. + MinDelay time.Duration + + // MaxDelay is the maximum amount of time to delay between retries. If unset or + // set to zero, AnnotationStoreVersionDeletedWaiter will use default max delay of + // 600 seconds. Note that MaxDelay must resolve to value greater than or equal to + // the MinDelay. + MaxDelay time.Duration + + // LogWaitAttempts is used to enable logging for waiter retry attempts + LogWaitAttempts bool + + // Retryable is function that can be used to override the service defined + // waiter-behavior based on operation output, or returned error. This function is + // used by the waiter to decide if a state is retryable or a terminal state. By + // default service-modeled logic will populate this option. This option can thus be + // used to define a custom waiter state with fall-back to service-modeled waiter + // state mutators.The function returns an error in case of a failure state. In case + // of retry state, this function returns a bool value of true and nil error, while + // in case of success it returns a bool value of false and nil error. + Retryable func(context.Context, *GetAnnotationStoreVersionInput, *GetAnnotationStoreVersionOutput, error) (bool, error) +} + +// AnnotationStoreVersionDeletedWaiter defines the waiters for +// AnnotationStoreVersionDeleted +type AnnotationStoreVersionDeletedWaiter struct { + client GetAnnotationStoreVersionAPIClient + + options AnnotationStoreVersionDeletedWaiterOptions +} + +// NewAnnotationStoreVersionDeletedWaiter constructs a +// AnnotationStoreVersionDeletedWaiter. +func NewAnnotationStoreVersionDeletedWaiter(client GetAnnotationStoreVersionAPIClient, optFns ...func(*AnnotationStoreVersionDeletedWaiterOptions)) *AnnotationStoreVersionDeletedWaiter { + options := AnnotationStoreVersionDeletedWaiterOptions{} + options.MinDelay = 30 * time.Second + options.MaxDelay = 600 * time.Second + options.Retryable = annotationStoreVersionDeletedStateRetryable + + for _, fn := range optFns { + fn(&options) + } + return &AnnotationStoreVersionDeletedWaiter{ + client: client, + options: options, + } +} + +// Wait calls the waiter function for AnnotationStoreVersionDeleted waiter. The +// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is +// required and must be greater than zero. +func (w *AnnotationStoreVersionDeletedWaiter) Wait(ctx context.Context, params *GetAnnotationStoreVersionInput, maxWaitDur time.Duration, optFns ...func(*AnnotationStoreVersionDeletedWaiterOptions)) error { + _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) + return err +} + +// WaitForOutput calls the waiter function for AnnotationStoreVersionDeleted +// waiter and returns the output of the successful operation. The maxWaitDur is the +// maximum wait duration the waiter will wait. The maxWaitDur is required and must +// be greater than zero. +func (w *AnnotationStoreVersionDeletedWaiter) WaitForOutput(ctx context.Context, params *GetAnnotationStoreVersionInput, maxWaitDur time.Duration, optFns ...func(*AnnotationStoreVersionDeletedWaiterOptions)) (*GetAnnotationStoreVersionOutput, error) { + if maxWaitDur <= 0 { + return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") + } + + options := w.options + for _, fn := range optFns { + fn(&options) + } + + if options.MaxDelay <= 0 { + options.MaxDelay = 600 * time.Second + } + + if options.MinDelay > options.MaxDelay { + return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) + } + + ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) + defer cancelFn() + + logger := smithywaiter.Logger{} + remainingTime := maxWaitDur + + var attempt int64 + for { + + attempt++ + apiOptions := options.APIOptions + start := time.Now() + + if options.LogWaitAttempts { + logger.Attempt = attempt + apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) + apiOptions = append(apiOptions, logger.AddLogger) + } + + out, err := w.client.GetAnnotationStoreVersion(ctx, params, func(o *Options) { + o.APIOptions = append(o.APIOptions, apiOptions...) + }) + + retryable, err := options.Retryable(ctx, params, out, err) + if err != nil { + return nil, err + } + if !retryable { + return out, nil + } + + remainingTime -= time.Since(start) + if remainingTime < options.MinDelay || remainingTime <= 0 { + break + } + + // compute exponential backoff between waiter retries + delay, err := smithywaiter.ComputeDelay( + attempt, options.MinDelay, options.MaxDelay, remainingTime, + ) + if err != nil { + return nil, fmt.Errorf("error computing waiter delay, %w", err) + } + + remainingTime -= delay + // sleep for the delay amount before invoking a request + if err := smithytime.SleepWithContext(ctx, delay); err != nil { + return nil, fmt.Errorf("request cancelled while waiting, %w", err) + } + } + return nil, fmt.Errorf("exceeded max wait time for AnnotationStoreVersionDeleted waiter") +} + +func annotationStoreVersionDeletedStateRetryable(ctx context.Context, input *GetAnnotationStoreVersionInput, output *GetAnnotationStoreVersionOutput, err error) (bool, error) { + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DELETED" + value, ok := pathValue.(types.VersionStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.VersionStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return false, nil + } + } + + if err != nil { + var errorType *types.ResourceNotFoundException + if errors.As(err, &errorType) { + return false, nil + } + } + + if err == nil { + pathValue, err := jmespath.Search("status", output) + if err != nil { + return false, fmt.Errorf("error evaluating waiter state: %w", err) + } + + expectedValue := "DELETING" + value, ok := pathValue.(types.VersionStatus) + if !ok { + return false, fmt.Errorf("waiter comparator expected types.VersionStatus value, got %T", pathValue) + } + + if string(value) == expectedValue { + return true, nil + } + } + + return true, nil +} + +func newServiceMetadataMiddleware_opGetAnnotationStoreVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "GetAnnotationStoreVersion", + } +} + +type opGetAnnotationStoreVersionResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetAnnotationStoreVersionResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetAnnotationStoreVersionResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetAnnotationStoreVersionResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetAnnotationStoreVersionResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_GetShare.go b/service/omics/api_op_GetShare.go new file mode 100644 index 00000000000..0d95b8afd82 --- /dev/null +++ b/service/omics/api_op_GetShare.go @@ -0,0 +1,292 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the metadata for a share. +func (c *Client) GetShare(ctx context.Context, params *GetShareInput, optFns ...func(*Options)) (*GetShareOutput, error) { + if params == nil { + params = &GetShareInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetShare", params, optFns, c.addOperationGetShareMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetShareOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetShareInput struct { + + // The generated ID for a share. + // + // This member is required. + ShareId *string + + noSmithyDocumentSerde +} + +type GetShareOutput struct { + + // An analytic store share details object. contains status, resourceArn, ownerId, + // etc. + Share *types.ShareDetails + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetShareMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetShare{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetShare{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opGetShareMiddleware(stack); err != nil { + return err + } + if err = addGetShareResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetShareValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetShare(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opGetShareMiddleware struct { +} + +func (*endpointPrefix_opGetShareMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opGetShareMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opGetShareMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opGetShareMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opGetShare(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "GetShare", + } +} + +type opGetShareResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opGetShareResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opGetShareResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addGetShareResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opGetShareResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_ListAnnotationStoreVersions.go b/service/omics/api_op_ListAnnotationStoreVersions.go new file mode 100644 index 00000000000..aa20a3388ef --- /dev/null +++ b/service/omics/api_op_ListAnnotationStoreVersions.go @@ -0,0 +1,400 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the versions of an annotation store. +func (c *Client) ListAnnotationStoreVersions(ctx context.Context, params *ListAnnotationStoreVersionsInput, optFns ...func(*Options)) (*ListAnnotationStoreVersionsOutput, error) { + if params == nil { + params = &ListAnnotationStoreVersionsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAnnotationStoreVersions", params, optFns, c.addOperationListAnnotationStoreVersionsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAnnotationStoreVersionsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListAnnotationStoreVersionsInput struct { + + // The name of an annotation store. + // + // This member is required. + Name *string + + // A filter to apply to the list of annotation store versions. + Filter *types.ListAnnotationStoreVersionsFilter + + // The maximum number of annotation store versions to return in one page of + // results. + MaxResults *int32 + + // Specifies the pagination token from a previous request to retrieve the next + // page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListAnnotationStoreVersionsOutput struct { + + // Lists all versions of an annotation store. + AnnotationStoreVersions []types.AnnotationStoreVersionItem + + // Specifies the pagination token from a previous request to retrieve the next + // page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAnnotationStoreVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAnnotationStoreVersions{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAnnotationStoreVersions{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opListAnnotationStoreVersionsMiddleware(stack); err != nil { + return err + } + if err = addListAnnotationStoreVersionsResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpListAnnotationStoreVersionsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAnnotationStoreVersions(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opListAnnotationStoreVersionsMiddleware struct { +} + +func (*endpointPrefix_opListAnnotationStoreVersionsMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListAnnotationStoreVersionsMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opListAnnotationStoreVersionsMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opListAnnotationStoreVersionsMiddleware{}, `OperationSerializer`, middleware.After) +} + +// ListAnnotationStoreVersionsAPIClient is a client that implements the +// ListAnnotationStoreVersions operation. +type ListAnnotationStoreVersionsAPIClient interface { + ListAnnotationStoreVersions(context.Context, *ListAnnotationStoreVersionsInput, ...func(*Options)) (*ListAnnotationStoreVersionsOutput, error) +} + +var _ ListAnnotationStoreVersionsAPIClient = (*Client)(nil) + +// ListAnnotationStoreVersionsPaginatorOptions is the paginator options for +// ListAnnotationStoreVersions +type ListAnnotationStoreVersionsPaginatorOptions struct { + // The maximum number of annotation store versions to return in one page of + // results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAnnotationStoreVersionsPaginator is a paginator for +// ListAnnotationStoreVersions +type ListAnnotationStoreVersionsPaginator struct { + options ListAnnotationStoreVersionsPaginatorOptions + client ListAnnotationStoreVersionsAPIClient + params *ListAnnotationStoreVersionsInput + nextToken *string + firstPage bool +} + +// NewListAnnotationStoreVersionsPaginator returns a new +// ListAnnotationStoreVersionsPaginator +func NewListAnnotationStoreVersionsPaginator(client ListAnnotationStoreVersionsAPIClient, params *ListAnnotationStoreVersionsInput, optFns ...func(*ListAnnotationStoreVersionsPaginatorOptions)) *ListAnnotationStoreVersionsPaginator { + if params == nil { + params = &ListAnnotationStoreVersionsInput{} + } + + options := ListAnnotationStoreVersionsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAnnotationStoreVersionsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAnnotationStoreVersionsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAnnotationStoreVersions page. +func (p *ListAnnotationStoreVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAnnotationStoreVersionsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAnnotationStoreVersions(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAnnotationStoreVersions(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "ListAnnotationStoreVersions", + } +} + +type opListAnnotationStoreVersionsResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListAnnotationStoreVersionsResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListAnnotationStoreVersionsResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListAnnotationStoreVersionsResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListAnnotationStoreVersionsResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_ListShares.go b/service/omics/api_op_ListShares.go new file mode 100644 index 00000000000..c777cd2fbfd --- /dev/null +++ b/service/omics/api_op_ListShares.go @@ -0,0 +1,396 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all shares associated with an account. +func (c *Client) ListShares(ctx context.Context, params *ListSharesInput, optFns ...func(*Options)) (*ListSharesOutput, error) { + if params == nil { + params = &ListSharesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListShares", params, optFns, c.addOperationListSharesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListSharesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListSharesInput struct { + + // The account that owns the analytics store shared. + // + // This member is required. + ResourceOwner types.ResourceOwner + + // Attributes used to filter for a specific subset of shares. + Filter *types.Filter + + // The maximum number of shares to return in one page of results. + MaxResults *int32 + + // Next token returned in the response of a previous ListReadSetUploadPartsRequest + // call. Used to get the next page of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListSharesOutput struct { + + // The shares available and their meta details. + // + // This member is required. + Shares []types.ShareDetails + + // Next token returned in the response of a previous ListSharesResponse call. Used + // to get the next page of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListSharesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListShares{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListShares{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opListSharesMiddleware(stack); err != nil { + return err + } + if err = addListSharesResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpListSharesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListShares(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opListSharesMiddleware struct { +} + +func (*endpointPrefix_opListSharesMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opListSharesMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opListSharesMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opListSharesMiddleware{}, `OperationSerializer`, middleware.After) +} + +// ListSharesAPIClient is a client that implements the ListShares operation. +type ListSharesAPIClient interface { + ListShares(context.Context, *ListSharesInput, ...func(*Options)) (*ListSharesOutput, error) +} + +var _ ListSharesAPIClient = (*Client)(nil) + +// ListSharesPaginatorOptions is the paginator options for ListShares +type ListSharesPaginatorOptions struct { + // The maximum number of shares to return in one page of results. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListSharesPaginator is a paginator for ListShares +type ListSharesPaginator struct { + options ListSharesPaginatorOptions + client ListSharesAPIClient + params *ListSharesInput + nextToken *string + firstPage bool +} + +// NewListSharesPaginator returns a new ListSharesPaginator +func NewListSharesPaginator(client ListSharesAPIClient, params *ListSharesInput, optFns ...func(*ListSharesPaginatorOptions)) *ListSharesPaginator { + if params == nil { + params = &ListSharesInput{} + } + + options := ListSharesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListSharesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListSharesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListShares page. +func (p *ListSharesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSharesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListShares(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListShares(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "ListShares", + } +} + +type opListSharesResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListSharesResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListSharesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListSharesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListSharesResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/api_op_StartAnnotationImportJob.go b/service/omics/api_op_StartAnnotationImportJob.go index 33872ff4a85..60db9c7cbee 100644 --- a/service/omics/api_op_StartAnnotationImportJob.go +++ b/service/omics/api_op_StartAnnotationImportJob.go @@ -58,6 +58,9 @@ type StartAnnotationImportJobInput struct { // The job's left normalization setting. RunLeftNormalization bool + // The name of the annotation store version. + VersionName *string + noSmithyDocumentSerde } diff --git a/service/omics/api_op_UpdateAnnotationStoreVersion.go b/service/omics/api_op_UpdateAnnotationStoreVersion.go new file mode 100644 index 00000000000..0bc6f1f93f4 --- /dev/null +++ b/service/omics/api_op_UpdateAnnotationStoreVersion.go @@ -0,0 +1,337 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package omics + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/omics/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the description of an annotation store version. +func (c *Client) UpdateAnnotationStoreVersion(ctx context.Context, params *UpdateAnnotationStoreVersionInput, optFns ...func(*Options)) (*UpdateAnnotationStoreVersionOutput, error) { + if params == nil { + params = &UpdateAnnotationStoreVersionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateAnnotationStoreVersion", params, optFns, c.addOperationUpdateAnnotationStoreVersionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateAnnotationStoreVersionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateAnnotationStoreVersionInput struct { + + // The name of an annotation store. + // + // This member is required. + Name *string + + // The name of an annotation store version. + // + // This member is required. + VersionName *string + + // The description of an annotation store. + Description *string + + noSmithyDocumentSerde +} + +type UpdateAnnotationStoreVersionOutput struct { + + // The time stamp for when an annotation store version was created. + // + // This member is required. + CreationTime *time.Time + + // The description of an annotation store version. + // + // This member is required. + Description *string + + // The annotation store version ID. + // + // This member is required. + Id *string + + // The name of an annotation store. + // + // This member is required. + Name *string + + // The status of an annotation store version. + // + // This member is required. + Status types.VersionStatus + + // The annotation store ID. + // + // This member is required. + StoreId *string + + // The time stamp for when an annotation store version was updated. + // + // This member is required. + UpdateTime *time.Time + + // The name of an annotation store version. + // + // This member is required. + VersionName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateAnnotationStoreVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAnnotationStoreVersion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAnnotationStoreVersion{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addEndpointPrefix_opUpdateAnnotationStoreVersionMiddleware(stack); err != nil { + return err + } + if err = addUpdateAnnotationStoreVersionResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateAnnotationStoreVersionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAnnotationStoreVersion(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type endpointPrefix_opUpdateAnnotationStoreVersionMiddleware struct { +} + +func (*endpointPrefix_opUpdateAnnotationStoreVersionMiddleware) ID() string { + return "EndpointHostPrefix" +} + +func (m *endpointPrefix_opUpdateAnnotationStoreVersionMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + req.URL.Host = "analytics-" + req.URL.Host + + return next.HandleSerialize(ctx, in) +} +func addEndpointPrefix_opUpdateAnnotationStoreVersionMiddleware(stack *middleware.Stack) error { + return stack.Serialize.Insert(&endpointPrefix_opUpdateAnnotationStoreVersionMiddleware{}, `OperationSerializer`, middleware.After) +} + +func newServiceMetadataMiddleware_opUpdateAnnotationStoreVersion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "omics", + OperationName: "UpdateAnnotationStoreVersion", + } +} + +type opUpdateAnnotationStoreVersionResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opUpdateAnnotationStoreVersionResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opUpdateAnnotationStoreVersionResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "omics" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "omics" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("omics") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addUpdateAnnotationStoreVersionResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opUpdateAnnotationStoreVersionResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/omics/deserializers.go b/service/omics/deserializers.go index fbcc7589eb9..61a2f62e64a 100644 --- a/service/omics/deserializers.go +++ b/service/omics/deserializers.go @@ -126,6 +126,175 @@ func awsRestjson1_deserializeOpErrorAbortMultipartReadSetUpload(response *smithy } } +type awsRestjson1_deserializeOpAcceptShare struct { +} + +func (*awsRestjson1_deserializeOpAcceptShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAcceptShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorAcceptShare(response, &metadata) + } + output := &AcceptShareOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentAcceptShareOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorAcceptShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentAcceptShareOutput(v **AcceptShareOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AcceptShareOutput + if *v == nil { + sv = &AcceptShareOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShareStatus to be of type string, got %T instead", value) + } + sv.Status = types.ShareStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpBatchDeleteReadSet struct { } @@ -970,6 +1139,15 @@ func awsRestjson1_deserializeOpDocumentCreateAnnotationStoreOutput(v **CreateAnn return err } + case "versionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + default: _, _ = key, value @@ -979,14 +1157,14 @@ func awsRestjson1_deserializeOpDocumentCreateAnnotationStoreOutput(v **CreateAnn return nil } -type awsRestjson1_deserializeOpCreateMultipartReadSetUpload struct { +type awsRestjson1_deserializeOpCreateAnnotationStoreVersion struct { } -func (*awsRestjson1_deserializeOpCreateMultipartReadSetUpload) ID() string { +func (*awsRestjson1_deserializeOpCreateAnnotationStoreVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMultipartReadSetUpload) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateAnnotationStoreVersion) 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) @@ -1000,9 +1178,9 @@ func (m *awsRestjson1_deserializeOpCreateMultipartReadSetUpload) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMultipartReadSetUpload(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateAnnotationStoreVersion(response, &metadata) } - output := &CreateMultipartReadSetUploadOutput{} + output := &CreateAnnotationStoreVersionOutput{} out.Result = output var buff [1024]byte @@ -1023,7 +1201,7 @@ func (m *awsRestjson1_deserializeOpCreateMultipartReadSetUpload) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateAnnotationStoreVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1036,7 +1214,7 @@ func (m *awsRestjson1_deserializeOpCreateMultipartReadSetUpload) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMultipartReadSetUpload(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateAnnotationStoreVersion(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)} @@ -1080,15 +1258,12 @@ func awsRestjson1_deserializeOpErrorCreateMultipartReadSetUpload(response *smith case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("NotSupportedOperationException", errorCode): - return awsRestjson1_deserializeErrorNotSupportedOperationException(response, errorBody) - - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -1111,7 +1286,7 @@ func awsRestjson1_deserializeOpErrorCreateMultipartReadSetUpload(response *smith } } -func awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(v **CreateMultipartReadSetUploadOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateAnnotationStoreVersionOutput(v **CreateAnnotationStoreVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1124,9 +1299,9 @@ func awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(v **Cr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMultipartReadSetUploadOutput + var sv *CreateAnnotationStoreVersionOutput if *v == nil { - sv = &CreateMultipartReadSetUploadOutput{} + sv = &CreateAnnotationStoreVersionOutput{} } else { sv = *v } @@ -1137,7 +1312,7 @@ func awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(v **Cr if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) } t, err := smithytime.ParseDateTime(jtv) if err != nil { @@ -1146,92 +1321,56 @@ func awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(v **Cr sv.CreationTime = ptr.Time(t) } - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReadSetDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "generatedFrom": + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GeneratedFrom to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.GeneratedFrom = ptr.String(jtv) + sv.Id = ptr.String(jtv) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReadSetName to be of type string, got %T instead", value) + return fmt.Errorf("expected StoreName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "referenceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReferenceArn to be of type string, got %T instead", value) - } - sv.ReferenceArn = ptr.String(jtv) - } - - case "sampleId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SampleId to be of type string, got %T instead", value) - } - sv.SampleId = ptr.String(jtv) - } - - case "sequenceStoreId": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + return fmt.Errorf("expected VersionStatus to be of type string, got %T instead", value) } - sv.SequenceStoreId = ptr.String(jtv) + sv.Status = types.VersionStatus(jtv) } - case "sourceFileType": + case "storeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FileType to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.SourceFileType = types.FileType(jtv) + sv.StoreId = ptr.String(jtv) } - case "subjectId": + case "versionName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubjectId to be of type string, got %T instead", value) + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) } - sv.SubjectId = ptr.String(jtv) + sv.VersionName = ptr.String(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "versionOptions": + if err := awsRestjson1_deserializeDocumentVersionOptions(&sv.VersionOptions, value); err != nil { return err } - case "uploadId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UploadId to be of type string, got %T instead", value) - } - sv.UploadId = ptr.String(jtv) - } - default: _, _ = key, value @@ -1241,14 +1380,14 @@ func awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(v **Cr return nil } -type awsRestjson1_deserializeOpCreateReferenceStore struct { +type awsRestjson1_deserializeOpCreateMultipartReadSetUpload struct { } -func (*awsRestjson1_deserializeOpCreateReferenceStore) ID() string { +func (*awsRestjson1_deserializeOpCreateMultipartReadSetUpload) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateReferenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateMultipartReadSetUpload) 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) @@ -1262,9 +1401,9 @@ func (m *awsRestjson1_deserializeOpCreateReferenceStore) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateReferenceStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMultipartReadSetUpload(response, &metadata) } - output := &CreateReferenceStoreOutput{} + output := &CreateMultipartReadSetUploadOutput{} out.Result = output var buff [1024]byte @@ -1285,7 +1424,7 @@ func (m *awsRestjson1_deserializeOpCreateReferenceStore) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1298,7 +1437,7 @@ func (m *awsRestjson1_deserializeOpCreateReferenceStore) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateReferenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateMultipartReadSetUpload(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)} @@ -1345,9 +1484,15 @@ func awsRestjson1_deserializeOpErrorCreateReferenceStore(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("RequestTimeoutException", errorCode): + case strings.EqualFold("NotSupportedOperationException", errorCode): + return awsRestjson1_deserializeErrorNotSupportedOperationException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1367,7 +1512,7 @@ func awsRestjson1_deserializeOpErrorCreateReferenceStore(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(v **CreateReferenceStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateMultipartReadSetUploadOutput(v **CreateMultipartReadSetUploadOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1380,24 +1525,15 @@ func awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(v **CreateRefe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateReferenceStoreOutput + var sv *CreateMultipartReadSetUploadOutput if *v == nil { - sv = &CreateReferenceStoreOutput{} + sv = &CreateMultipartReadSetUploadOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReferenceStoreArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "creationTime": if value != nil { jtv, ok := value.(string) @@ -1415,34 +1551,88 @@ func awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(v **CreateRefe if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReferenceStoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected ReadSetDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } - case "id": + case "generatedFrom": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReferenceStoreId to be of type string, got %T instead", value) + return fmt.Errorf("expected GeneratedFrom to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.GeneratedFrom = ptr.String(jtv) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReferenceStoreName to be of type string, got %T instead", value) + return fmt.Errorf("expected ReadSetName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "sseConfig": - if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + case "referenceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceArn to be of type string, got %T instead", value) + } + sv.ReferenceArn = ptr.String(jtv) + } + + case "sampleId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SampleId to be of type string, got %T instead", value) + } + sv.SampleId = ptr.String(jtv) + } + + case "sequenceStoreId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + } + sv.SequenceStoreId = ptr.String(jtv) + } + + case "sourceFileType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileType to be of type string, got %T instead", value) + } + sv.SourceFileType = types.FileType(jtv) + } + + case "subjectId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubjectId to be of type string, got %T instead", value) + } + sv.SubjectId = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } + case "uploadId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UploadId to be of type string, got %T instead", value) + } + sv.UploadId = ptr.String(jtv) + } + default: _, _ = key, value @@ -1452,14 +1642,14 @@ func awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(v **CreateRefe return nil } -type awsRestjson1_deserializeOpCreateRunGroup struct { +type awsRestjson1_deserializeOpCreateReferenceStore struct { } -func (*awsRestjson1_deserializeOpCreateRunGroup) ID() string { +func (*awsRestjson1_deserializeOpCreateReferenceStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateRunGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateReferenceStore) 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) @@ -1473,9 +1663,9 @@ func (m *awsRestjson1_deserializeOpCreateRunGroup) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateRunGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateReferenceStore(response, &metadata) } - output := &CreateRunGroupOutput{} + output := &CreateReferenceStoreOutput{} out.Result = output var buff [1024]byte @@ -1496,7 +1686,7 @@ func (m *awsRestjson1_deserializeOpCreateRunGroup) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateRunGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1509,7 +1699,7 @@ func (m *awsRestjson1_deserializeOpCreateRunGroup) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateRunGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateReferenceStore(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)} @@ -1553,18 +1743,12 @@ func awsRestjson1_deserializeOpErrorCreateRunGroup(response *smithyhttp.Response case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("RequestTimeoutException", errorCode): return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1584,7 +1768,7 @@ func awsRestjson1_deserializeOpErrorCreateRunGroup(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentCreateRunGroupOutput(v **CreateRunGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateReferenceStoreOutput(v **CreateReferenceStoreOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1597,9 +1781,9 @@ func awsRestjson1_deserializeOpDocumentCreateRunGroupOutput(v **CreateRunGroupOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateRunGroupOutput + var sv *CreateReferenceStoreOutput if *v == nil { - sv = &CreateRunGroupOutput{} + sv = &CreateReferenceStoreOutput{} } else { sv = *v } @@ -1610,22 +1794,53 @@ func awsRestjson1_deserializeOpDocumentCreateRunGroupOutput(v **CreateRunGroupOu if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunGroupArn to be of type string, got %T instead", value) + return fmt.Errorf("expected ReferenceStoreArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceStoreDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunGroupId to be of type string, got %T instead", value) + return fmt.Errorf("expected ReferenceStoreId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReferenceStoreName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { return err } @@ -1638,14 +1853,14 @@ func awsRestjson1_deserializeOpDocumentCreateRunGroupOutput(v **CreateRunGroupOu return nil } -type awsRestjson1_deserializeOpCreateSequenceStore struct { +type awsRestjson1_deserializeOpCreateRunGroup struct { } -func (*awsRestjson1_deserializeOpCreateSequenceStore) ID() string { +func (*awsRestjson1_deserializeOpCreateRunGroup) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateRunGroup) 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) @@ -1659,9 +1874,9 @@ func (m *awsRestjson1_deserializeOpCreateSequenceStore) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateSequenceStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateRunGroup(response, &metadata) } - output := &CreateSequenceStoreOutput{} + output := &CreateRunGroupOutput{} out.Result = output var buff [1024]byte @@ -1682,7 +1897,7 @@ func (m *awsRestjson1_deserializeOpCreateSequenceStore) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateRunGroupOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1695,7 +1910,7 @@ func (m *awsRestjson1_deserializeOpCreateSequenceStore) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateRunGroup(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)} @@ -1739,12 +1954,18 @@ func awsRestjson1_deserializeOpErrorCreateSequenceStore(response *smithyhttp.Res case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("RequestTimeoutException", errorCode): return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1764,7 +1985,7 @@ func awsRestjson1_deserializeOpErrorCreateSequenceStore(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(v **CreateSequenceStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateRunGroupOutput(v **CreateRunGroupOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1777,9 +1998,9 @@ func awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(v **CreateSeque return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSequenceStoreOutput + var sv *CreateRunGroupOutput if *v == nil { - sv = &CreateSequenceStoreOutput{} + sv = &CreateRunGroupOutput{} } else { sv = *v } @@ -1790,62 +2011,22 @@ func awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(v **CreateSeque if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreArn to be of type string, got %T instead", value) + return fmt.Errorf("expected RunGroupArn to be of type string, got %T instead", value) } sv.Arn = ptr.String(jtv) } - case "creationTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "fallbackLocation": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) - } - sv.FallbackLocation = ptr.String(jtv) - } - case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + return fmt.Errorf("expected RunGroupId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SequenceStoreName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "sseConfig": - if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { return err } @@ -1858,14 +2039,14 @@ func awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(v **CreateSeque return nil } -type awsRestjson1_deserializeOpCreateVariantStore struct { +type awsRestjson1_deserializeOpCreateSequenceStore struct { } -func (*awsRestjson1_deserializeOpCreateVariantStore) ID() string { +func (*awsRestjson1_deserializeOpCreateSequenceStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateVariantStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateSequenceStore) 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) @@ -1879,9 +2060,9 @@ func (m *awsRestjson1_deserializeOpCreateVariantStore) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateVariantStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateSequenceStore(response, &metadata) } - output := &CreateVariantStoreOutput{} + output := &CreateSequenceStoreOutput{} out.Result = output var buff [1024]byte @@ -1902,7 +2083,7 @@ func (m *awsRestjson1_deserializeOpCreateVariantStore) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateVariantStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1915,7 +2096,7 @@ func (m *awsRestjson1_deserializeOpCreateVariantStore) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateVariantStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateSequenceStore(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)} @@ -1959,14 +2140,11 @@ func awsRestjson1_deserializeOpErrorCreateVariantStore(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -1987,7 +2165,7 @@ func awsRestjson1_deserializeOpErrorCreateVariantStore(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentCreateVariantStoreOutput(v **CreateVariantStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateSequenceStoreOutput(v **CreateSequenceStoreOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2000,20 +2178,29 @@ func awsRestjson1_deserializeOpDocumentCreateVariantStoreOutput(v **CreateVarian return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateVariantStoreOutput + var sv *CreateSequenceStoreOutput if *v == nil { - sv = &CreateVariantStoreOutput{} + sv = &CreateSequenceStoreOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + case "creationTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) } t, err := smithytime.ParseDateTime(jtv) if err != nil { @@ -2022,36 +2209,45 @@ func awsRestjson1_deserializeOpDocumentCreateVariantStoreOutput(v **CreateVarian sv.CreationTime = ptr.Time(t) } - case "id": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "name": + case "fallbackLocation": 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 S3Destination to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.FallbackLocation = ptr.String(jtv) } - case "reference": - if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { - return err + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) } - case "status": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected SequenceStoreName to be of type string, got %T instead", value) } - sv.Status = types.StoreStatus(jtv) + sv.Name = ptr.String(jtv) + } + + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + return err } default: @@ -2063,14 +2259,14 @@ func awsRestjson1_deserializeOpDocumentCreateVariantStoreOutput(v **CreateVarian return nil } -type awsRestjson1_deserializeOpCreateWorkflow struct { +type awsRestjson1_deserializeOpCreateShare struct { } -func (*awsRestjson1_deserializeOpCreateWorkflow) ID() string { +func (*awsRestjson1_deserializeOpCreateShare) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateWorkflow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateShare) 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) @@ -2084,9 +2280,9 @@ func (m *awsRestjson1_deserializeOpCreateWorkflow) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateWorkflow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateShare(response, &metadata) } - output := &CreateWorkflowOutput{} + output := &CreateShareOutput{} out.Result = output var buff [1024]byte @@ -2107,7 +2303,7 @@ func (m *awsRestjson1_deserializeOpCreateWorkflow) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateWorkflowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateShareOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2120,7 +2316,7 @@ func (m *awsRestjson1_deserializeOpCreateWorkflow) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateWorkflow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateShare(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)} @@ -2170,9 +2366,6 @@ func awsRestjson1_deserializeOpErrorCreateWorkflow(response *smithyhttp.Response case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2195,7 +2388,7 @@ func awsRestjson1_deserializeOpErrorCreateWorkflow(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentCreateWorkflowOutput(v **CreateWorkflowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateShareOutput(v **CreateShareOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2208,45 +2401,40 @@ func awsRestjson1_deserializeOpDocumentCreateWorkflowOutput(v **CreateWorkflowOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateWorkflowOutput + var sv *CreateShareOutput if *v == nil { - sv = &CreateWorkflowOutput{} + sv = &CreateShareOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "shareId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkflowArn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.ShareId = ptr.String(jtv) } - case "id": + case "shareName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkflowId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShareName to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.ShareName = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkflowStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ShareStatus to be of type string, got %T instead", value) } - sv.Status = types.WorkflowStatus(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { - return err + sv.Status = types.ShareStatus(jtv) } default: @@ -2258,14 +2446,14 @@ func awsRestjson1_deserializeOpDocumentCreateWorkflowOutput(v **CreateWorkflowOu return nil } -type awsRestjson1_deserializeOpDeleteAnnotationStore struct { +type awsRestjson1_deserializeOpCreateVariantStore struct { } -func (*awsRestjson1_deserializeOpDeleteAnnotationStore) ID() string { +func (*awsRestjson1_deserializeOpCreateVariantStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAnnotationStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateVariantStore) 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) @@ -2279,9 +2467,9 @@ func (m *awsRestjson1_deserializeOpDeleteAnnotationStore) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAnnotationStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateVariantStore(response, &metadata) } - output := &DeleteAnnotationStoreOutput{} + output := &CreateVariantStoreOutput{} out.Result = output var buff [1024]byte @@ -2302,7 +2490,7 @@ func (m *awsRestjson1_deserializeOpDeleteAnnotationStore) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateVariantStoreOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2315,7 +2503,7 @@ func (m *awsRestjson1_deserializeOpDeleteAnnotationStore) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAnnotationStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateVariantStore(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)} @@ -2368,6 +2556,9 @@ func awsRestjson1_deserializeOpErrorDeleteAnnotationStore(response *smithyhttp.R case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2384,7 +2575,7 @@ func awsRestjson1_deserializeOpErrorDeleteAnnotationStore(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreOutput(v **DeleteAnnotationStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateVariantStoreOutput(v **CreateVariantStoreOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2397,15 +2588,51 @@ func awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreOutput(v **DeleteAnn return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteAnnotationStoreOutput + var sv *CreateVariantStoreOutput if *v == nil { - sv = &DeleteAnnotationStoreOutput{} + sv = &CreateVariantStoreOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "reference": + if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { + return err + } + case "status": if value != nil { jtv, ok := value.(string) @@ -2424,14 +2651,14 @@ func awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreOutput(v **DeleteAnn return nil } -type awsRestjson1_deserializeOpDeleteReference struct { +type awsRestjson1_deserializeOpCreateWorkflow struct { } -func (*awsRestjson1_deserializeOpDeleteReference) ID() string { +func (*awsRestjson1_deserializeOpCreateWorkflow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteReference) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateWorkflow) 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) @@ -2445,15 +2672,43 @@ func (m *awsRestjson1_deserializeOpDeleteReference) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteReference(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateWorkflow(response, &metadata) } - output := &DeleteReferenceOutput{} + output := &CreateWorkflowOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateWorkflowOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteReference(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateWorkflow(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)} @@ -2509,6 +2764,9 @@ func awsRestjson1_deserializeOpErrorDeleteReference(response *smithyhttp.Respons case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2525,14 +2783,77 @@ func awsRestjson1_deserializeOpErrorDeleteReference(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpDeleteReferenceStore struct { +func awsRestjson1_deserializeOpDocumentCreateWorkflowOutput(v **CreateWorkflowOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateWorkflowOutput + if *v == nil { + sv = &CreateWorkflowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowStatus to be of type string, got %T instead", value) + } + sv.Status = types.WorkflowStatus(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteReferenceStore) ID() string { +type awsRestjson1_deserializeOpDeleteAnnotationStore struct { +} + +func (*awsRestjson1_deserializeOpDeleteAnnotationStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteReferenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAnnotationStore) 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) @@ -2546,20 +2867,48 @@ func (m *awsRestjson1_deserializeOpDeleteReferenceStore) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteReferenceStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAnnotationStore(response, &metadata) } - output := &DeleteReferenceStoreOutput{} + output := &DeleteAnnotationStoreOutput{} out.Result = output - return out, metadata, err -} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) -func awsRestjson1_deserializeOpErrorDeleteReferenceStore(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()) + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteAnnotationStore(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 @@ -2604,9 +2953,6 @@ func awsRestjson1_deserializeOpErrorDeleteReferenceStore(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -2626,14 +2972,54 @@ func awsRestjson1_deserializeOpErrorDeleteReferenceStore(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpDeleteRun struct { +func awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreOutput(v **DeleteAnnotationStoreOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteAnnotationStoreOutput + if *v == nil { + sv = &DeleteAnnotationStoreOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.StoreStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteRun) ID() string { +type awsRestjson1_deserializeOpDeleteAnnotationStoreVersions struct { +} + +func (*awsRestjson1_deserializeOpDeleteAnnotationStoreVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRun) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAnnotationStoreVersions) 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) @@ -2647,21 +3033,43 @@ func (m *awsRestjson1_deserializeOpDeleteRun) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRun(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAnnotationStoreVersions(response, &metadata) } - output := &DeleteRunOutput{} + output := &DeleteAnnotationStoreVersionsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreVersionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRun(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAnnotationStoreVersions(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)} @@ -2711,15 +3119,9 @@ func awsRestjson1_deserializeOpErrorDeleteRun(response *smithyhttp.Response, met case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2736,14 +3138,50 @@ func awsRestjson1_deserializeOpErrorDeleteRun(response *smithyhttp.Response, met } } -type awsRestjson1_deserializeOpDeleteRunGroup struct { +func awsRestjson1_deserializeOpDocumentDeleteAnnotationStoreVersionsOutput(v **DeleteAnnotationStoreVersionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteAnnotationStoreVersionsOutput + if *v == nil { + sv = &DeleteAnnotationStoreVersionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "errors": + if err := awsRestjson1_deserializeDocumentVersionDeleteErrorList(&sv.Errors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteRunGroup) ID() string { +type awsRestjson1_deserializeOpDeleteReference struct { +} + +func (*awsRestjson1_deserializeOpDeleteReference) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRunGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteReference) 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) @@ -2757,21 +3195,15 @@ func (m *awsRestjson1_deserializeOpDeleteRunGroup) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRunGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteReference(response, &metadata) } - output := &DeleteRunGroupOutput{} + output := &DeleteReferenceOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRunGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteReference(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)} @@ -2827,9 +3259,6 @@ func awsRestjson1_deserializeOpErrorDeleteRunGroup(response *smithyhttp.Response case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -2846,14 +3275,14 @@ func awsRestjson1_deserializeOpErrorDeleteRunGroup(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteSequenceStore struct { +type awsRestjson1_deserializeOpDeleteReferenceStore struct { } -func (*awsRestjson1_deserializeOpDeleteSequenceStore) ID() string { +func (*awsRestjson1_deserializeOpDeleteReferenceStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteReferenceStore) 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) @@ -2867,15 +3296,15 @@ func (m *awsRestjson1_deserializeOpDeleteSequenceStore) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSequenceStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteReferenceStore(response, &metadata) } - output := &DeleteSequenceStoreOutput{} + output := &DeleteReferenceStoreOutput{} out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteReferenceStore(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)} @@ -2947,14 +3376,14 @@ func awsRestjson1_deserializeOpErrorDeleteSequenceStore(response *smithyhttp.Res } } -type awsRestjson1_deserializeOpDeleteVariantStore struct { +type awsRestjson1_deserializeOpDeleteRun struct { } -func (*awsRestjson1_deserializeOpDeleteVariantStore) ID() string { +func (*awsRestjson1_deserializeOpDeleteRun) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVariantStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRun) 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) @@ -2968,43 +3397,21 @@ func (m *awsRestjson1_deserializeOpDeleteVariantStore) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVariantStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRun(response, &metadata) } - output := &DeleteVariantStoreOutput{} + output := &DeleteRunOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDeleteVariantStoreOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVariantStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRun(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)} @@ -3054,9 +3461,15 @@ func awsRestjson1_deserializeOpErrorDeleteVariantStore(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -3073,27 +3486,533 @@ func awsRestjson1_deserializeOpErrorDeleteVariantStore(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentDeleteVariantStoreOutput(v **DeleteVariantStoreOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +type awsRestjson1_deserializeOpDeleteRunGroup struct { +} + +func (*awsRestjson1_deserializeOpDeleteRunGroup) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteRunGroup) 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 } - shape, ok := value.(map[string]interface{}) + response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *DeleteVariantStoreOutput - if *v == nil { - sv = &DeleteVariantStoreOutput{} - } else { - sv = *v + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRunGroup(response, &metadata) } + output := &DeleteRunGroupOutput{} + out.Result = output - for key, value := range shape { + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteRunGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteSequenceStore struct { +} + +func (*awsRestjson1_deserializeOpDeleteSequenceStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteSequenceStore(response, &metadata) + } + output := &DeleteSequenceStoreOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteShare struct { +} + +func (*awsRestjson1_deserializeOpDeleteShare) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteShare) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteShare(response, &metadata) + } + output := &DeleteShareOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteShareOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteShare(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteShareOutput(v **DeleteShareOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteShareOutput + if *v == nil { + sv = &DeleteShareOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ShareStatus to be of type string, got %T instead", value) + } + sv.Status = types.ShareStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteVariantStore struct { +} + +func (*awsRestjson1_deserializeOpDeleteVariantStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteVariantStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteVariantStore(response, &metadata) + } + output := &DeleteVariantStoreOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDeleteVariantStoreOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteVariantStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDeleteVariantStoreOutput(v **DeleteVariantStoreOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteVariantStoreOutput + if *v == nil { + sv = &DeleteVariantStoreOutput{} + } else { + sv = *v + } + + for key, value := range shape { switch key { case "status": if value != nil { @@ -3180,57 +4099,328 @@ func awsRestjson1_deserializeOpErrorDeleteWorkflow(response *smithyhttp.Response return err } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpGetAnnotationImportJob struct { +} + +func (*awsRestjson1_deserializeOpGetAnnotationImportJob) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetAnnotationImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetAnnotationImportJob(response, &metadata) + } + output := &GetAnnotationImportJobOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetAnnotationImportJobOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetAnnotationImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetAnnotationImportJobOutput(v **GetAnnotationImportJobOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetAnnotationImportJobOutput + if *v == nil { + sv = &GetAnnotationImportJobOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "annotationFields": + if err := awsRestjson1_deserializeDocumentAnnotationFieldMap(&sv.AnnotationFields, value); err != nil { + return err + } + + case "completionTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CompletionTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CompletionTime = ptr.Time(t) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "destinationName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StoreName to be of type string, got %T instead", value) + } + sv.DestinationName = ptr.String(jtv) + } + + case "formatOptions": + if err := awsRestjson1_deserializeDocumentFormatOptions(&sv.FormatOptions, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case "items": + if err := awsRestjson1_deserializeDocumentAnnotationImportItemDetails(&sv.Items, value); err != nil { + return err + } - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case "runLeftNormalization": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected RunLeftNormalization to be of type *bool, got %T instead", value) + } + sv.RunLeftNormalization = jtv + } - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + } + sv.Status = types.JobStatus(jtv) + } - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobStatusMsg to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case "versionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpGetAnnotationImportJob struct { +type awsRestjson1_deserializeOpGetAnnotationStore struct { } -func (*awsRestjson1_deserializeOpGetAnnotationImportJob) ID() string { +func (*awsRestjson1_deserializeOpGetAnnotationStore) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetAnnotationImportJob) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetAnnotationStore) 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) @@ -3244,9 +4434,9 @@ func (m *awsRestjson1_deserializeOpGetAnnotationImportJob) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAnnotationImportJob(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetAnnotationStore(response, &metadata) } - output := &GetAnnotationImportJobOutput{} + output := &GetAnnotationStoreOutput{} out.Result = output var buff [1024]byte @@ -3267,7 +4457,7 @@ func (m *awsRestjson1_deserializeOpGetAnnotationImportJob) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetAnnotationImportJobOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3280,7 +4470,7 @@ func (m *awsRestjson1_deserializeOpGetAnnotationImportJob) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetAnnotationImportJob(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetAnnotationStore(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)} @@ -3346,7 +4536,7 @@ func awsRestjson1_deserializeOpErrorGetAnnotationImportJob(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentGetAnnotationImportJobOutput(v **GetAnnotationImportJobOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(v **GetAnnotationStoreOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3359,108 +4549,135 @@ func awsRestjson1_deserializeOpDocumentGetAnnotationImportJobOutput(v **GetAnnot return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetAnnotationImportJobOutput + var sv *GetAnnotationStoreOutput if *v == nil { - sv = &GetAnnotationImportJobOutput{} + sv = &GetAnnotationStoreOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "annotationFields": - if err := awsRestjson1_deserializeDocumentAnnotationFieldMap(&sv.AnnotationFields, value); err != nil { - return err - } - - case "completionTime": + case "creationTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CompletionTime to be of type string, got %T instead", value) + return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) } t, err := smithytime.ParseDateTime(jtv) if err != nil { return err } - sv.CompletionTime = ptr.Time(t) + sv.CreationTime = ptr.Time(t) } - case "creationTime": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } - sv.CreationTime = ptr.Time(t) + sv.Description = ptr.String(jtv) } - case "destinationName": + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreName to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.DestinationName = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "formatOptions": - if err := awsRestjson1_deserializeDocumentFormatOptions(&sv.FormatOptions, value); err != nil { - return err + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) } - case "id": + case "numVersions": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) } - sv.Id = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumVersions = ptr.Int32(int32(i64)) } - case "items": - if err := awsRestjson1_deserializeDocumentAnnotationImportItemDetails(&sv.Items, value); err != nil { + case "reference": + if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { return err } - case "roleArn": + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + return err + } + + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.Status = types.StoreStatus(jtv) } - case "runLeftNormalization": + case "statusMessage": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RunLeftNormalization to be of type *bool, got %T instead", value) + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) } - sv.RunLeftNormalization = jtv + sv.StatusMessage = ptr.String(jtv) } - case "status": + case "storeArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Status = types.JobStatus(jtv) + sv.StoreArn = ptr.String(jtv) } - case "statusMessage": + case "storeFormat": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected JobStatusMsg to be of type string, got %T instead", value) + return fmt.Errorf("expected StoreFormat to be of type string, got %T instead", value) } - sv.StatusMessage = ptr.String(jtv) + sv.StoreFormat = types.StoreFormat(jtv) + } + + case "storeOptions": + if err := awsRestjson1_deserializeDocumentStoreOptions(&sv.StoreOptions, value); err != nil { + return err + } + + case "storeSizeBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StoreSizeBytes = ptr.Int64(i64) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } case "updateTime": @@ -3485,14 +4702,14 @@ func awsRestjson1_deserializeOpDocumentGetAnnotationImportJobOutput(v **GetAnnot return nil } -type awsRestjson1_deserializeOpGetAnnotationStore struct { +type awsRestjson1_deserializeOpGetAnnotationStoreVersion struct { } -func (*awsRestjson1_deserializeOpGetAnnotationStore) ID() string { +func (*awsRestjson1_deserializeOpGetAnnotationStoreVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetAnnotationStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetAnnotationStoreVersion) 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) @@ -3506,9 +4723,9 @@ func (m *awsRestjson1_deserializeOpGetAnnotationStore) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAnnotationStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetAnnotationStoreVersion(response, &metadata) } - output := &GetAnnotationStoreOutput{} + output := &GetAnnotationStoreVersionOutput{} out.Result = output var buff [1024]byte @@ -3529,7 +4746,7 @@ func (m *awsRestjson1_deserializeOpGetAnnotationStore) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetAnnotationStoreVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3542,7 +4759,7 @@ func (m *awsRestjson1_deserializeOpGetAnnotationStore) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetAnnotationStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetAnnotationStoreVersion(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)} @@ -3608,7 +4825,7 @@ func awsRestjson1_deserializeOpErrorGetAnnotationStore(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(v **GetAnnotationStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetAnnotationStoreVersionOutput(v **GetAnnotationStoreVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3621,9 +4838,9 @@ func awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(v **GetAnnotatio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetAnnotationStoreOutput + var sv *GetAnnotationStoreVersionOutput if *v == nil { - sv = &GetAnnotationStoreOutput{} + sv = &GetAnnotationStoreVersionOutput{} } else { sv = *v } @@ -3647,7 +4864,7 @@ func awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(v **GetAnnotatio if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -3665,63 +4882,80 @@ func awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(v **GetAnnotatio 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 StoreName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "reference": - if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { - return err + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionStatus to be of type string, got %T instead", value) + } + sv.Status = types.VersionStatus(jtv) } - case "sseConfig": - if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { - return err + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) } - case "status": + case "storeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.Status = types.StoreStatus(jtv) + sv.StoreId = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err } - case "statusMessage": + case "updateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) } - sv.StatusMessage = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) } - case "storeArn": + case "versionArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.StoreArn = ptr.String(jtv) + sv.VersionArn = ptr.String(jtv) } - case "storeFormat": + case "versionName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreFormat to be of type string, got %T instead", value) + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) } - sv.StoreFormat = types.StoreFormat(jtv) + sv.VersionName = ptr.String(jtv) } - case "storeOptions": - if err := awsRestjson1_deserializeDocumentStoreOptions(&sv.StoreOptions, value); err != nil { + case "versionOptions": + if err := awsRestjson1_deserializeDocumentVersionOptions(&sv.VersionOptions, value); err != nil { return err } - case "storeSizeBytes": + case "versionSizeBytes": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -3731,25 +4965,7 @@ func awsRestjson1_deserializeOpDocumentGetAnnotationStoreOutput(v **GetAnnotatio if err != nil { return err } - sv.StoreSizeBytes = ptr.Int64(i64) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { - return err - } - - case "updateTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdateTime = ptr.Time(t) + sv.VersionSizeBytes = ptr.Int64(i64) } default: @@ -6591,13 +7807,233 @@ func awsRestjson1_deserializeOpDocumentGetRunTaskOutput(v **GetRunTaskOutput, va sv.StopTime = ptr.Time(t) } - case "taskId": + case "taskId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskId to be of type string, got %T instead", value) + } + sv.TaskId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetSequenceStore struct { +} + +func (*awsRestjson1_deserializeOpGetSequenceStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetSequenceStore(response, &metadata) + } + output := &GetSequenceStoreOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceStoreOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetSequenceStoreOutput + if *v == nil { + sv = &GetSequenceStoreOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "fallbackLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) + } + sv.FallbackLocation = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TaskId to be of type string, got %T instead", value) + return fmt.Errorf("expected SequenceStoreName to be of type string, got %T instead", value) } - sv.TaskId = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + return err } default: @@ -6609,14 +8045,14 @@ func awsRestjson1_deserializeOpDocumentGetRunTaskOutput(v **GetRunTaskOutput, va return nil } -type awsRestjson1_deserializeOpGetSequenceStore struct { +type awsRestjson1_deserializeOpGetShare struct { } -func (*awsRestjson1_deserializeOpGetSequenceStore) ID() string { +func (*awsRestjson1_deserializeOpGetShare) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetShare) 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) @@ -6630,9 +8066,9 @@ func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSequenceStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetShare(response, &metadata) } - output := &GetSequenceStoreOutput{} + output := &GetShareOutput{} out.Result = output var buff [1024]byte @@ -6653,7 +8089,7 @@ func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetShareOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6666,7 +8102,7 @@ func (m *awsRestjson1_deserializeOpGetSequenceStore) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetShare(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)} @@ -6710,15 +8146,18 @@ func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -6735,7 +8174,7 @@ func awsRestjson1_deserializeOpErrorGetSequenceStore(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetShareOutput(v **GetShareOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6748,75 +8187,17 @@ func awsRestjson1_deserializeOpDocumentGetSequenceStoreOutput(v **GetSequenceSto return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSequenceStoreOutput + var sv *GetShareOutput if *v == nil { - sv = &GetSequenceStoreOutput{} + sv = &GetShareOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SequenceStoreArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "creationTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreationTime = ptr.Time(t) - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "fallbackLocation": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) - } - sv.FallbackLocation = ptr.String(jtv) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SequenceStoreName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "sseConfig": - if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + case "share": + if err := awsRestjson1_deserializeDocumentShareDetails(&sv.Share, value); err != nil { return err } @@ -7248,7 +8629,7 @@ func awsRestjson1_deserializeOpDocumentGetVariantStoreOutput(v **GetVariantStore if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -7615,40 +8996,208 @@ func awsRestjson1_deserializeOpDocumentGetWorkflowOutput(v **GetWorkflowOutput, sv.Status = types.WorkflowStatus(jtv) } - case "statusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WorkflowStatusMessage to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowStatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "storageCapacity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StorageCapacity = ptr.Int32(int32(i64)) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WorkflowType to be of type string, got %T instead", value) + } + sv.Type = types.WorkflowType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAnnotationImportJobs struct { +} + +func (*awsRestjson1_deserializeOpListAnnotationImportJobs) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAnnotationImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAnnotationImportJobs(response, &metadata) + } + output := &ListAnnotationImportJobsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAnnotationImportJobsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAnnotationImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAnnotationImportJobsOutput(v **ListAnnotationImportJobsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "storageCapacity": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.StorageCapacity = ptr.Int32(int32(i64)) - } + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + var sv *ListAnnotationImportJobsOutput + if *v == nil { + sv = &ListAnnotationImportJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "annotationImportJobs": + if err := awsRestjson1_deserializeDocumentAnnotationImportJobItems(&sv.AnnotationImportJobs, value); err != nil { return err } - case "type": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WorkflowType to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Type = types.WorkflowType(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -7660,14 +9209,14 @@ func awsRestjson1_deserializeOpDocumentGetWorkflowOutput(v **GetWorkflowOutput, return nil } -type awsRestjson1_deserializeOpListAnnotationImportJobs struct { +type awsRestjson1_deserializeOpListAnnotationStores struct { } -func (*awsRestjson1_deserializeOpListAnnotationImportJobs) ID() string { +func (*awsRestjson1_deserializeOpListAnnotationStores) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAnnotationImportJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAnnotationStores) 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) @@ -7681,9 +9230,9 @@ func (m *awsRestjson1_deserializeOpListAnnotationImportJobs) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAnnotationImportJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAnnotationStores(response, &metadata) } - output := &ListAnnotationImportJobsOutput{} + output := &ListAnnotationStoresOutput{} out.Result = output var buff [1024]byte @@ -7704,7 +9253,7 @@ func (m *awsRestjson1_deserializeOpListAnnotationImportJobs) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAnnotationImportJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAnnotationStoresOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7717,7 +9266,7 @@ func (m *awsRestjson1_deserializeOpListAnnotationImportJobs) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAnnotationImportJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAnnotationStores(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)} @@ -7783,7 +9332,7 @@ func awsRestjson1_deserializeOpErrorListAnnotationImportJobs(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentListAnnotationImportJobsOutput(v **ListAnnotationImportJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAnnotationStoresOutput(v **ListAnnotationStoresOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7796,17 +9345,17 @@ func awsRestjson1_deserializeOpDocumentListAnnotationImportJobsOutput(v **ListAn return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAnnotationImportJobsOutput + var sv *ListAnnotationStoresOutput if *v == nil { - sv = &ListAnnotationImportJobsOutput{} + sv = &ListAnnotationStoresOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "annotationImportJobs": - if err := awsRestjson1_deserializeDocumentAnnotationImportJobItems(&sv.AnnotationImportJobs, value); err != nil { + case "annotationStores": + if err := awsRestjson1_deserializeDocumentAnnotationStoreItems(&sv.AnnotationStores, value); err != nil { return err } @@ -7828,14 +9377,14 @@ func awsRestjson1_deserializeOpDocumentListAnnotationImportJobsOutput(v **ListAn return nil } -type awsRestjson1_deserializeOpListAnnotationStores struct { +type awsRestjson1_deserializeOpListAnnotationStoreVersions struct { } -func (*awsRestjson1_deserializeOpListAnnotationStores) ID() string { +func (*awsRestjson1_deserializeOpListAnnotationStoreVersions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAnnotationStores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAnnotationStoreVersions) 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) @@ -7849,9 +9398,9 @@ func (m *awsRestjson1_deserializeOpListAnnotationStores) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAnnotationStores(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAnnotationStoreVersions(response, &metadata) } - output := &ListAnnotationStoresOutput{} + output := &ListAnnotationStoreVersionsOutput{} out.Result = output var buff [1024]byte @@ -7872,7 +9421,7 @@ func (m *awsRestjson1_deserializeOpListAnnotationStores) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAnnotationStoresOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAnnotationStoreVersionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7885,7 +9434,7 @@ func (m *awsRestjson1_deserializeOpListAnnotationStores) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAnnotationStores(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAnnotationStoreVersions(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)} @@ -7951,7 +9500,7 @@ func awsRestjson1_deserializeOpErrorListAnnotationStores(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentListAnnotationStoresOutput(v **ListAnnotationStoresOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAnnotationStoreVersionsOutput(v **ListAnnotationStoreVersionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7964,17 +9513,17 @@ func awsRestjson1_deserializeOpDocumentListAnnotationStoresOutput(v **ListAnnota return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAnnotationStoresOutput + var sv *ListAnnotationStoreVersionsOutput if *v == nil { - sv = &ListAnnotationStoresOutput{} + sv = &ListAnnotationStoreVersionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "annotationStores": - if err := awsRestjson1_deserializeDocumentAnnotationStoreItems(&sv.AnnotationStores, value); err != nil { + case "annotationStoreVersions": + if err := awsRestjson1_deserializeDocumentAnnotationStoreVersionItems(&sv.AnnotationStoreVersions, value); err != nil { return err } @@ -10045,27 +11594,195 @@ func awsRestjson1_deserializeOpDocumentListRunTasksOutput(v **ListRunTasksOutput var sv *ListRunTasksOutput if *v == nil { - sv = &ListRunTasksOutput{} + sv = &ListRunTasksOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "items": + if err := awsRestjson1_deserializeDocumentTaskList(&sv.Items, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TaskListToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListSequenceStores struct { +} + +func (*awsRestjson1_deserializeOpListSequenceStores) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListSequenceStores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListSequenceStores(response, &metadata) + } + output := &ListSequenceStoresOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListSequenceStoresOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListSequenceStores(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("RequestTimeoutException", errorCode): + return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListSequenceStoresOutput(v **ListSequenceStoresOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSequenceStoresOutput + if *v == nil { + sv = &ListSequenceStoresOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentTaskList(&sv.Items, value); err != nil { - return err - } - case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TaskListToken to be of type string, got %T instead", value) + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } + case "sequenceStores": + if err := awsRestjson1_deserializeDocumentSequenceStoreDetailList(&sv.SequenceStores, value); err != nil { + return err + } + default: _, _ = key, value @@ -10075,14 +11792,14 @@ func awsRestjson1_deserializeOpDocumentListRunTasksOutput(v **ListRunTasksOutput return nil } -type awsRestjson1_deserializeOpListSequenceStores struct { +type awsRestjson1_deserializeOpListShares struct { } -func (*awsRestjson1_deserializeOpListSequenceStores) ID() string { +func (*awsRestjson1_deserializeOpListShares) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSequenceStores) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListShares) 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) @@ -10096,9 +11813,9 @@ func (m *awsRestjson1_deserializeOpListSequenceStores) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSequenceStores(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListShares(response, &metadata) } - output := &ListSequenceStoresOutput{} + output := &ListSharesOutput{} out.Result = output var buff [1024]byte @@ -10119,7 +11836,7 @@ func (m *awsRestjson1_deserializeOpListSequenceStores) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSequenceStoresOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSharesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10132,7 +11849,7 @@ func (m *awsRestjson1_deserializeOpListSequenceStores) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSequenceStores(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListShares(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)} @@ -10176,11 +11893,17 @@ func awsRestjson1_deserializeOpErrorListSequenceStores(response *smithyhttp.Resp case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("RequestTimeoutException", errorCode): - return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -10198,7 +11921,7 @@ func awsRestjson1_deserializeOpErrorListSequenceStores(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentListSequenceStoresOutput(v **ListSequenceStoresOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSharesOutput(v **ListSharesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10211,9 +11934,9 @@ func awsRestjson1_deserializeOpDocumentListSequenceStoresOutput(v **ListSequence return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSequenceStoresOutput + var sv *ListSharesOutput if *v == nil { - sv = &ListSequenceStoresOutput{} + sv = &ListSharesOutput{} } else { sv = *v } @@ -10224,13 +11947,13 @@ func awsRestjson1_deserializeOpDocumentListSequenceStoresOutput(v **ListSequence if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.NextToken = ptr.String(jtv) } - case "sequenceStores": - if err := awsRestjson1_deserializeDocumentSequenceStoreDetailList(&sv.SequenceStores, value); err != nil { + case "shares": + if err := awsRestjson1_deserializeDocumentShareDetailsList(&sv.Shares, value); err != nil { return err } @@ -12464,36 +14187,271 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("RequestTimeoutException", errorCode): return awsRestjson1_deserializeErrorRequestTimeoutException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateAnnotationStore struct { +} + +func (*awsRestjson1_deserializeOpUpdateAnnotationStore) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateAnnotationStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnnotationStore(response, &metadata) + } + output := &UpdateAnnotationStoreOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateAnnotationStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(v **UpdateAnnotationStoreOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateAnnotationStoreOutput + if *v == nil { + sv = &UpdateAnnotationStoreOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "reference": + if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.StoreStatus(jtv) + } + + case "storeFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StoreFormat to be of type string, got %T instead", value) + } + sv.StoreFormat = types.StoreFormat(jtv) + } - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case "storeOptions": + if err := awsRestjson1_deserializeDocumentStoreOptions(&sv.StoreOptions, value); err != nil { + return err + } - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpUpdateAnnotationStore struct { +type awsRestjson1_deserializeOpUpdateAnnotationStoreVersion struct { } -func (*awsRestjson1_deserializeOpUpdateAnnotationStore) ID() string { +func (*awsRestjson1_deserializeOpUpdateAnnotationStoreVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAnnotationStore) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAnnotationStoreVersion) 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) @@ -12507,9 +14465,9 @@ func (m *awsRestjson1_deserializeOpUpdateAnnotationStore) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnnotationStore(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAnnotationStoreVersion(response, &metadata) } - output := &UpdateAnnotationStoreOutput{} + output := &UpdateAnnotationStoreVersionOutput{} out.Result = output var buff [1024]byte @@ -12530,7 +14488,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnnotationStore) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -12543,7 +14501,7 @@ func (m *awsRestjson1_deserializeOpUpdateAnnotationStore) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAnnotationStore(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAnnotationStoreVersion(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)} @@ -12609,7 +14567,7 @@ func awsRestjson1_deserializeOpErrorUpdateAnnotationStore(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(v **UpdateAnnotationStoreOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreVersionOutput(v **UpdateAnnotationStoreVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12622,9 +14580,9 @@ func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(v **UpdateAnn return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAnnotationStoreOutput + var sv *UpdateAnnotationStoreVersionOutput if *v == nil { - sv = &UpdateAnnotationStoreOutput{} + sv = &UpdateAnnotationStoreVersionOutput{} } else { sv = *v } @@ -12648,7 +14606,7 @@ func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(v **UpdateAnn if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -12666,37 +14624,27 @@ func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(v **UpdateAnn 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 StoreName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "reference": - if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { - return err - } - case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected VersionStatus to be of type string, got %T instead", value) } - sv.Status = types.StoreStatus(jtv) + sv.Status = types.VersionStatus(jtv) } - case "storeFormat": + case "storeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreFormat to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.StoreFormat = types.StoreFormat(jtv) - } - - case "storeOptions": - if err := awsRestjson1_deserializeDocumentStoreOptions(&sv.StoreOptions, value); err != nil { - return err + sv.StoreId = ptr.String(jtv) } case "updateTime": @@ -12712,6 +14660,15 @@ func awsRestjson1_deserializeOpDocumentUpdateAnnotationStoreOutput(v **UpdateAnn sv.UpdateTime = ptr.Time(t) } + case "versionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + default: _, _ = key, value @@ -12993,7 +14950,7 @@ func awsRestjson1_deserializeOpDocumentUpdateVariantStoreOutput(v **UpdateVarian if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -14147,18 +16104,204 @@ func awsRestjson1_deserializeDocumentAnnotationImportJobItem(v **types.Annotatio if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected RunLeftNormalization to be of type *bool, got %T instead", value) + return fmt.Errorf("expected RunLeftNormalization to be of type *bool, got %T instead", value) + } + sv.RunLeftNormalization = jtv + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + } + sv.Status = types.JobStatus(jtv) + } + + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) + } + + case "versionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAnnotationImportJobItems(v *[]types.AnnotationImportJobItem, 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.AnnotationImportJobItem + if *v == nil { + cv = []types.AnnotationImportJobItem{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AnnotationImportJobItem + destAddr := &col + if err := awsRestjson1_deserializeDocumentAnnotationImportJobItem(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAnnotationStoreItem(v **types.AnnotationStoreItem, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AnnotationStoreItem + if *v == nil { + sv = &types.AnnotationStoreItem{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Description to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "reference": + if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { + return err + } + + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) + } + sv.Status = types.StoreStatus(jtv) + } + + case "statusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + case "storeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.StoreArn = ptr.String(jtv) + } + + case "storeFormat": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StoreFormat to be of type string, got %T instead", value) } - sv.RunLeftNormalization = jtv + sv.StoreFormat = types.StoreFormat(jtv) } - case "status": + case "storeSizeBytes": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected JobStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) } - sv.Status = types.JobStatus(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StoreSizeBytes = ptr.Int64(i64) } case "updateTime": @@ -14183,7 +16326,7 @@ func awsRestjson1_deserializeDocumentAnnotationImportJobItem(v **types.Annotatio return nil } -func awsRestjson1_deserializeDocumentAnnotationImportJobItems(v *[]types.AnnotationImportJobItem, value interface{}) error { +func awsRestjson1_deserializeDocumentAnnotationStoreItems(v *[]types.AnnotationStoreItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14196,17 +16339,17 @@ func awsRestjson1_deserializeDocumentAnnotationImportJobItems(v *[]types.Annotat return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AnnotationImportJobItem + var cv []types.AnnotationStoreItem if *v == nil { - cv = []types.AnnotationImportJobItem{} + cv = []types.AnnotationStoreItem{} } else { cv = *v } for _, value := range shape { - var col types.AnnotationImportJobItem + var col types.AnnotationStoreItem destAddr := &col - if err := awsRestjson1_deserializeDocumentAnnotationImportJobItem(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentAnnotationStoreItem(&destAddr, value); err != nil { return err } col = *destAddr @@ -14217,7 +16360,7 @@ func awsRestjson1_deserializeDocumentAnnotationImportJobItems(v *[]types.Annotat return nil } -func awsRestjson1_deserializeDocumentAnnotationStoreItem(v **types.AnnotationStoreItem, value interface{}) error { +func awsRestjson1_deserializeDocumentAnnotationStoreVersionItem(v **types.AnnotationStoreVersionItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14230,9 +16373,9 @@ func awsRestjson1_deserializeDocumentAnnotationStoreItem(v **types.AnnotationSto return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AnnotationStoreItem + var sv *types.AnnotationStoreVersionItem if *v == nil { - sv = &types.AnnotationStoreItem{} + sv = &types.AnnotationStoreVersionItem{} } else { sv = *v } @@ -14256,7 +16399,7 @@ func awsRestjson1_deserializeDocumentAnnotationStoreItem(v **types.AnnotationSto if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -14274,28 +16417,18 @@ func awsRestjson1_deserializeDocumentAnnotationStoreItem(v **types.AnnotationSto 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 StoreName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "reference": - if err := awsRestjson1_deserializeDocumentReferenceItem(&sv.Reference, value); err != nil { - return err - } - - case "sseConfig": - if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { - return err - } - case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected VersionStatus to be of type string, got %T instead", value) } - sv.Status = types.StoreStatus(jtv) + sv.Status = types.VersionStatus(jtv) } case "statusMessage": @@ -14307,48 +16440,57 @@ func awsRestjson1_deserializeDocumentAnnotationStoreItem(v **types.AnnotationSto sv.StatusMessage = ptr.String(jtv) } - case "storeArn": + case "storeId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.StoreArn = ptr.String(jtv) + sv.StoreId = ptr.String(jtv) } - case "storeFormat": + case "updateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreFormat to be of type string, got %T instead", value) + return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) } - sv.StoreFormat = types.StoreFormat(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) } - case "storeSizeBytes": + case "versionArn": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.StoreSizeBytes = ptr.Int64(i64) + sv.VersionArn = ptr.String(jtv) } - case "updateTime": + case "versionName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) + sv.VersionName = ptr.String(jtv) + } + + case "versionSizeBytes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() if err != nil { return err } - sv.UpdateTime = ptr.Time(t) + sv.VersionSizeBytes = ptr.Int64(i64) } default: @@ -14360,7 +16502,7 @@ func awsRestjson1_deserializeDocumentAnnotationStoreItem(v **types.AnnotationSto return nil } -func awsRestjson1_deserializeDocumentAnnotationStoreItems(v *[]types.AnnotationStoreItem, value interface{}) error { +func awsRestjson1_deserializeDocumentAnnotationStoreVersionItems(v *[]types.AnnotationStoreVersionItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -14373,17 +16515,17 @@ func awsRestjson1_deserializeDocumentAnnotationStoreItems(v *[]types.AnnotationS return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AnnotationStoreItem + var cv []types.AnnotationStoreVersionItem if *v == nil { - cv = []types.AnnotationStoreItem{} + cv = []types.AnnotationStoreVersionItem{} } else { cv = *v } for _, value := range shape { - var col types.AnnotationStoreItem + var col types.AnnotationStoreVersionItem destAddr := &col - if err := awsRestjson1_deserializeDocumentAnnotationStoreItem(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentAnnotationStoreVersionItem(&destAddr, value); err != nil { return err } col = *destAddr @@ -17169,69 +19311,263 @@ func awsRestjson1_deserializeDocumentSequenceStoreDetail(v **types.SequenceStore sv = *v } - for key, value := range shape { - switch key { - case "arn": + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreArn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "fallbackLocation": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) + } + sv.FallbackLocation = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SequenceStoreName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "sseConfig": + if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSequenceStoreDetailList(v *[]types.SequenceStoreDetail, 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.SequenceStoreDetail + if *v == nil { + cv = []types.SequenceStoreDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.SequenceStoreDetail + destAddr := &col + if err := awsRestjson1_deserializeDocumentSequenceStoreDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_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 String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentShareDetails(v **types.ShareDetails, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ShareDetails + if *v == nil { + sv = &types.ShareDetails{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "creationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreationTime = ptr.Time(t) + } + + case "ownerId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreArn to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.OwnerId = ptr.String(jtv) } - case "creationTime": + case "principalSubscriber": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + sv.PrincipalSubscriber = ptr.String(jtv) + } + + case "resourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CreationTime = ptr.Time(t) + sv.ResourceArn = ptr.String(jtv) } - case "description": + case "shareId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.ShareId = ptr.String(jtv) } - case "fallbackLocation": + case "shareName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected S3Destination to be of type string, got %T instead", value) + return fmt.Errorf("expected ShareName to be of type string, got %T instead", value) } - sv.FallbackLocation = ptr.String(jtv) + sv.ShareName = ptr.String(jtv) } - case "id": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreId to be of type string, got %T instead", value) + return fmt.Errorf("expected ShareStatus to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Status = types.ShareStatus(jtv) } - case "name": + case "statusMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SequenceStoreName to be of type string, got %T instead", value) + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.StatusMessage = ptr.String(jtv) } - case "sseConfig": - if err := awsRestjson1_deserializeDocumentSseConfig(&sv.SseConfig, value); err != nil { - return err + case "updateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UpdateTime to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdateTime = ptr.Time(t) } default: @@ -17243,7 +19579,7 @@ func awsRestjson1_deserializeDocumentSequenceStoreDetail(v **types.SequenceStore return nil } -func awsRestjson1_deserializeDocumentSequenceStoreDetailList(v *[]types.SequenceStoreDetail, value interface{}) error { +func awsRestjson1_deserializeDocumentShareDetailsList(v *[]types.ShareDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -17256,17 +19592,17 @@ func awsRestjson1_deserializeDocumentSequenceStoreDetailList(v *[]types.Sequence return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.SequenceStoreDetail + var cv []types.ShareDetails if *v == nil { - cv = []types.SequenceStoreDetail{} + cv = []types.ShareDetails{} } else { cv = *v } for _, value := range shape { - var col types.SequenceStoreDetail + var col types.ShareDetails destAddr := &col - if err := awsRestjson1_deserializeDocumentSequenceStoreDetail(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentShareDetails(&destAddr, value); err != nil { return err } col = *destAddr @@ -17277,46 +19613,6 @@ func awsRestjson1_deserializeDocumentSequenceStoreDetailList(v *[]types.Sequence return nil } -func awsRestjson1_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 String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeDocumentSourceFiles(v **types.SourceFiles, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -17796,6 +20092,56 @@ func awsRestjson1_deserializeDocumentTsvStoreOptions(v **types.TsvStoreOptions, return nil } +func awsRestjson1_deserializeDocumentTsvVersionOptions(v **types.TsvVersionOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.TsvVersionOptions + if *v == nil { + sv = &types.TsvVersionOptions{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "annotationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AnnotationType to be of type string, got %T instead", value) + } + sv.AnnotationType = types.AnnotationType(jtv) + } + + case "formatToHeader": + if err := awsRestjson1_deserializeDocumentFormatToHeader(&sv.FormatToHeader, value); err != nil { + return err + } + + case "schema": + if err := awsRestjson1_deserializeDocumentSchema(&sv.Schema, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -18121,7 +20467,7 @@ func awsRestjson1_deserializeDocumentVariantStoreItem(v **types.VariantStoreItem if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StoreDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Description to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } @@ -18299,6 +20645,129 @@ func awsRestjson1_deserializeDocumentVcfOptions(v **types.VcfOptions, value inte return nil } +func awsRestjson1_deserializeDocumentVersionDeleteError(v **types.VersionDeleteError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.VersionDeleteError + if *v == nil { + sv = &types.VersionDeleteError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "versionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VersionName to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentVersionDeleteErrorList(v *[]types.VersionDeleteError, 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.VersionDeleteError + if *v == nil { + cv = []types.VersionDeleteError{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.VersionDeleteError + destAddr := &col + if err := awsRestjson1_deserializeDocumentVersionDeleteError(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentVersionOptions(v *types.VersionOptions, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %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.VersionOptions +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "tsvVersionOptions": + var mv types.TsvVersionOptions + destAddr := &mv + if err := awsRestjson1_deserializeDocumentTsvVersionOptions(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.VersionOptionsMemberTsvVersionOptions{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentWorkflowList(v *[]types.WorkflowListItem, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/omics/generated.json b/service/omics/generated.json index 261eabb2a5a..31bb950b922 100644 --- a/service/omics/generated.json +++ b/service/omics/generated.json @@ -11,28 +11,34 @@ "api_client.go", "api_client_test.go", "api_op_AbortMultipartReadSetUpload.go", + "api_op_AcceptShare.go", "api_op_BatchDeleteReadSet.go", "api_op_CancelAnnotationImportJob.go", "api_op_CancelRun.go", "api_op_CancelVariantImportJob.go", "api_op_CompleteMultipartReadSetUpload.go", "api_op_CreateAnnotationStore.go", + "api_op_CreateAnnotationStoreVersion.go", "api_op_CreateMultipartReadSetUpload.go", "api_op_CreateReferenceStore.go", "api_op_CreateRunGroup.go", "api_op_CreateSequenceStore.go", + "api_op_CreateShare.go", "api_op_CreateVariantStore.go", "api_op_CreateWorkflow.go", "api_op_DeleteAnnotationStore.go", + "api_op_DeleteAnnotationStoreVersions.go", "api_op_DeleteReference.go", "api_op_DeleteReferenceStore.go", "api_op_DeleteRun.go", "api_op_DeleteRunGroup.go", "api_op_DeleteSequenceStore.go", + "api_op_DeleteShare.go", "api_op_DeleteVariantStore.go", "api_op_DeleteWorkflow.go", "api_op_GetAnnotationImportJob.go", "api_op_GetAnnotationStore.go", + "api_op_GetAnnotationStoreVersion.go", "api_op_GetReadSet.go", "api_op_GetReadSetActivationJob.go", "api_op_GetReadSetExportJob.go", @@ -46,10 +52,12 @@ "api_op_GetRunGroup.go", "api_op_GetRunTask.go", "api_op_GetSequenceStore.go", + "api_op_GetShare.go", "api_op_GetVariantImportJob.go", "api_op_GetVariantStore.go", "api_op_GetWorkflow.go", "api_op_ListAnnotationImportJobs.go", + "api_op_ListAnnotationStoreVersions.go", "api_op_ListAnnotationStores.go", "api_op_ListMultipartReadSetUploads.go", "api_op_ListReadSetActivationJobs.go", @@ -64,6 +72,7 @@ "api_op_ListRunTasks.go", "api_op_ListRuns.go", "api_op_ListSequenceStores.go", + "api_op_ListShares.go", "api_op_ListTagsForResource.go", "api_op_ListVariantImportJobs.go", "api_op_ListVariantStores.go", @@ -78,6 +87,7 @@ "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateAnnotationStore.go", + "api_op_UpdateAnnotationStoreVersion.go", "api_op_UpdateRunGroup.go", "api_op_UpdateVariantStore.go", "api_op_UpdateWorkflow.go", diff --git a/service/omics/serializers.go b/service/omics/serializers.go index 92a39402b4e..746144b71b3 100644 --- a/service/omics/serializers.go +++ b/service/omics/serializers.go @@ -91,6 +91,71 @@ func awsRestjson1_serializeOpHttpBindingsAbortMultipartReadSetUploadInput(v *Abo return nil } +type awsRestjson1_serializeOpAcceptShare struct { +} + +func (*awsRestjson1_serializeOpAcceptShare) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAcceptShare) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*AcceptShareInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/share/{shareId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAcceptShareInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAcceptShareInput(v *AcceptShareInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ShareId == nil || len(*v.ShareId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member shareId must not be empty")} + } + if v.ShareId != nil { + if err := encoder.SetURI("shareId").String(*v.ShareId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpBatchDeleteReadSet struct { } @@ -585,6 +650,118 @@ func awsRestjson1_serializeOpDocumentCreateAnnotationStoreInput(v *CreateAnnotat } } + if v.VersionName != nil { + ok := object.Key("versionName") + ok.String(*v.VersionName) + } + + return nil +} + +type awsRestjson1_serializeOpCreateAnnotationStoreVersion struct { +} + +func (*awsRestjson1_serializeOpCreateAnnotationStoreVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAnnotationStoreVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateAnnotationStoreVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/annotationStore/{name}/version") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateAnnotationStoreVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateAnnotationStoreVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateAnnotationStoreVersionInput(v *CreateAnnotationStoreVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAnnotationStoreVersionInput(v *CreateAnnotationStoreVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + if v.VersionName != nil { + ok := object.Key("versionName") + ok.String(*v.VersionName) + } + + if v.VersionOptions != nil { + ok := object.Key("versionOptions") + if err := awsRestjson1_serializeDocumentVersionOptions(v.VersionOptions, ok); err != nil { + return err + } + } + return nil } @@ -1028,6 +1205,91 @@ func awsRestjson1_serializeOpDocumentCreateSequenceStoreInput(v *CreateSequenceS return nil } +type awsRestjson1_serializeOpCreateShare struct { +} + +func (*awsRestjson1_serializeOpCreateShare) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateShare) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateShareInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/share") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateShareInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateShareInput(v *CreateShareInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateShareInput(v *CreateShareInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.PrincipalSubscriber != nil { + ok := object.Key("principalSubscriber") + ok.String(*v.PrincipalSubscriber) + } + + if v.ResourceArn != nil { + ok := object.Key("resourceArn") + ok.String(*v.ResourceArn) + } + + if v.ShareName != nil { + ok := object.Key("shareName") + ok.String(*v.ShareName) + } + + return nil +} + type awsRestjson1_serializeOpCreateVariantStore struct { } @@ -1327,6 +1589,100 @@ func awsRestjson1_serializeOpHttpBindingsDeleteAnnotationStoreInput(v *DeleteAnn return nil } +type awsRestjson1_serializeOpDeleteAnnotationStoreVersions struct { +} + +func (*awsRestjson1_serializeOpDeleteAnnotationStoreVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAnnotationStoreVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteAnnotationStoreVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/annotationStore/{name}/versions/delete") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAnnotationStoreVersionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteAnnotationStoreVersionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAnnotationStoreVersionsInput(v *DeleteAnnotationStoreVersionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Force { + encoder.SetQuery("force").Boolean(v.Force) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteAnnotationStoreVersionsInput(v *DeleteAnnotationStoreVersionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Versions != nil { + ok := object.Key("versions") + if err := awsRestjson1_serializeDocumentVersionList(v.Versions, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteReference struct { } @@ -1661,6 +2017,71 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSequenceStoreInput(v *DeleteSeque return nil } +type awsRestjson1_serializeOpDeleteShare struct { +} + +func (*awsRestjson1_serializeOpDeleteShare) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteShare) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteShareInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/share/{shareId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteShareInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteShareInput(v *DeleteShareInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ShareId == nil || len(*v.ShareId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member shareId must not be empty")} + } + if v.ShareId != nil { + if err := encoder.SetURI("shareId").String(*v.ShareId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDeleteVariantStore struct { } @@ -1802,7 +2223,72 @@ func (*awsRestjson1_serializeOpGetAnnotationImportJob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetAnnotationImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetAnnotationImportJob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetAnnotationImportJobInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/import/annotation/{jobId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetAnnotationImportJobInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetAnnotationImportJobInput(v *GetAnnotationImportJobInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.JobId == nil || len(*v.JobId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")} + } + if v.JobId != nil { + if err := encoder.SetURI("jobId").String(*v.JobId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetAnnotationStore struct { +} + +func (*awsRestjson1_serializeOpGetAnnotationStore) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetAnnotationStore) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1810,13 +2296,13 @@ func (m *awsRestjson1_serializeOpGetAnnotationImportJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetAnnotationImportJobInput) + input, ok := in.Parameters.(*GetAnnotationStoreInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/import/annotation/{jobId}") + opPath, opQuery := httpbinding.SplitURI("/annotationStore/{name}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1832,7 +2318,7 @@ func (m *awsRestjson1_serializeOpGetAnnotationImportJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetAnnotationImportJobInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetAnnotationStoreInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1843,16 +2329,16 @@ func (m *awsRestjson1_serializeOpGetAnnotationImportJob) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetAnnotationImportJobInput(v *GetAnnotationImportJobInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetAnnotationStoreInput(v *GetAnnotationStoreInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.JobId == nil || len(*v.JobId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member jobId must not be empty")} + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} } - if v.JobId != nil { - if err := encoder.SetURI("jobId").String(*v.JobId); err != nil { + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { return err } } @@ -1860,14 +2346,14 @@ func awsRestjson1_serializeOpHttpBindingsGetAnnotationImportJobInput(v *GetAnnot return nil } -type awsRestjson1_serializeOpGetAnnotationStore struct { +type awsRestjson1_serializeOpGetAnnotationStoreVersion struct { } -func (*awsRestjson1_serializeOpGetAnnotationStore) ID() string { +func (*awsRestjson1_serializeOpGetAnnotationStoreVersion) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetAnnotationStore) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetAnnotationStoreVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1875,13 +2361,13 @@ func (m *awsRestjson1_serializeOpGetAnnotationStore) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetAnnotationStoreInput) + input, ok := in.Parameters.(*GetAnnotationStoreVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/annotationStore/{name}") + opPath, opQuery := httpbinding.SplitURI("/annotationStore/{name}/version/{versionName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1897,7 +2383,7 @@ func (m *awsRestjson1_serializeOpGetAnnotationStore) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGetAnnotationStoreInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetAnnotationStoreVersionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1908,7 +2394,7 @@ func (m *awsRestjson1_serializeOpGetAnnotationStore) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetAnnotationStoreInput(v *GetAnnotationStoreInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetAnnotationStoreVersionInput(v *GetAnnotationStoreVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1922,6 +2408,15 @@ func awsRestjson1_serializeOpHttpBindingsGetAnnotationStoreInput(v *GetAnnotatio } } + if v.VersionName == nil || len(*v.VersionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member versionName must not be empty")} + } + if v.VersionName != nil { + if err := encoder.SetURI("versionName").String(*v.VersionName); err != nil { + return err + } + } + return nil } @@ -2878,6 +3373,71 @@ func awsRestjson1_serializeOpHttpBindingsGetSequenceStoreInput(v *GetSequenceSto return nil } +type awsRestjson1_serializeOpGetShare struct { +} + +func (*awsRestjson1_serializeOpGetShare) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetShare) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetShareInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/share/{shareId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetShareInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetShareInput(v *GetShareInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ShareId == nil || len(*v.ShareId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member shareId must not be empty")} + } + if v.ShareId != nil { + if err := encoder.SetURI("shareId").String(*v.ShareId); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetVariantImportJob struct { } @@ -3275,6 +3835,104 @@ func awsRestjson1_serializeOpDocumentListAnnotationStoresInput(v *ListAnnotation return nil } +type awsRestjson1_serializeOpListAnnotationStoreVersions struct { +} + +func (*awsRestjson1_serializeOpListAnnotationStoreVersions) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAnnotationStoreVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAnnotationStoreVersionsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/annotationStore/{name}/versions") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListAnnotationStoreVersionsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListAnnotationStoreVersionsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAnnotationStoreVersionsInput(v *ListAnnotationStoreVersionsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListAnnotationStoreVersionsInput(v *ListAnnotationStoreVersionsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsRestjson1_serializeDocumentListAnnotationStoreVersionsFilter(v.Filter, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListMultipartReadSetUploads struct { } @@ -4262,14 +4920,91 @@ func awsRestjson1_serializeOpHttpBindingsListRunsInput(v *ListRunsInput, encoder encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.Name != nil { - encoder.SetQuery("name").String(*v.Name) - } - - if v.RunGroupId != nil { - encoder.SetQuery("runGroupId").String(*v.RunGroupId) - } - + if v.Name != nil { + encoder.SetQuery("name").String(*v.Name) + } + + if v.RunGroupId != nil { + encoder.SetQuery("runGroupId").String(*v.RunGroupId) + } + + if v.StartingToken != nil { + encoder.SetQuery("startingToken").String(*v.StartingToken) + } + + if len(v.Status) > 0 { + encoder.SetQuery("status").String(string(v.Status)) + } + + return nil +} + +type awsRestjson1_serializeOpListRunTasks struct { +} + +func (*awsRestjson1_serializeOpListRunTasks) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListRunTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListRunTasksInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/run/{id}/task") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListRunTasksInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListRunTasksInput(v *ListRunTasksInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Id == nil || len(*v.Id) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} + } + if v.Id != nil { + if err := encoder.SetURI("id").String(*v.Id); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + if v.StartingToken != nil { encoder.SetQuery("startingToken").String(*v.StartingToken) } @@ -4281,14 +5016,14 @@ func awsRestjson1_serializeOpHttpBindingsListRunsInput(v *ListRunsInput, encoder return nil } -type awsRestjson1_serializeOpListRunTasks struct { +type awsRestjson1_serializeOpListSequenceStores struct { } -func (*awsRestjson1_serializeOpListRunTasks) ID() string { +func (*awsRestjson1_serializeOpListSequenceStores) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListRunTasks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListSequenceStores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4296,16 +5031,16 @@ func (m *awsRestjson1_serializeOpListRunTasks) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListRunTasksInput) + input, ok := in.Parameters.(*ListSequenceStoresInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/run/{id}/task") + opPath, opQuery := httpbinding.SplitURI("/sequencestores") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4318,7 +5053,18 @@ func (m *awsRestjson1_serializeOpListRunTasks) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListRunTasksInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListSequenceStoresInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListSequenceStoresInput(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} } @@ -4329,43 +5075,44 @@ func (m *awsRestjson1_serializeOpListRunTasks) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListRunTasksInput(v *ListRunTasksInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListSequenceStoresInput(v *ListSequenceStoresInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("id").String(*v.Id); err != nil { - return err - } - } - if v.MaxResults != nil { encoder.SetQuery("maxResults").Integer(*v.MaxResults) } - if v.StartingToken != nil { - encoder.SetQuery("startingToken").String(*v.StartingToken) + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) } - if len(v.Status) > 0 { - encoder.SetQuery("status").String(string(v.Status)) + return nil +} + +func awsRestjson1_serializeOpDocumentListSequenceStoresInput(v *ListSequenceStoresInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filter != nil { + ok := object.Key("filter") + if err := awsRestjson1_serializeDocumentSequenceStoreFilter(v.Filter, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListSequenceStores struct { +type awsRestjson1_serializeOpListShares struct { } -func (*awsRestjson1_serializeOpListSequenceStores) ID() string { +func (*awsRestjson1_serializeOpListShares) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListSequenceStores) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListShares) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -4373,13 +5120,13 @@ func (m *awsRestjson1_serializeOpListSequenceStores) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListSequenceStoresInput) + input, ok := in.Parameters.(*ListSharesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/sequencestores") + opPath, opQuery := httpbinding.SplitURI("/shares") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -4395,14 +5142,14 @@ func (m *awsRestjson1_serializeOpListSequenceStores) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListSequenceStoresInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListSharesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentListSequenceStoresInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListSharesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4417,7 +5164,7 @@ func (m *awsRestjson1_serializeOpListSequenceStores) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListSequenceStoresInput(v *ListSequenceStoresInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListSharesInput(v *ListSharesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -4433,17 +5180,22 @@ func awsRestjson1_serializeOpHttpBindingsListSequenceStoresInput(v *ListSequence return nil } -func awsRestjson1_serializeOpDocumentListSequenceStoresInput(v *ListSequenceStoresInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListSharesInput(v *ListSharesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Filter != nil { ok := object.Key("filter") - if err := awsRestjson1_serializeDocumentSequenceStoreFilter(v.Filter, ok); err != nil { + if err := awsRestjson1_serializeDocumentFilter(v.Filter, ok); err != nil { return err } } + if len(v.ResourceOwner) > 0 { + ok := object.Key("resourceOwner") + ok.String(string(v.ResourceOwner)) + } + return nil } @@ -4879,6 +5631,11 @@ func awsRestjson1_serializeOpDocumentStartAnnotationImportJobInput(v *StartAnnot ok.Boolean(v.RunLeftNormalization) } + if v.VersionName != nil { + ok := object.Key("versionName") + ok.String(*v.VersionName) + } + return nil } @@ -5769,6 +6526,103 @@ func awsRestjson1_serializeOpDocumentUpdateAnnotationStoreInput(v *UpdateAnnotat return nil } +type awsRestjson1_serializeOpUpdateAnnotationStoreVersion struct { +} + +func (*awsRestjson1_serializeOpUpdateAnnotationStoreVersion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateAnnotationStoreVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateAnnotationStoreVersionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/annotationStore/{name}/version/{versionName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateAnnotationStoreVersionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAnnotationStoreVersionInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateAnnotationStoreVersionInput(v *UpdateAnnotationStoreVersionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.VersionName == nil || len(*v.VersionName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member versionName must not be empty")} + } + if v.VersionName != nil { + if err := encoder.SetURI("versionName").String(*v.VersionName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAnnotationStoreVersionInput(v *UpdateAnnotationStoreVersionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + return nil +} + type awsRestjson1_serializeOpUpdateRunGroup struct { } @@ -6210,6 +7064,17 @@ func awsRestjson1_serializeDocumentAnnotationImportItemSources(v []types.Annotat return nil } +func awsRestjson1_serializeDocumentArnList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentCompleteReadSetUploadPartList(v []types.CompleteReadSetUploadPartListItem, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -6292,6 +7157,27 @@ func awsRestjson1_serializeDocumentExportReadSetList(v []types.ExportReadSet, va return nil } +func awsRestjson1_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceArns != nil { + ok := object.Key("resourceArns") + if err := awsRestjson1_serializeDocumentArnList(v.ResourceArns, ok); err != nil { + return err + } + } + + if v.Status != nil { + ok := object.Key("status") + if err := awsRestjson1_serializeDocumentStatusList(v.Status, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentFormatOptions(v types.FormatOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6411,6 +7297,18 @@ func awsRestjson1_serializeDocumentListAnnotationStoresFilter(v *types.ListAnnot return nil } +func awsRestjson1_serializeDocumentListAnnotationStoreVersionsFilter(v *types.ListAnnotationStoreVersionsFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Status) > 0 { + ok := object.Key("status") + ok.String(string(v.Status)) + } + + return nil +} + func awsRestjson1_serializeDocumentListVariantImportJobsFilter(v *types.ListVariantImportJobsFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6871,6 +7769,17 @@ func awsRestjson1_serializeDocumentStartReferenceImportJobSourceList(v []types.S return nil } +func awsRestjson1_serializeDocumentStatusList(v []types.ShareStatus, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + func awsRestjson1_serializeDocumentStoreOptions(v types.StoreOptions, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6940,6 +7849,32 @@ func awsRestjson1_serializeDocumentTsvStoreOptions(v *types.TsvStoreOptions, val return nil } +func awsRestjson1_serializeDocumentTsvVersionOptions(v *types.TsvVersionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.AnnotationType) > 0 { + ok := object.Key("annotationType") + ok.String(string(v.AnnotationType)) + } + + if v.FormatToHeader != nil { + ok := object.Key("formatToHeader") + if err := awsRestjson1_serializeDocumentFormatToHeader(v.FormatToHeader, ok); err != nil { + return err + } + } + + if v.Schema != nil { + ok := object.Key("schema") + if err := awsRestjson1_serializeDocumentSchema(v.Schema, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentVariantImportItemSource(v *types.VariantImportItemSource, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -6982,6 +7917,35 @@ func awsRestjson1_serializeDocumentVcfOptions(v *types.VcfOptions, value smithyj return nil } +func awsRestjson1_serializeDocumentVersionList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentVersionOptions(v types.VersionOptions, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.VersionOptionsMemberTsvVersionOptions: + av := object.Key("tsvVersionOptions") + if err := awsRestjson1_serializeDocumentTsvVersionOptions(&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 awsRestjson1_serializeDocumentWorkflowParameter(v *types.WorkflowParameter, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/omics/types/enums.go b/service/omics/types/enums.go index b26f13d1f9b..642749d8ac9 100644 --- a/service/omics/types/enums.go +++ b/service/omics/types/enums.go @@ -474,6 +474,26 @@ func (ReferenceStatus) Values() []ReferenceStatus { } } +type ResourceOwner string + +// Enum values for ResourceOwner +const ( + // The resource owner is the calling account + ResourceOwnerSelf ResourceOwner = "SELF" + // The resource owner is an account other than the caller + ResourceOwnerOther ResourceOwner = "OTHER" +) + +// Values returns all known values for ResourceOwner. 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 (ResourceOwner) Values() []ResourceOwner { + return []ResourceOwner{ + "SELF", + "OTHER", + } +} + type RunExport string // Enum values for RunExport @@ -574,6 +594,38 @@ func (SchemaValueType) Values() []SchemaValueType { } } +type ShareStatus string + +// Enum values for ShareStatus +const ( + // The share has been created but is not yet active + ShareStatusPending ShareStatus = "PENDING" + // The share is activated + ShareStatusActivating ShareStatus = "ACTIVATING" + // The share is active and can be used + ShareStatusActive ShareStatus = "ACTIVE" + // The share is being deleted + ShareStatusDeleting ShareStatus = "DELETING" + // The share has been deleted + ShareStatusDeleted ShareStatus = "DELETED" + // The share has failed to activate or delete + ShareStatusFailed ShareStatus = "FAILED" +) + +// Values returns all known values for ShareStatus. 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 (ShareStatus) Values() []ShareStatus { + return []ShareStatus{ + "PENDING", + "ACTIVATING", + "ACTIVE", + "DELETING", + "DELETED", + "FAILED", + } +} + type StoreFormat string // Enum values for StoreFormat @@ -654,6 +706,35 @@ func (TaskStatus) Values() []TaskStatus { } } +type VersionStatus string + +// Enum values for VersionStatus +const ( + // The Version is being created + VersionStatusCreating VersionStatus = "CREATING" + // The Version is updating + VersionStatusUpdating VersionStatus = "UPDATING" + // The Version is deleting + VersionStatusDeleting VersionStatus = "DELETING" + // The Version is active + VersionStatusActive VersionStatus = "ACTIVE" + // The Version creation failed + VersionStatusFailed VersionStatus = "FAILED" +) + +// Values returns all known values for VersionStatus. 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 (VersionStatus) Values() []VersionStatus { + return []VersionStatus{ + "CREATING", + "UPDATING", + "DELETING", + "ACTIVE", + "FAILED", + } +} + type WorkflowEngine string // Enum values for WorkflowEngine diff --git a/service/omics/types/types.go b/service/omics/types/types.go index 0163e7355fb..49d27167749 100644 --- a/service/omics/types/types.go +++ b/service/omics/types/types.go @@ -130,6 +130,11 @@ type AnnotationImportJobItem struct { // This member is required. UpdateTime *time.Time + // The name of the annotation store version. + // + // This member is required. + VersionName *string + // The annotation schema generated by the parsed annotation data. AnnotationFields map[string]string @@ -208,6 +213,67 @@ type AnnotationStoreItem struct { noSmithyDocumentSerde } +// Annotation store versions. +type AnnotationStoreVersionItem struct { + + // The time stamp for when an annotation store version was created. + // + // This member is required. + CreationTime *time.Time + + // The description of an annotation store version. + // + // This member is required. + Description *string + + // The annotation store version ID. + // + // This member is required. + Id *string + + // A name given to an annotation store version to distinguish it from others. + // + // This member is required. + Name *string + + // The status of an annotation store version. + // + // This member is required. + Status VersionStatus + + // The status of an annotation store version. + // + // This member is required. + StatusMessage *string + + // The store ID for an annotation store version. + // + // This member is required. + StoreId *string + + // The time stamp for when an annotation store version was updated. + // + // This member is required. + UpdateTime *time.Time + + // The Arn for an annotation store version. + // + // This member is required. + VersionArn *string + + // The name of an annotation store version. + // + // This member is required. + VersionName *string + + // The size of an annotation store version in Bytes. + // + // This member is required. + VersionSizeBytes *int64 + + noSmithyDocumentSerde +} + // Part of the response to the CompleteReadSetUpload API, including metadata. type CompleteReadSetUploadPartListItem struct { @@ -324,6 +390,19 @@ type FileInformation struct { noSmithyDocumentSerde } +// Use filters to focus the returned annotation store versions on a specific +// parameter, such as the status of the annotation store. +type Filter struct { + + // The Amazon Resource Number (Arn) for an analytics store. + ResourceArns []string + + // The status of an annotation store version. + Status []ShareStatus + + noSmithyDocumentSerde +} + // Formatting options for a file. // // The following types satisfy this interface: @@ -546,6 +625,16 @@ type ListAnnotationStoresFilter struct { noSmithyDocumentSerde } +// Use filters to focus the returned annotation store versions on a specific +// parameter, such as the status of the annotation store. +type ListAnnotationStoreVersionsFilter struct { + + // The status of an annotation store version. + Status VersionStatus + + noSmithyDocumentSerde +} + // A filter for variant import jobs. type ListVariantImportJobsFilter struct { @@ -1103,6 +1192,41 @@ type SequenceStoreFilter struct { noSmithyDocumentSerde } +// The details of a share. +type ShareDetails struct { + + // The timestamp for when the share was created. + CreationTime *time.Time + + // The account ID for the data owner. The owner creates the share offer. + OwnerId *string + + // The principal subscriber is the account the analytics store data is being + // shared with. + PrincipalSubscriber *string + + // The resource Arn of the analytics store being shared. + ResourceArn *string + + // The ID for a share offer for an analytics store . + ShareId *string + + // The name of the share. + ShareName *string + + // The status of a share. + Status ShareStatus + + // The status message for a share. It provides more details on the status of the + // share. + StatusMessage *string + + // The timestamp of the share update. + UpdateTime *time.Time + + noSmithyDocumentSerde +} + // Source files for a sequence. type SourceFiles struct { @@ -1285,6 +1409,21 @@ type TsvStoreOptions struct { noSmithyDocumentSerde } +// The options for a TSV file. +type TsvVersionOptions struct { + + // The store version's annotation type. + AnnotationType AnnotationType + + // The annotation store version's header key to column name mapping. + FormatToHeader map[string]string + + // The TSV schema for an annotation store version. + Schema []map[string]SchemaValueType + + noSmithyDocumentSerde +} + // Details about an imported variant item. type VariantImportItemDetail struct { @@ -1433,6 +1572,40 @@ type VcfOptions struct { noSmithyDocumentSerde } +// The error preventing deletion of the annotation store version. +type VersionDeleteError struct { + + // The message explaining the error in annotation store deletion. + // + // This member is required. + Message *string + + // The name given to an annotation store version. + // + // This member is required. + VersionName *string + + noSmithyDocumentSerde +} + +// The options for an annotation store version. +// +// The following types satisfy this interface: +// +// VersionOptionsMemberTsvVersionOptions +type VersionOptions interface { + isVersionOptions() +} + +// File settings for a version of a TSV store. +type VersionOptionsMemberTsvVersionOptions struct { + Value TsvVersionOptions + + noSmithyDocumentSerde +} + +func (*VersionOptionsMemberTsvVersionOptions) isVersionOptions() {} + // A workflow. type WorkflowListItem struct { @@ -1487,6 +1660,7 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isFormatOptions() {} -func (*UnknownUnionMember) isReferenceItem() {} -func (*UnknownUnionMember) isStoreOptions() {} +func (*UnknownUnionMember) isFormatOptions() {} +func (*UnknownUnionMember) isReferenceItem() {} +func (*UnknownUnionMember) isStoreOptions() {} +func (*UnknownUnionMember) isVersionOptions() {} diff --git a/service/omics/types/types_exported_test.go b/service/omics/types/types_exported_test.go index 10088636eae..20a345d13d9 100644 --- a/service/omics/types/types_exported_test.go +++ b/service/omics/types/types_exported_test.go @@ -64,3 +64,21 @@ func ExampleStoreOptions_outputUsage() { } var _ *types.TsvStoreOptions + +func ExampleVersionOptions_outputUsage() { + var union types.VersionOptions + // type switches can be used to check the union value + switch v := union.(type) { + case *types.VersionOptionsMemberTsvVersionOptions: + _ = v.Value // Value is types.TsvVersionOptions + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *types.TsvVersionOptions diff --git a/service/omics/validators.go b/service/omics/validators.go index 2e737075e16..81c140330ec 100644 --- a/service/omics/validators.go +++ b/service/omics/validators.go @@ -30,6 +30,26 @@ func (m *validateOpAbortMultipartReadSetUpload) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpAcceptShare struct { +} + +func (*validateOpAcceptShare) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcceptShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcceptShareInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcceptShareInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpBatchDeleteReadSet struct { } @@ -150,6 +170,26 @@ func (m *validateOpCreateAnnotationStore) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpCreateAnnotationStoreVersion struct { +} + +func (*validateOpCreateAnnotationStoreVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAnnotationStoreVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAnnotationStoreVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAnnotationStoreVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateMultipartReadSetUpload struct { } @@ -230,6 +270,26 @@ func (m *validateOpCreateSequenceStore) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpCreateShare struct { +} + +func (*validateOpCreateShare) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateShareInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateShareInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateVariantStore struct { } @@ -290,6 +350,26 @@ func (m *validateOpDeleteAnnotationStore) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteAnnotationStoreVersions struct { +} + +func (*validateOpDeleteAnnotationStoreVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAnnotationStoreVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAnnotationStoreVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAnnotationStoreVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteReference struct { } @@ -390,6 +470,26 @@ func (m *validateOpDeleteSequenceStore) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteShare struct { +} + +func (*validateOpDeleteShare) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteShareInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteShareInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteVariantStore struct { } @@ -470,6 +570,26 @@ func (m *validateOpGetAnnotationStore) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpGetAnnotationStoreVersion struct { +} + +func (*validateOpGetAnnotationStoreVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetAnnotationStoreVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetAnnotationStoreVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetAnnotationStoreVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetReadSetActivationJob struct { } @@ -730,6 +850,26 @@ func (m *validateOpGetSequenceStore) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpGetShare struct { +} + +func (*validateOpGetShare) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetShare) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetShareInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetShareInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetVariantImportJob struct { } @@ -790,6 +930,26 @@ func (m *validateOpGetWorkflow) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpListAnnotationStoreVersions struct { +} + +func (*validateOpListAnnotationStoreVersions) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListAnnotationStoreVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListAnnotationStoreVersionsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListAnnotationStoreVersionsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListMultipartReadSetUploads struct { } @@ -970,6 +1130,26 @@ func (m *validateOpListRunTasks) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpListShares struct { +} + +func (*validateOpListShares) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListShares) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListSharesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListSharesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -1190,6 +1370,26 @@ func (m *validateOpUpdateAnnotationStore) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpUpdateAnnotationStoreVersion struct { +} + +func (*validateOpUpdateAnnotationStoreVersion) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateAnnotationStoreVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateAnnotationStoreVersionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateAnnotationStoreVersionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateRunGroup struct { } @@ -1274,6 +1474,10 @@ func addOpAbortMultipartReadSetUploadValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpAbortMultipartReadSetUpload{}, middleware.After) } +func addOpAcceptShareValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcceptShare{}, middleware.After) +} + func addOpBatchDeleteReadSetValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchDeleteReadSet{}, middleware.After) } @@ -1298,6 +1502,10 @@ func addOpCreateAnnotationStoreValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpCreateAnnotationStore{}, middleware.After) } +func addOpCreateAnnotationStoreVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAnnotationStoreVersion{}, middleware.After) +} + func addOpCreateMultipartReadSetUploadValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateMultipartReadSetUpload{}, middleware.After) } @@ -1314,6 +1522,10 @@ func addOpCreateSequenceStoreValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpCreateSequenceStore{}, middleware.After) } +func addOpCreateShareValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateShare{}, middleware.After) +} + func addOpCreateVariantStoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateVariantStore{}, middleware.After) } @@ -1326,6 +1538,10 @@ func addOpDeleteAnnotationStoreValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpDeleteAnnotationStore{}, middleware.After) } +func addOpDeleteAnnotationStoreVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAnnotationStoreVersions{}, middleware.After) +} + func addOpDeleteReferenceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteReference{}, middleware.After) } @@ -1346,6 +1562,10 @@ func addOpDeleteSequenceStoreValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteSequenceStore{}, middleware.After) } +func addOpDeleteShareValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteShare{}, middleware.After) +} + func addOpDeleteVariantStoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteVariantStore{}, middleware.After) } @@ -1362,6 +1582,10 @@ func addOpGetAnnotationStoreValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetAnnotationStore{}, middleware.After) } +func addOpGetAnnotationStoreVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAnnotationStoreVersion{}, middleware.After) +} + func addOpGetReadSetActivationJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetReadSetActivationJob{}, middleware.After) } @@ -1414,6 +1638,10 @@ func addOpGetSequenceStoreValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSequenceStore{}, middleware.After) } +func addOpGetShareValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetShare{}, middleware.After) +} + func addOpGetVariantImportJobValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetVariantImportJob{}, middleware.After) } @@ -1426,6 +1654,10 @@ func addOpGetWorkflowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetWorkflow{}, middleware.After) } +func addOpListAnnotationStoreVersionsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListAnnotationStoreVersions{}, middleware.After) +} + func addOpListMultipartReadSetUploadsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListMultipartReadSetUploads{}, middleware.After) } @@ -1462,6 +1694,10 @@ func addOpListRunTasksValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListRunTasks{}, middleware.After) } +func addOpListSharesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListShares{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -1506,6 +1742,10 @@ func addOpUpdateAnnotationStoreValidationMiddleware(stack *middleware.Stack) err return stack.Initialize.Add(&validateOpUpdateAnnotationStore{}, middleware.After) } +func addOpUpdateAnnotationStoreVersionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAnnotationStoreVersion{}, middleware.After) +} + func addOpUpdateRunGroupValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateRunGroup{}, middleware.After) } @@ -1819,6 +2059,21 @@ func validateOpAbortMultipartReadSetUploadInput(v *AbortMultipartReadSetUploadIn } } +func validateOpAcceptShareInput(v *AcceptShareInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptShareInput"} + if v.ShareId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ShareId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchDeleteReadSetInput(v *BatchDeleteReadSetInput) error { if v == nil { return nil @@ -1927,6 +2182,24 @@ func validateOpCreateAnnotationStoreInput(v *CreateAnnotationStoreInput) error { } } +func validateOpCreateAnnotationStoreVersionInput(v *CreateAnnotationStoreVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAnnotationStoreVersionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.VersionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateMultipartReadSetUploadInput(v *CreateMultipartReadSetUploadInput) error { if v == nil { return nil @@ -2012,6 +2285,24 @@ func validateOpCreateSequenceStoreInput(v *CreateSequenceStoreInput) error { } } +func validateOpCreateShareInput(v *CreateShareInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateShareInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.PrincipalSubscriber == nil { + invalidParams.Add(smithy.NewErrParamRequired("PrincipalSubscriber")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateVariantStoreInput(v *CreateVariantStoreInput) error { if v == nil { return nil @@ -2062,6 +2353,24 @@ func validateOpDeleteAnnotationStoreInput(v *DeleteAnnotationStoreInput) error { } } +func validateOpDeleteAnnotationStoreVersionsInput(v *DeleteAnnotationStoreVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAnnotationStoreVersionsInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Versions == nil { + invalidParams.Add(smithy.NewErrParamRequired("Versions")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteReferenceInput(v *DeleteReferenceInput) error { if v == nil { return nil @@ -2140,6 +2449,21 @@ func validateOpDeleteSequenceStoreInput(v *DeleteSequenceStoreInput) error { } } +func validateOpDeleteShareInput(v *DeleteShareInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteShareInput"} + if v.ShareId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ShareId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteVariantStoreInput(v *DeleteVariantStoreInput) error { if v == nil { return nil @@ -2200,6 +2524,24 @@ func validateOpGetAnnotationStoreInput(v *GetAnnotationStoreInput) error { } } +func validateOpGetAnnotationStoreVersionInput(v *GetAnnotationStoreVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetAnnotationStoreVersionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.VersionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetReadSetActivationJobInput(v *GetReadSetActivationJobInput) error { if v == nil { return nil @@ -2428,6 +2770,21 @@ func validateOpGetSequenceStoreInput(v *GetSequenceStoreInput) error { } } +func validateOpGetShareInput(v *GetShareInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetShareInput"} + if v.ShareId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ShareId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetVariantImportJobInput(v *GetVariantImportJobInput) error { if v == nil { return nil @@ -2473,6 +2830,21 @@ func validateOpGetWorkflowInput(v *GetWorkflowInput) error { } } +func validateOpListAnnotationStoreVersionsInput(v *ListAnnotationStoreVersionsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListAnnotationStoreVersionsInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListMultipartReadSetUploadsInput(v *ListMultipartReadSetUploadsInput) error { if v == nil { return nil @@ -2614,6 +2986,21 @@ func validateOpListRunTasksInput(v *ListRunTasksInput) error { } } +func validateOpListSharesInput(v *ListSharesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListSharesInput"} + if len(v.ResourceOwner) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceOwner")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -2848,6 +3235,24 @@ func validateOpUpdateAnnotationStoreInput(v *UpdateAnnotationStoreInput) error { } } +func validateOpUpdateAnnotationStoreVersionInput(v *UpdateAnnotationStoreVersionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateAnnotationStoreVersionInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.VersionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("VersionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateRunGroupInput(v *UpdateRunGroupInput) error { if v == nil { return nil diff --git a/service/schemas/internal/endpoints/endpoints.go b/service/schemas/internal/endpoints/endpoints.go index e0488f969b7..adf65a64431 100644 --- a/service/schemas/internal/endpoints/endpoints.go +++ b/service/schemas/internal/endpoints/endpoints.go @@ -139,6 +139,9 @@ var defaultPartitions = endpoints.Partitions{ RegionRegex: partitionRegexp.Aws, IsRegionalized: true, Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "af-south-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-east-1", }: endpoints.Endpoint{}, @@ -148,6 +151,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, @@ -157,15 +163,27 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, @@ -175,6 +193,12 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "sa-east-1", }: endpoints.Endpoint{}, @@ -226,6 +250,14 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "cn-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso", diff --git a/service/transfer/api_op_StartFileTransfer.go b/service/transfer/api_op_StartFileTransfer.go index 56b596a4806..79a1ffac3b9 100644 --- a/service/transfer/api_op_StartFileTransfer.go +++ b/service/transfer/api_op_StartFileTransfer.go @@ -66,9 +66,9 @@ type StartFileTransferInput struct { // a source file path for one inbound file transfer. RetrieveFilePaths []string - // One or more source paths for the Transfer Family server. Each string represents - // a source file path for one outbound file transfer. For example, - // DOC-EXAMPLE-BUCKET/myfile.txt . Replace DOC-EXAMPLE-BUCKET with one of your + // One or more source paths for the Amazon S3 storage. Each string represents a + // source file path for one outbound file transfer. For example, + // DOC-EXAMPLE-BUCKET/myfile.txt . Replace DOC-EXAMPLE-BUCKET with one of your // actual buckets. SendFilePaths []string diff --git a/service/transfer/types/types.go b/service/transfer/types/types.go index a95aa145c97..6be20e48e0f 100644 --- a/service/transfer/types/types.go +++ b/service/transfer/types/types.go @@ -1547,8 +1547,9 @@ type SftpConnectorConfig struct { // key you generated. TrustedHostKeys []string - // The identifiers for the secrets (in Amazon Web Services Secrets Manager) that - // contain the SFTP user's private keys or passwords. + // The identifier for the secret (in Amazon Web Services Secrets Manager) that + // contains the SFTP user's private key, password, or both. The identifier can be + // either the Amazon Resource Name (ARN) or the name of the secret. UserSecretId *string noSmithyDocumentSerde diff --git a/service/vpclattice/internal/endpoints/endpoints.go b/service/vpclattice/internal/endpoints/endpoints.go index a1cae4b533b..79d14947830 100644 --- a/service/vpclattice/internal/endpoints/endpoints.go +++ b/service/vpclattice/internal/endpoints/endpoints.go @@ -151,9 +151,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{},