diff --git a/.changelog/ab583ce3ee524f08bd65a6cff97abd14.json b/.changelog/ab583ce3ee524f08bd65a6cff97abd14.json new file mode 100644 index 00000000000..031b3d86dc7 --- /dev/null +++ b/.changelog/ab583ce3ee524f08bd65a6cff97abd14.json @@ -0,0 +1,401 @@ +{ + "id": "ab583ce3-ee52-4f08-bd65-a6cff97abd14", + "type": "feature", + "collapse": true, + "description": "Support list-of-string endpoint parameter.", + "modules": [ + "internal/protocoltest/awsrestjson", + "internal/protocoltest/ec2query", + "internal/protocoltest/jsonrpc", + "internal/protocoltest/jsonrpc10", + "internal/protocoltest/query", + "internal/protocoltest/restxml", + "internal/protocoltest/restxmlwithnamespace", + "internal/protocoltest/smithyrpcv2cbor", + "service/accessanalyzer", + "service/account", + "service/acm", + "service/acmpca", + "service/amp", + "service/amplify", + "service/amplifybackend", + "service/amplifyuibuilder", + "service/apigateway", + "service/apigatewaymanagementapi", + "service/apigatewayv2", + "service/appconfig", + "service/appconfigdata", + "service/appfabric", + "service/appflow", + "service/appintegrations", + "service/applicationautoscaling", + "service/applicationcostprofiler", + "service/applicationdiscoveryservice", + "service/applicationinsights", + "service/applicationsignals", + "service/appmesh", + "service/apprunner", + "service/appstream", + "service/appsync", + "service/apptest", + "service/arczonalshift", + "service/artifact", + "service/athena", + "service/auditmanager", + "service/autoscaling", + "service/autoscalingplans", + "service/b2bi", + "service/backup", + "service/backupgateway", + "service/batch", + "service/bcmdataexports", + "service/bedrock", + "service/bedrockagent", + "service/bedrockagentruntime", + "service/bedrockruntime", + "service/billingconductor", + "service/braket", + "service/budgets", + "service/chatbot", + "service/chime", + "service/chimesdkidentity", + "service/chimesdkmediapipelines", + "service/chimesdkmeetings", + "service/chimesdkmessaging", + "service/chimesdkvoice", + "service/cleanrooms", + "service/cleanroomsml", + "service/cloud9", + "service/cloudcontrol", + "service/clouddirectory", + "service/cloudformation", + "service/cloudfront", + "service/cloudfrontkeyvaluestore", + "service/cloudhsm", + "service/cloudhsmv2", + "service/cloudsearch", + "service/cloudsearchdomain", + "service/cloudtrail", + "service/cloudtraildata", + "service/cloudwatch", + "service/cloudwatchevents", + "service/cloudwatchlogs", + "service/codeartifact", + "service/codebuild", + "service/codecatalyst", + "service/codecommit", + "service/codeconnections", + "service/codedeploy", + "service/codeguruprofiler", + "service/codegurureviewer", + "service/codegurusecurity", + "service/codepipeline", + "service/codestar", + "service/codestarconnections", + "service/codestarnotifications", + "service/cognitoidentity", + "service/cognitoidentityprovider", + "service/cognitosync", + "service/comprehend", + "service/comprehendmedical", + "service/computeoptimizer", + "service/configservice", + "service/connect", + "service/connectcampaigns", + "service/connectcases", + "service/connectcontactlens", + "service/connectparticipant", + "service/controlcatalog", + "service/controltower", + "service/costandusagereportservice", + "service/costexplorer", + "service/costoptimizationhub", + "service/customerprofiles", + "service/databasemigrationservice", + "service/databrew", + "service/dataexchange", + "service/datapipeline", + "service/datasync", + "service/datazone", + "service/dax", + "service/deadline", + "service/detective", + "service/devicefarm", + "service/devopsguru", + "service/directconnect", + "service/directoryservice", + "service/dlm", + "service/docdb", + "service/docdbelastic", + "service/drs", + "service/dynamodb", + "service/dynamodbstreams", + "service/ebs", + "service/ec2", + "service/ec2instanceconnect", + "service/ecr", + "service/ecrpublic", + "service/ecs", + "service/efs", + "service/eks", + "service/eksauth", + "service/elasticache", + "service/elasticbeanstalk", + "service/elasticinference", + "service/elasticloadbalancing", + "service/elasticloadbalancingv2", + "service/elasticsearchservice", + "service/elastictranscoder", + "service/emr", + "service/emrcontainers", + "service/emrserverless", + "service/entityresolution", + "service/eventbridge", + "service/evidently", + "service/finspace", + "service/finspacedata", + "service/firehose", + "service/fis", + "service/fms", + "service/forecast", + "service/forecastquery", + "service/frauddetector", + "service/freetier", + "service/fsx", + "service/gamelift", + "service/glacier", + "service/globalaccelerator", + "service/glue", + "service/grafana", + "service/greengrass", + "service/greengrassv2", + "service/groundstation", + "service/guardduty", + "service/health", + "service/healthlake", + "service/iam", + "service/identitystore", + "service/imagebuilder", + "service/inspector", + "service/inspector2", + "service/inspectorscan", + "service/internal/integrationtest", + "service/internetmonitor", + "service/iot", + "service/iot1clickdevicesservice", + "service/iot1clickprojects", + "service/iotanalytics", + "service/iotdataplane", + "service/iotdeviceadvisor", + "service/iotevents", + "service/ioteventsdata", + "service/iotfleethub", + "service/iotfleetwise", + "service/iotjobsdataplane", + "service/iotsecuretunneling", + "service/iotsitewise", + "service/iotthingsgraph", + "service/iottwinmaker", + "service/iotwireless", + "service/ivs", + "service/ivschat", + "service/ivsrealtime", + "service/kafka", + "service/kafkaconnect", + "service/kendra", + "service/kendraranking", + "service/keyspaces", + "service/kinesis", + "service/kinesisanalytics", + "service/kinesisanalyticsv2", + "service/kinesisvideo", + "service/kinesisvideoarchivedmedia", + "service/kinesisvideomedia", + "service/kinesisvideosignaling", + "service/kinesisvideowebrtcstorage", + "service/kms", + "service/lakeformation", + "service/lambda", + "service/launchwizard", + "service/lexmodelbuildingservice", + "service/lexmodelsv2", + "service/lexruntimeservice", + "service/lexruntimev2", + "service/licensemanager", + "service/licensemanagerlinuxsubscriptions", + "service/licensemanagerusersubscriptions", + "service/lightsail", + "service/location", + "service/lookoutequipment", + "service/lookoutmetrics", + "service/lookoutvision", + "service/m2", + "service/machinelearning", + "service/macie2", + "service/mailmanager", + "service/managedblockchain", + "service/managedblockchainquery", + "service/marketplaceagreement", + "service/marketplacecatalog", + "service/marketplacecommerceanalytics", + "service/marketplacedeployment", + "service/marketplaceentitlementservice", + "service/marketplacemetering", + "service/mediaconnect", + "service/mediaconvert", + "service/medialive", + "service/mediapackage", + "service/mediapackagev2", + "service/mediapackagevod", + "service/mediastore", + "service/mediastoredata", + "service/mediatailor", + "service/medicalimaging", + "service/memorydb", + "service/mgn", + "service/migrationhub", + "service/migrationhubconfig", + "service/migrationhuborchestrator", + "service/migrationhubrefactorspaces", + "service/migrationhubstrategy", + "service/mobile", + "service/mq", + "service/mturk", + "service/mwaa", + "service/neptune", + "service/neptunedata", + "service/neptunegraph", + "service/networkfirewall", + "service/networkmanager", + "service/networkmonitor", + "service/nimble", + "service/oam", + "service/omics", + "service/opensearch", + "service/opensearchserverless", + "service/opsworks", + "service/opsworkscm", + "service/organizations", + "service/osis", + "service/outposts", + "service/panorama", + "service/paymentcryptography", + "service/paymentcryptographydata", + "service/pcaconnectorad", + "service/pcaconnectorscep", + "service/personalize", + "service/personalizeevents", + "service/personalizeruntime", + "service/pi", + "service/pinpoint", + "service/pinpointemail", + "service/pinpointsmsvoice", + "service/pinpointsmsvoicev2", + "service/pipes", + "service/polly", + "service/pricing", + "service/privatenetworks", + "service/proton", + "service/qbusiness", + "service/qconnect", + "service/qldb", + "service/qldbsession", + "service/quicksight", + "service/ram", + "service/rbin", + "service/rds", + "service/rdsdata", + "service/redshift", + "service/redshiftdata", + "service/redshiftserverless", + "service/rekognition", + "service/repostspace", + "service/resiliencehub", + "service/resourceexplorer2", + "service/resourcegroups", + "service/resourcegroupstaggingapi", + "service/robomaker", + "service/rolesanywhere", + "service/route53", + "service/route53domains", + "service/route53profiles", + "service/route53recoverycluster", + "service/route53recoverycontrolconfig", + "service/route53recoveryreadiness", + "service/route53resolver", + "service/rum", + "service/s3", + "service/s3control", + "service/s3outposts", + "service/sagemaker", + "service/sagemakera2iruntime", + "service/sagemakeredge", + "service/sagemakerfeaturestoreruntime", + "service/sagemakergeospatial", + "service/sagemakermetrics", + "service/sagemakerruntime", + "service/savingsplans", + "service/scheduler", + "service/schemas", + "service/secretsmanager", + "service/securityhub", + "service/securitylake", + "service/serverlessapplicationrepository", + "service/servicecatalog", + "service/servicecatalogappregistry", + "service/servicediscovery", + "service/servicequotas", + "service/ses", + "service/sesv2", + "service/sfn", + "service/shield", + "service/signer", + "service/simspaceweaver", + "service/sms", + "service/snowball", + "service/snowdevicemanagement", + "service/sns", + "service/sqs", + "service/ssm", + "service/ssmcontacts", + "service/ssmincidents", + "service/ssmsap", + "service/sso", + "service/ssoadmin", + "service/ssooidc", + "service/storagegateway", + "service/sts", + "service/supplychain", + "service/support", + "service/supportapp", + "service/swf", + "service/synthetics", + "service/taxsettings", + "service/textract", + "service/timestreaminfluxdb", + "service/timestreamquery", + "service/timestreamwrite", + "service/tnb", + "service/transcribe", + "service/transcribestreaming", + "service/transfer", + "service/translate", + "service/trustedadvisor", + "service/verifiedpermissions", + "service/voiceid", + "service/vpclattice", + "service/waf", + "service/wafregional", + "service/wafv2", + "service/wellarchitected", + "service/wisdom", + "service/workdocs", + "service/worklink", + "service/workmail", + "service/workmailmessageflow", + "service/workspaces", + "service/workspacesthinclient", + "service/workspacesweb", + "service/xray" + ] +} \ No newline at end of file diff --git a/codegen/gradle.properties b/codegen/gradle.properties index d4081d1c3e9..8292229afef 100644 --- a/codegen/gradle.properties +++ b/codegen/gradle.properties @@ -1,2 +1,2 @@ -smithyVersion=1.49.0 +smithyVersion=1.50.0 smithyGradleVersion=0.7.0 diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java index ba9be723aac..e489e07f492 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java @@ -125,6 +125,18 @@ public static void generateHttpProtocolTests(GenerationContext context) { .addTestName("RestXmlHttpPayloadWithUnsetUnion") .build(), + // REST-JSON default value serialization + HttpProtocolUnitTestGenerator.SkipTest.builder() + .service(ShapeId.from("aws.protocoltests.restjson#RestJson")) + .operation(ShapeId.from("aws.protocoltests.restjson#OperationWithDefaults")) + .addTestName("RestJsonClientPopulatesDefaultValuesInInput") + .addTestName("RestJsonClientUsesExplicitlyProvidedValuesInTopLevel") + .build(), + HttpProtocolUnitTestGenerator.SkipTest.builder() + .service(ShapeId.from("aws.protocoltests.restjson#RestJson")) + .operation(ShapeId.from("aws.protocoltests.restjson#OperationWithNestedStructure")) + .addTestName("RestJsonClientPopulatesNestedDefaultValuesWhenMissing") + .build(), HttpProtocolUnitTestGenerator.SkipTest.builder() .service(ShapeId.from("aws.protocoltests.json10#JsonRpc10")) @@ -149,6 +161,11 @@ public static void generateHttpProtocolTests(GenerationContext context) { .addTestName("RpcV2CborClientPopulatesDefaultsValuesWhenMissingInResponse") .addTestName("RpcV2CborClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse") .build(), + HttpProtocolUnitTestGenerator.SkipTest.builder() + .service(ShapeId.from("smithy.protocoltests.rpcv2Cbor#RpcV2Protocol")) + .operation(ShapeId.from("smithy.protocoltests.rpcv2Cbor#RpcV2CborDenseMaps")) + .addTestName("RpcV2CborDeserializesDenseSetMapAndSkipsNull") + .build(), // REST-JSON optional (SHOULD) test cases HttpProtocolUnitTestGenerator.SkipTest.builder() @@ -157,6 +174,18 @@ public static void generateHttpProtocolTests(GenerationContext context) { .addTestName("RestJsonDeserializesDenseSetMapAndSkipsNull") .build(), + // REST-JSON default value deserialization + HttpProtocolUnitTestGenerator.SkipTest.builder() + .service(ShapeId.from("aws.protocoltests.restjson#RestJson")) + .operation(ShapeId.from("aws.protocoltests.restjson#OperationWithDefaults")) + .addTestName("RestJsonClientPopulatesDefaultsValuesWhenMissingInResponse") + .build(), + HttpProtocolUnitTestGenerator.SkipTest.builder() + .service(ShapeId.from("aws.protocoltests.restjson#RestJson")) + .operation(ShapeId.from("aws.protocoltests.restjson#OperationWithNestedStructure")) + .addTestName("RestJsonClientPopulatesNestedDefaultsWhenMissingInResponseBody") + .build(), + // REST-XML opinionated test - prefix headers as empty vs nil map HttpProtocolUnitTestGenerator.SkipTest.builder() .service(ShapeId.from("aws.protocoltests.restxml#RestXml")) diff --git a/internal/protocoltest/awsrestjson/api_op_ContentTypeParameters.go b/internal/protocoltest/awsrestjson/api_op_ContentTypeParameters.go new file mode 100644 index 00000000000..49fa2a7a205 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_ContentTypeParameters.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The example tests how servers must support requests containing a Content-Type +// header with parameters. +func (c *Client) ContentTypeParameters(ctx context.Context, params *ContentTypeParametersInput, optFns ...func(*Options)) (*ContentTypeParametersOutput, error) { + if params == nil { + params = &ContentTypeParametersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ContentTypeParameters", params, optFns, c.addOperationContentTypeParametersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ContentTypeParametersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ContentTypeParametersInput struct { + Value *int32 + + noSmithyDocumentSerde +} + +type ContentTypeParametersOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationContentTypeParametersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ContentTypeParameters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opContentTypeParameters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opContentTypeParameters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ContentTypeParameters", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_ContentTypeParameters_test.go b/internal/protocoltest/awsrestjson/api_op_ContentTypeParameters_test.go new file mode 100644 index 00000000000..1b0e584c3c4 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_ContentTypeParameters_test.go @@ -0,0 +1,96 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" + "github.com/aws/smithy-go/middleware" + smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "net/http" + "net/url" + "testing" +) + +func TestClient_ContentTypeParameters_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *ContentTypeParametersInput + ExpectMethod string + ExpectURIPath string + ExpectQuery []smithytesting.QueryItem + RequireQuery []string + ForbidQuery []string + ExpectHeader http.Header + RequireHeader []string + ForbidHeader []string + Host *url.URL + BodyMediaType string + BodyAssert func(io.Reader) error + }{} + for name, c := range cases { + t.Run(name, func(t *testing.T) { + actualReq := &http.Request{} + serverURL := "http://localhost:8888/" + if c.Host != nil { + u, err := url.Parse(serverURL) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + u.Path = c.Host.Path + u.RawPath = c.Host.RawPath + u.RawQuery = c.Host.RawQuery + serverURL = u.String() + } + client := New(Options{ + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + HTTPClient: protocoltesthttp.NewClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.ContentTypeParameters(context.Background(), c.Params, func(options *Options) { + options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error { + return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq) + }) + }) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if e, a := c.ExpectMethod, actualReq.Method; e != a { + t.Errorf("expect %v method, got %v", e, a) + } + if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a { + t.Errorf("expect %v path, got %v", e, a) + } + queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery) + smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems) + smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems) + smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems) + smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header) + smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header) + smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header) + if c.BodyAssert != nil { + if err := c.BodyAssert(actualReq.Body); err != nil { + t.Errorf("expect body equal, got %v", err) + } + } + }) + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go b/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go index c70efed2082..a085fa672ae 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go @@ -42,6 +42,9 @@ func TestClient_HttpEnumPayload_awsRestjson1Serialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/EnumPayload", ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"text/plain"}, + }, BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderBytes(actual, []byte(`enumvalue`)) }, @@ -121,7 +124,10 @@ func TestClient_HttpEnumPayload_awsRestjson1Deserialize(t *testing.T) { }{ "RestJsonEnumPayloadResponse": { StatusCode: 200, - Body: []byte(`enumvalue`), + Header: http.Header{ + "Content-Type": []string{"text/plain"}, + }, + Body: []byte(`enumvalue`), ExpectResult: &HttpEnumPayloadOutput{ Payload: types.StringEnum("enumvalue"), }, diff --git a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go index 99876292d16..101b937092c 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go @@ -42,6 +42,13 @@ func TestClient_HttpStringPayload_awsRestjson1Serialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/StringPayload", ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"text/plain"}, + }, + RequireHeader: []string{ + "Content-Length", + }, + BodyMediaType: "text/plain", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderBytes(actual, []byte(`rawstring`)) }, @@ -121,7 +128,11 @@ func TestClient_HttpStringPayload_awsRestjson1Deserialize(t *testing.T) { }{ "RestJsonStringPayloadResponse": { StatusCode: 200, - Body: []byte(`rawstring`), + Header: http.Header{ + "Content-Type": []string{"text/plain"}, + }, + BodyMediaType: "text/plain", + Body: []byte(`rawstring`), ExpectResult: &HttpStringPayloadOutput{ Payload: ptr.String("rawstring"), }, diff --git a/internal/protocoltest/awsrestjson/api_op_OperationWithDefaults.go b/internal/protocoltest/awsrestjson/api_op_OperationWithDefaults.go new file mode 100644 index 00000000000..2cb2a9f5893 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_OperationWithDefaults.go @@ -0,0 +1,194 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/document" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) OperationWithDefaults(ctx context.Context, params *OperationWithDefaultsInput, optFns ...func(*Options)) (*OperationWithDefaultsOutput, error) { + if params == nil { + params = &OperationWithDefaultsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "OperationWithDefaults", params, optFns, c.addOperationOperationWithDefaultsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*OperationWithDefaultsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type OperationWithDefaultsInput struct { + ClientOptionalDefaults *types.ClientOptionalDefaults + + Defaults *types.Defaults + + OtherTopLevelDefault int32 + + TopLevelDefault *string + + noSmithyDocumentSerde +} + +type OperationWithDefaultsOutput struct { + DefaultBlob []byte + + DefaultBoolean *bool + + DefaultByte *int8 + + DefaultDocumentBoolean document.Interface + + DefaultDocumentList document.Interface + + DefaultDocumentMap document.Interface + + DefaultDocumentString document.Interface + + DefaultDouble *float64 + + DefaultEnum types.TestEnum + + DefaultFloat *float32 + + DefaultIntEnum types.TestIntEnum + + DefaultInteger *int32 + + DefaultList []string + + DefaultLong *int64 + + DefaultMap map[string]string + + DefaultNullDocument document.Interface + + DefaultShort *int16 + + DefaultString *string + + DefaultTimestamp *time.Time + + EmptyBlob []byte + + EmptyString *string + + FalseBoolean bool + + ZeroByte int8 + + ZeroDouble float64 + + ZeroFloat float32 + + ZeroInteger int32 + + ZeroLong int64 + + ZeroShort int16 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationOperationWithDefaultsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpOperationWithDefaults{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpOperationWithDefaults{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "OperationWithDefaults"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOperationWithDefaults(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opOperationWithDefaults(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "OperationWithDefaults", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_OperationWithDefaults_test.go b/internal/protocoltest/awsrestjson/api_op_OperationWithDefaults_test.go new file mode 100644 index 00000000000..ab95fd402ae --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_OperationWithDefaults_test.go @@ -0,0 +1,482 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/document" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" + "github.com/aws/smithy-go/middleware" + smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" + "github.com/aws/smithy-go/ptr" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + smithytime "github.com/aws/smithy-go/time" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "net/http" + "net/url" + "testing" +) + +func TestClient_OperationWithDefaults_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *OperationWithDefaultsInput + ExpectMethod string + ExpectURIPath string + ExpectQuery []smithytesting.QueryItem + RequireQuery []string + ForbidQuery []string + ExpectHeader http.Header + RequireHeader []string + ForbidHeader []string + Host *url.URL + BodyMediaType string + BodyAssert func(io.Reader) error + }{ + // Client populates default values in input. + "RestJsonClientPopulatesDefaultValuesInInput": { + Params: &OperationWithDefaultsInput{ + Defaults: &types.Defaults{}, + }, + ExpectMethod: "POST", + ExpectURIPath: "/OperationWithDefaults", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{ + "defaults": { + "defaultString": "hi", + "defaultBoolean": true, + "defaultList": [], + "defaultDocumentMap": {}, + "defaultDocumentString": "hi", + "defaultDocumentBoolean": true, + "defaultDocumentList": [], + "defaultTimestamp": 0, + "defaultBlob": "YWJj", + "defaultByte": 1, + "defaultShort": 1, + "defaultInteger": 10, + "defaultLong": 100, + "defaultFloat": 1.0, + "defaultDouble": 1.0, + "defaultMap": {}, + "defaultEnum": "FOO", + "defaultIntEnum": 1, + "emptyString": "", + "falseBoolean": false, + "emptyBlob": "", + "zeroByte": 0, + "zeroShort": 0, + "zeroInteger": 0, + "zeroLong": 0, + "zeroFloat": 0.0, + "zeroDouble": 0.0 + } + }`)) + }, + }, + // Client skips top level default values in input. + "RestJsonClientSkipsTopLevelDefaultValuesInInput": { + Params: &OperationWithDefaultsInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/OperationWithDefaults", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{ + }`)) + }, + }, + // Client uses explicitly provided member values over defaults + "RestJsonClientUsesExplicitlyProvidedMemberValuesOverDefaults": { + Params: &OperationWithDefaultsInput{ + Defaults: &types.Defaults{ + DefaultString: ptr.String("bye"), + DefaultBoolean: ptr.Bool(true), + DefaultList: []string{ + "a", + }, + DefaultDocumentMap: document.NewLazyDocument(map[string]interface{}{ + "name": "Jack", + }), + DefaultDocumentString: document.NewLazyDocument("bye"), + DefaultDocumentBoolean: document.NewLazyDocument(true), + DefaultDocumentList: document.NewLazyDocument([]interface{}{ + "b", + }), + DefaultNullDocument: document.NewLazyDocument("notNull"), + DefaultTimestamp: ptr.Time(smithytime.ParseEpochSeconds(1)), + DefaultBlob: []byte("hi"), + DefaultByte: ptr.Int8(2), + DefaultShort: ptr.Int16(2), + DefaultInteger: ptr.Int32(20), + DefaultLong: ptr.Int64(200), + DefaultFloat: ptr.Float32(2.0), + DefaultDouble: ptr.Float64(2.0), + DefaultMap: map[string]string{ + "name": "Jack", + }, + DefaultEnum: types.TestEnum("BAR"), + DefaultIntEnum: 2, + EmptyString: ptr.String("foo"), + FalseBoolean: true, + EmptyBlob: []byte("hi"), + ZeroByte: 1, + ZeroShort: 1, + ZeroInteger: 1, + ZeroLong: 1, + ZeroFloat: 1.0, + ZeroDouble: 1.0, + }, + }, + ExpectMethod: "POST", + ExpectURIPath: "/OperationWithDefaults", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{ + "defaults": { + "defaultString": "bye", + "defaultBoolean": true, + "defaultList": ["a"], + "defaultDocumentMap": {"name": "Jack"}, + "defaultDocumentString": "bye", + "defaultDocumentBoolean": true, + "defaultDocumentList": ["b"], + "defaultNullDocument": "notNull", + "defaultTimestamp": 1, + "defaultBlob": "aGk=", + "defaultByte": 2, + "defaultShort": 2, + "defaultInteger": 20, + "defaultLong": 200, + "defaultFloat": 2.0, + "defaultDouble": 2.0, + "defaultMap": {"name": "Jack"}, + "defaultEnum": "BAR", + "defaultIntEnum": 2, + "emptyString": "foo", + "falseBoolean": true, + "emptyBlob": "aGk=", + "zeroByte": 1, + "zeroShort": 1, + "zeroInteger": 1, + "zeroLong": 1, + "zeroFloat": 1.0, + "zeroDouble": 1.0 + } + }`)) + }, + }, + // Any time a value is provided for a member in the top level of input, it is + // used, regardless of if its the default. + "RestJsonClientUsesExplicitlyProvidedValuesInTopLevel": { + Params: &OperationWithDefaultsInput{ + TopLevelDefault: ptr.String("hi"), + OtherTopLevelDefault: 0, + }, + ExpectMethod: "POST", + ExpectURIPath: "/OperationWithDefaults", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{ + "topLevelDefault": "hi", + "otherTopLevelDefault": 0 + }`)) + }, + }, + // Typically, non top-level members would have defaults filled in, but if they + // have the clientOptional trait, the defaults should be ignored. + "RestJsonClientIgnoresNonTopLevelDefaultsOnMembersWithClientOptional": { + Params: &OperationWithDefaultsInput{ + ClientOptionalDefaults: &types.ClientOptionalDefaults{}, + }, + ExpectMethod: "POST", + ExpectURIPath: "/OperationWithDefaults", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{ + "clientOptionalDefaults": {} + }`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + if name == "RestJsonClientPopulatesDefaultValuesInInput" { + t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#OperationWithDefaults") + } + + if name == "RestJsonClientUsesExplicitlyProvidedValuesInTopLevel" { + t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#OperationWithDefaults") + } + + actualReq := &http.Request{} + serverURL := "http://localhost:8888/" + if c.Host != nil { + u, err := url.Parse(serverURL) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + u.Path = c.Host.Path + u.RawPath = c.Host.RawPath + u.RawQuery = c.Host.RawQuery + serverURL = u.String() + } + client := New(Options{ + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + HTTPClient: protocoltesthttp.NewClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.OperationWithDefaults(context.Background(), c.Params, func(options *Options) { + options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error { + return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq) + }) + }) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if e, a := c.ExpectMethod, actualReq.Method; e != a { + t.Errorf("expect %v method, got %v", e, a) + } + if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a { + t.Errorf("expect %v path, got %v", e, a) + } + queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery) + smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems) + smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems) + smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems) + smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header) + smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header) + smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header) + if c.BodyAssert != nil { + if err := c.BodyAssert(actualReq.Body); err != nil { + t.Errorf("expect body equal, got %v", err) + } + } + }) + } +} + +func TestClient_OperationWithDefaults_awsRestjson1Deserialize(t *testing.T) { + cases := map[string]struct { + StatusCode int + Header http.Header + BodyMediaType string + Body []byte + ExpectResult *OperationWithDefaultsOutput + }{ + // Client populates default values when missing in response. + "RestJsonClientPopulatesDefaultsValuesWhenMissingInResponse": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + Body: []byte(`{}`), + ExpectResult: &OperationWithDefaultsOutput{ + DefaultString: ptr.String("hi"), + DefaultBoolean: ptr.Bool(true), + DefaultList: []string{}, + DefaultDocumentMap: document.NewLazyDocument(map[string]interface{}{}), + DefaultDocumentString: document.NewLazyDocument("hi"), + DefaultDocumentBoolean: document.NewLazyDocument(true), + DefaultDocumentList: document.NewLazyDocument([]interface{}{}), + DefaultTimestamp: ptr.Time(smithytime.ParseEpochSeconds(0)), + DefaultBlob: []byte("abc"), + DefaultByte: ptr.Int8(1), + DefaultShort: ptr.Int16(1), + DefaultInteger: ptr.Int32(10), + DefaultLong: ptr.Int64(100), + DefaultFloat: ptr.Float32(1.0), + DefaultDouble: ptr.Float64(1.0), + DefaultMap: map[string]string{}, + DefaultEnum: types.TestEnum("FOO"), + DefaultIntEnum: 1, + EmptyString: ptr.String(""), + FalseBoolean: false, + EmptyBlob: []byte(""), + ZeroByte: 0, + ZeroShort: 0, + ZeroInteger: 0, + ZeroLong: 0, + ZeroFloat: 0.0, + ZeroDouble: 0.0, + }, + }, + // Client ignores default values if member values are present in the response. + "RestJsonClientIgnoresDefaultValuesIfMemberValuesArePresentInResponse": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + Body: []byte(`{ + "defaultString": "bye", + "defaultBoolean": false, + "defaultList": ["a"], + "defaultDocumentMap": {"name": "Jack"}, + "defaultDocumentString": "bye", + "defaultDocumentBoolean": false, + "defaultDocumentList": ["b"], + "defaultNullDocument": "notNull", + "defaultTimestamp": 2, + "defaultBlob": "aGk=", + "defaultByte": 2, + "defaultShort": 2, + "defaultInteger": 20, + "defaultLong": 200, + "defaultFloat": 2.0, + "defaultDouble": 2.0, + "defaultMap": {"name": "Jack"}, + "defaultEnum": "BAR", + "defaultIntEnum": 2, + "emptyString": "foo", + "falseBoolean": true, + "emptyBlob": "aGk=", + "zeroByte": 1, + "zeroShort": 1, + "zeroInteger": 1, + "zeroLong": 1, + "zeroFloat": 1.0, + "zeroDouble": 1.0 + }`), + ExpectResult: &OperationWithDefaultsOutput{ + DefaultString: ptr.String("bye"), + DefaultBoolean: ptr.Bool(false), + DefaultList: []string{ + "a", + }, + DefaultDocumentMap: document.NewLazyDocument(map[string]interface{}{ + "name": "Jack", + }), + DefaultDocumentString: document.NewLazyDocument("bye"), + DefaultDocumentBoolean: document.NewLazyDocument(false), + DefaultDocumentList: document.NewLazyDocument([]interface{}{ + "b", + }), + DefaultNullDocument: document.NewLazyDocument("notNull"), + DefaultTimestamp: ptr.Time(smithytime.ParseEpochSeconds(1)), + DefaultBlob: []byte("hi"), + DefaultByte: ptr.Int8(2), + DefaultShort: ptr.Int16(2), + DefaultInteger: ptr.Int32(20), + DefaultLong: ptr.Int64(200), + DefaultFloat: ptr.Float32(2.0), + DefaultDouble: ptr.Float64(2.0), + DefaultMap: map[string]string{ + "name": "Jack", + }, + DefaultEnum: types.TestEnum("BAR"), + DefaultIntEnum: 2, + EmptyString: ptr.String("foo"), + FalseBoolean: true, + EmptyBlob: []byte("hi"), + ZeroByte: 1, + ZeroShort: 1, + ZeroInteger: 1, + ZeroLong: 1, + ZeroFloat: 1.0, + ZeroDouble: 1.0, + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + if name == "RestJsonClientPopulatesDefaultsValuesWhenMissingInResponse" { + t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#OperationWithDefaults") + } + + serverURL := "http://localhost:8888/" + client := New(Options{ + HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { + headers := http.Header{} + for k, vs := range c.Header { + for _, v := range vs { + headers.Add(k, v) + } + } + if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 { + headers.Set("Content-Type", c.BodyMediaType) + } + response := &http.Response{ + StatusCode: c.StatusCode, + Header: headers, + Request: r, + } + if len(c.Body) != 0 { + response.ContentLength = int64(len(c.Body)) + response.Body = ioutil.NopCloser(bytes.NewReader(c.Body)) + } else { + + response.Body = http.NoBody + } + return response, nil + }), + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + var params OperationWithDefaultsInput + result, err := client.OperationWithDefaults(context.Background(), ¶ms) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { + t.Errorf("expect c.ExpectResult value match:\n%v", err) + } + }) + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_OperationWithNestedStructure.go b/internal/protocoltest/awsrestjson/api_op_OperationWithNestedStructure.go new file mode 100644 index 00000000000..3a815785dd5 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_OperationWithNestedStructure.go @@ -0,0 +1,143 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) OperationWithNestedStructure(ctx context.Context, params *OperationWithNestedStructureInput, optFns ...func(*Options)) (*OperationWithNestedStructureOutput, error) { + if params == nil { + params = &OperationWithNestedStructureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "OperationWithNestedStructure", params, optFns, c.addOperationOperationWithNestedStructureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*OperationWithNestedStructureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type OperationWithNestedStructureInput struct { + + // This member is required. + TopLevel *types.TopLevel + + noSmithyDocumentSerde +} + +type OperationWithNestedStructureOutput struct { + + // This member is required. + Dialog *types.Dialog + + DialogList []types.Dialog + + DialogMap map[string]types.Dialog + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationOperationWithNestedStructureMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpOperationWithNestedStructure{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpOperationWithNestedStructure{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "OperationWithNestedStructure"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpOperationWithNestedStructureValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opOperationWithNestedStructure(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opOperationWithNestedStructure(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "OperationWithNestedStructure", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_OperationWithNestedStructure_test.go b/internal/protocoltest/awsrestjson/api_op_OperationWithNestedStructure_test.go new file mode 100644 index 00000000000..168ed413534 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_OperationWithNestedStructure_test.go @@ -0,0 +1,349 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" + "github.com/aws/smithy-go/middleware" + smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" + "github.com/aws/smithy-go/ptr" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "net/http" + "net/url" + "testing" +) + +func TestClient_OperationWithNestedStructure_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *OperationWithNestedStructureInput + ExpectMethod string + ExpectURIPath string + ExpectQuery []smithytesting.QueryItem + RequireQuery []string + ForbidQuery []string + ExpectHeader http.Header + RequireHeader []string + ForbidHeader []string + Host *url.URL + BodyMediaType string + BodyAssert func(io.Reader) error + }{ + // Client populates nested default values when missing. + "RestJsonClientPopulatesNestedDefaultValuesWhenMissing": { + Params: &OperationWithNestedStructureInput{ + TopLevel: &types.TopLevel{ + Dialog: &types.Dialog{ + Language: ptr.String("en"), + }, + DialogList: []types.Dialog{ + {}, + { + Farewell: &types.Farewell{}, + }, + { + Language: ptr.String("it"), + Greeting: ptr.String("ciao"), + Farewell: &types.Farewell{ + Phrase: ptr.String("arrivederci"), + }, + }, + }, + DialogMap: map[string]types.Dialog{ + "emptyDialog": {}, + "partialEmptyDialog": { + Language: ptr.String("en"), + Farewell: &types.Farewell{}, + }, + "nonEmptyDialog": { + Greeting: ptr.String("konnichiwa"), + Farewell: &types.Farewell{ + Phrase: ptr.String("sayonara"), + }, + }, + }, + }, + }, + ExpectMethod: "POST", + ExpectURIPath: "/OperationWithNestedStructure", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{ + "topLevel": { + "dialog": { + "language": "en", + "greeting": "hi" + }, + "dialogList": [ + { + "greeting": "hi" + }, + { + "greeting": "hi", + "farewell": { + "phrase": "bye" + } + }, + { + "language": "it", + "greeting": "ciao", + "farewell": { + "phrase": "arrivederci" + } + } + ], + "dialogMap": { + "emptyDialog": { + "greeting": "hi" + }, + "partialEmptyDialog": { + "language": "en", + "greeting": "hi", + "farewell": { + "phrase": "bye" + } + }, + "nonEmptyDialog": { + "greeting": "konnichiwa", + "farewell": { + "phrase": "sayonara" + } + } + } + } + }`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + if name == "RestJsonClientPopulatesNestedDefaultValuesWhenMissing" { + t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#OperationWithNestedStructure") + } + + actualReq := &http.Request{} + serverURL := "http://localhost:8888/" + if c.Host != nil { + u, err := url.Parse(serverURL) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + u.Path = c.Host.Path + u.RawPath = c.Host.RawPath + u.RawQuery = c.Host.RawQuery + serverURL = u.String() + } + client := New(Options{ + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + HTTPClient: protocoltesthttp.NewClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.OperationWithNestedStructure(context.Background(), c.Params, func(options *Options) { + options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error { + return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq) + }) + }) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if e, a := c.ExpectMethod, actualReq.Method; e != a { + t.Errorf("expect %v method, got %v", e, a) + } + if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a { + t.Errorf("expect %v path, got %v", e, a) + } + queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery) + smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems) + smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems) + smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems) + smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header) + smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header) + smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header) + if c.BodyAssert != nil { + if err := c.BodyAssert(actualReq.Body); err != nil { + t.Errorf("expect body equal, got %v", err) + } + } + }) + } +} + +func TestClient_OperationWithNestedStructure_awsRestjson1Deserialize(t *testing.T) { + cases := map[string]struct { + StatusCode int + Header http.Header + BodyMediaType string + Body []byte + ExpectResult *OperationWithNestedStructureOutput + }{ + // Client populates nested default values when missing in response body. + "RestJsonClientPopulatesNestedDefaultsWhenMissingInResponseBody": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + Body: []byte(`{ + "dialog": { + "language": "en" + }, + "dialogList": [ + { + }, + { + "farewell": {} + }, + { + "language": "it", + "greeting": "ciao", + "farewell": { + "phrase": "arrivederci" + } + } + ], + "dialogMap": { + "emptyDialog": { + }, + "partialEmptyDialog": { + "language": "en", + "farewell": {} + }, + "nonEmptyDialog": { + "greeting": "konnichiwa", + "farewell": { + "phrase": "sayonara" + } + } + } + }`), + ExpectResult: &OperationWithNestedStructureOutput{ + Dialog: &types.Dialog{ + Language: ptr.String("en"), + Greeting: ptr.String("hi"), + }, + DialogList: []types.Dialog{ + { + Greeting: ptr.String("hi"), + }, + { + Greeting: ptr.String("hi"), + Farewell: &types.Farewell{ + Phrase: ptr.String("bye"), + }, + }, + { + Language: ptr.String("it"), + Greeting: ptr.String("ciao"), + Farewell: &types.Farewell{ + Phrase: ptr.String("arrivederci"), + }, + }, + }, + DialogMap: map[string]types.Dialog{ + "emptyDialog": { + Greeting: ptr.String("hi"), + }, + "partialEmptyDialog": { + Language: ptr.String("en"), + Greeting: ptr.String("hi"), + Farewell: &types.Farewell{ + Phrase: ptr.String("bye"), + }, + }, + "nonEmptyDialog": { + Greeting: ptr.String("konnichiwa"), + Farewell: &types.Farewell{ + Phrase: ptr.String("sayonara"), + }, + }, + }, + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + if name == "RestJsonClientPopulatesNestedDefaultsWhenMissingInResponseBody" { + t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#OperationWithNestedStructure") + } + + serverURL := "http://localhost:8888/" + client := New(Options{ + HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { + headers := http.Header{} + for k, vs := range c.Header { + for _, v := range vs { + headers.Add(k, v) + } + } + if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 { + headers.Set("Content-Type", c.BodyMediaType) + } + response := &http.Response{ + StatusCode: c.StatusCode, + Header: headers, + Request: r, + } + if len(c.Body) != 0 { + response.ContentLength = int64(len(c.Body)) + response.Body = ioutil.NopCloser(bytes.NewReader(c.Body)) + } else { + + response.Body = http.NoBody + } + return response, nil + }), + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + var params OperationWithNestedStructureInput + result, err := client.OperationWithNestedStructure(context.Background(), ¶ms) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { + t.Errorf("expect c.ExpectResult value match:\n%v", err) + } + }) + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_TestNoInputNoPayload.go b/internal/protocoltest/awsrestjson/api_op_TestNoInputNoPayload.go new file mode 100644 index 00000000000..f268883d524 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestNoInputNoPayload.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This example operation has no input and serializes a request without an HTTP +// body. +// +// These tests are to ensure we do not attach a body or related headers +// (Content-Length, Content-Type) to operations that semantically cannot produce an +// HTTP body. +func (c *Client) TestNoInputNoPayload(ctx context.Context, params *TestNoInputNoPayloadInput, optFns ...func(*Options)) (*TestNoInputNoPayloadOutput, error) { + if params == nil { + params = &TestNoInputNoPayloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestNoInputNoPayload", params, optFns, c.addOperationTestNoInputNoPayloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestNoInputNoPayloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestNoInputNoPayloadInput struct { + noSmithyDocumentSerde +} + +type TestNoInputNoPayloadOutput struct { + TestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestNoInputNoPayloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpTestNoInputNoPayload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTestNoInputNoPayload{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TestNoInputNoPayload"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestNoInputNoPayload(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestNoInputNoPayload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestNoInputNoPayload", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_TestNoInputNoPayload_test.go b/internal/protocoltest/awsrestjson/api_op_TestNoInputNoPayload_test.go new file mode 100644 index 00000000000..19e57ca174a --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestNoInputNoPayload_test.go @@ -0,0 +1,112 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" + "github.com/aws/smithy-go/middleware" + smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "net/http" + "net/url" + "testing" +) + +func TestClient_TestNoInputNoPayload_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *TestNoInputNoPayloadInput + ExpectMethod string + ExpectURIPath string + ExpectQuery []smithytesting.QueryItem + RequireQuery []string + ForbidQuery []string + ExpectHeader http.Header + RequireHeader []string + ForbidHeader []string + Host *url.URL + BodyMediaType string + BodyAssert func(io.Reader) error + }{ + // Serializes a GET request for an operation with no input, and therefore no + // modeled body + "RestJsonHttpWithNoInput": { + Params: &TestNoInputNoPayloadInput{}, + ExpectMethod: "GET", + ExpectURIPath: "/no_input_no_payload", + ExpectQuery: []smithytesting.QueryItem{}, + ForbidHeader: []string{ + "Content-Length", + "Content-Type", + }, + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderEmpty(actual) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + actualReq := &http.Request{} + serverURL := "http://localhost:8888/" + if c.Host != nil { + u, err := url.Parse(serverURL) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + u.Path = c.Host.Path + u.RawPath = c.Host.RawPath + u.RawQuery = c.Host.RawQuery + serverURL = u.String() + } + client := New(Options{ + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + HTTPClient: protocoltesthttp.NewClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.TestNoInputNoPayload(context.Background(), c.Params, func(options *Options) { + options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error { + return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq) + }) + }) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if e, a := c.ExpectMethod, actualReq.Method; e != a { + t.Errorf("expect %v method, got %v", e, a) + } + if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a { + t.Errorf("expect %v path, got %v", e, a) + } + queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery) + smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems) + smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems) + smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems) + smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header) + smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header) + smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header) + if c.BodyAssert != nil { + if err := c.BodyAssert(actualReq.Body); err != nil { + t.Errorf("expect body equal, got %v", err) + } + } + }) + } +} diff --git a/internal/protocoltest/awsrestjson/deserializers.go b/internal/protocoltest/awsrestjson/deserializers.go index 12dc5949372..d54a07a8e55 100644 --- a/internal/protocoltest/awsrestjson/deserializers.go +++ b/internal/protocoltest/awsrestjson/deserializers.go @@ -292,6 +292,86 @@ func awsRestjson1_deserializeOpErrorConstantQueryString(response *smithyhttp.Res } } +type awsRestjson1_deserializeOpContentTypeParameters struct { +} + +func (*awsRestjson1_deserializeOpContentTypeParameters) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpContentTypeParameters) 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_deserializeOpErrorContentTypeParameters(response, &metadata) + } + output := &ContentTypeParametersOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorContentTypeParameters(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 { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDatetimeOffsets struct { } @@ -8367,14 +8447,14 @@ func awsRestjson1_deserializeOpErrorOmitsSerializingEmptyLists(response *smithyh } } -type awsRestjson1_deserializeOpPostPlayerAction struct { +type awsRestjson1_deserializeOpOperationWithDefaults struct { } -func (*awsRestjson1_deserializeOpPostPlayerAction) ID() string { +func (*awsRestjson1_deserializeOpOperationWithDefaults) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPostPlayerAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpOperationWithDefaults) 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) @@ -8388,9 +8468,9 @@ func (m *awsRestjson1_deserializeOpPostPlayerAction) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPostPlayerAction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorOperationWithDefaults(response, &metadata) } - output := &PostPlayerActionOutput{} + output := &OperationWithDefaultsOutput{} out.Result = output var buff [1024]byte @@ -8411,7 +8491,7 @@ func (m *awsRestjson1_deserializeOpPostPlayerAction) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPostPlayerActionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentOperationWithDefaultsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8424,7 +8504,7 @@ func (m *awsRestjson1_deserializeOpPostPlayerAction) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorPostPlayerAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorOperationWithDefaults(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)} @@ -8475,7 +8555,7 @@ func awsRestjson1_deserializeOpErrorPostPlayerAction(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentPostPlayerActionOutput(v **PostPlayerActionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentOperationWithDefaultsOutput(v **OperationWithDefaultsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8488,125 +8568,793 @@ func awsRestjson1_deserializeOpDocumentPostPlayerActionOutput(v **PostPlayerActi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PostPlayerActionOutput + var sv *OperationWithDefaultsOutput if *v == nil { - sv = &PostPlayerActionOutput{} + sv = &OperationWithDefaultsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "action": - if err := awsRestjson1_deserializeDocumentPlayerAction(&sv.Action, value); err != nil { + case "defaultBlob": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Blob to be []byte, got %T instead", value) + } + dv, err := base64.StdEncoding.DecodeString(jtv) + if err != nil { + return fmt.Errorf("failed to base64 decode Blob, %w", err) + } + sv.DefaultBlob = dv + } + + case "defaultBoolean": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DefaultBoolean = ptr.Bool(jtv) + } + + case "defaultByte": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Byte to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DefaultByte = ptr.Int8(int8(i64)) + } + + case "defaultDocumentBoolean": + if err := awsRestjson1_deserializeDocumentDocument(&sv.DefaultDocumentBoolean, value); err != nil { return err } - default: - _, _ = key, value + case "defaultDocumentList": + if err := awsRestjson1_deserializeDocumentDocument(&sv.DefaultDocumentList, value); err != nil { + return err + } - } - } - *v = sv - return nil -} + case "defaultDocumentMap": + if err := awsRestjson1_deserializeDocumentDocument(&sv.DefaultDocumentMap, value); err != nil { + return err + } -type awsRestjson1_deserializeOpPostUnionWithJsonName struct { -} + case "defaultDocumentString": + if err := awsRestjson1_deserializeDocumentDocument(&sv.DefaultDocumentString, value); err != nil { + return err + } -func (*awsRestjson1_deserializeOpPostUnionWithJsonName) ID() string { - return "OperationDeserializer" -} + case "defaultDouble": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DefaultDouble = ptr.Float64(f64) -func (m *awsRestjson1_deserializeOpPostUnionWithJsonName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPostUnionWithJsonName(response, &metadata) - } - output := &PostUnionWithJsonNameOutput{} - out.Result = output + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) - body := io.TeeReader(response.Body, ringBuffer) + } + sv.DefaultDouble = ptr.Float64(f64) - 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 - } + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) - err = awsRestjson1_deserializeOpDocumentPostUnionWithJsonNameOutput(&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 -} + case "defaultEnum": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TestEnum to be of type string, got %T instead", value) + } + sv.DefaultEnum = types.TestEnum(jtv) + } -func awsRestjson1_deserializeOpErrorPostUnionWithJsonName(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) + case "defaultFloat": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DefaultFloat = ptr.Float32(float32(f64)) - errorCode := "UnknownError" - errorMessage := errorCode + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + } + sv.DefaultFloat = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value) + + } + } + + case "defaultInteger": + 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.DefaultInteger = ptr.Int32(int32(i64)) + } + + case "defaultIntEnum": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected TestIntEnum to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DefaultIntEnum = int32(i64) + } + + case "defaultList": + if err := awsRestjson1_deserializeDocumentTestStringList(&sv.DefaultList, value); err != nil { + return err + } + + case "defaultLong": + 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.DefaultLong = ptr.Int64(i64) + } + + case "defaultMap": + if err := awsRestjson1_deserializeDocumentTestStringMap(&sv.DefaultMap, value); err != nil { + return err + } + + case "defaultNullDocument": + if err := awsRestjson1_deserializeDocumentDocument(&sv.DefaultNullDocument, value); err != nil { + return err + } + + case "defaultShort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Short to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DefaultShort = ptr.Int16(int16(i64)) + } + + case "defaultString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DefaultString = ptr.String(jtv) + } + + case "defaultTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DefaultTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "emptyBlob": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Blob to be []byte, got %T instead", value) + } + dv, err := base64.StdEncoding.DecodeString(jtv) + if err != nil { + return fmt.Errorf("failed to base64 decode Blob, %w", err) + } + sv.EmptyBlob = dv + } + + case "emptyString": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.EmptyString = ptr.String(jtv) + } + + case "falseBoolean": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.FalseBoolean = jtv + } + + case "zeroByte": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Byte to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ZeroByte = int8(i64) + } + + case "zeroDouble": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ZeroDouble = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ZeroDouble = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "zeroFloat": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ZeroFloat = float32(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ZeroFloat = float32(f64) + + default: + return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value) + + } + } + + case "zeroInteger": + 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.ZeroInteger = int32(i64) + } + + case "zeroLong": + 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.ZeroLong = i64 + } + + case "zeroShort": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Short to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ZeroShort = int16(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpOperationWithNestedStructure struct { +} + +func (*awsRestjson1_deserializeOpOperationWithNestedStructure) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpOperationWithNestedStructure) 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_deserializeOpErrorOperationWithNestedStructure(response, &metadata) + } + output := &OperationWithNestedStructureOutput{} + 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_deserializeOpDocumentOperationWithNestedStructureOutput(&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_deserializeOpErrorOperationWithNestedStructure(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 { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentOperationWithNestedStructureOutput(v **OperationWithNestedStructureOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *OperationWithNestedStructureOutput + if *v == nil { + sv = &OperationWithNestedStructureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "dialog": + if err := awsRestjson1_deserializeDocumentDialog(&sv.Dialog, value); err != nil { + return err + } + + case "dialogList": + if err := awsRestjson1_deserializeDocumentDialogList(&sv.DialogList, value); err != nil { + return err + } + + case "dialogMap": + if err := awsRestjson1_deserializeDocumentDialogMap(&sv.DialogMap, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPostPlayerAction struct { +} + +func (*awsRestjson1_deserializeOpPostPlayerAction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPostPlayerAction) 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_deserializeOpErrorPostPlayerAction(response, &metadata) + } + output := &PostPlayerActionOutput{} + 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_deserializeOpDocumentPostPlayerActionOutput(&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_deserializeOpErrorPostPlayerAction(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 { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPostPlayerActionOutput(v **PostPlayerActionOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PostPlayerActionOutput + if *v == nil { + sv = &PostPlayerActionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "action": + if err := awsRestjson1_deserializeDocumentPlayerAction(&sv.Action, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPostUnionWithJsonName struct { +} + +func (*awsRestjson1_deserializeOpPostUnionWithJsonName) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPostUnionWithJsonName) 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_deserializeOpErrorPostUnionWithJsonName(response, &metadata) + } + output := &PostUnionWithJsonNameOutput{} + 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_deserializeOpDocumentPostUnionWithJsonNameOutput(&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_deserializeOpErrorPostUnionWithJsonName(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 { default: @@ -10124,7 +10872,140 @@ func (m *awsRestjson1_deserializeOpTestBodyStructure) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorTestBodyStructure(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTestBodyStructure(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 { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsTestBodyStructureOutput(v *TestBodyStructureOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("x-amz-test-id"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.TestId = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentTestBodyStructureOutput(v **TestBodyStructureOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *TestBodyStructureOutput + if *v == nil { + sv = &TestBodyStructureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "testConfig": + if err := awsRestjson1_deserializeDocumentTestConfig(&sv.TestConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTestNoInputNoPayload struct { +} + +func (*awsRestjson1_deserializeOpTestNoInputNoPayload) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTestNoInputNoPayload) 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_deserializeOpErrorTestNoInputNoPayload(response, &metadata) + } + output := &TestNoInputNoPayloadOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsTestNoInputNoPayloadOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTestNoInputNoPayload(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)} @@ -10175,53 +11056,18 @@ func awsRestjson1_deserializeOpErrorTestBodyStructure(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpHttpBindingsTestBodyStructureOutput(v *TestBodyStructureOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsTestNoInputNoPayloadOutput(v *TestNoInputNoPayloadOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } - if headerValues := response.Header.Values("x-amz-test-id"); len(headerValues) != 0 { + if headerValues := response.Header.Values("X-Amz-Test-Id"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) v.TestId = ptr.String(headerValues[0]) } return nil } -func awsRestjson1_deserializeOpDocumentTestBodyStructureOutput(v **TestBodyStructureOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *TestBodyStructureOutput - if *v == nil { - sv = &TestBodyStructureOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "testConfig": - if err := awsRestjson1_deserializeDocumentTestConfig(&sv.TestConfig, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} type awsRestjson1_deserializeOpTestNoPayload struct { } @@ -11218,6 +12064,129 @@ func awsRestjson1_deserializeDocumentDenseStructMap(v *map[string]types.Greeting return nil } +func awsRestjson1_deserializeDocumentDialog(v **types.Dialog, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Dialog + if *v == nil { + sv = &types.Dialog{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "farewell": + if err := awsRestjson1_deserializeDocumentFarewell(&sv.Farewell, value); err != nil { + return err + } + + case "greeting": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Greeting = ptr.String(jtv) + } + + case "language": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Language = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDialogList(v *[]types.Dialog, 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.Dialog + if *v == nil { + cv = []types.Dialog{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Dialog + destAddr := &col + if err := awsRestjson1_deserializeDocumentDialog(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDialogMap(v *map[string]types.Dialog, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]types.Dialog + if *v == nil { + mv = map[string]types.Dialog{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.Dialog + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentDialog(&destAddr, value); err != nil { + return err + } + parsedVal = *destAddr + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentDocument(v *document.Interface, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11260,6 +12229,46 @@ func awsRestjson1_deserializeDocumentDocumentValuedMap(v *map[string]document.In return nil } +func awsRestjson1_deserializeDocumentFarewell(v **types.Farewell, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Farewell + if *v == nil { + sv = &types.Farewell{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "phrase": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Phrase = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentFooError(v **types.FooError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11978,6 +12987,78 @@ func awsRestjson1_deserializeDocumentTestConfig(v **types.TestConfig, value inte return nil } +func awsRestjson1_deserializeDocumentTestStringList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentTestStringMap(v *map[string]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentUnionPayload(v *types.UnionPayload, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/internal/protocoltest/awsrestjson/endpoints.go b/internal/protocoltest/awsrestjson/endpoints.go index df941fb06c3..7b4f4c13469 100644 --- a/internal/protocoltest/awsrestjson/endpoints.go +++ b/internal/protocoltest/awsrestjson/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/awsrestjson/generated.json b/internal/protocoltest/awsrestjson/generated.json index 95430845249..4af031e9f8c 100644 --- a/internal/protocoltest/awsrestjson/generated.json +++ b/internal/protocoltest/awsrestjson/generated.json @@ -14,6 +14,8 @@ "api_op_ConstantAndVariableQueryString_test.go", "api_op_ConstantQueryString.go", "api_op_ConstantQueryString_test.go", + "api_op_ContentTypeParameters.go", + "api_op_ContentTypeParameters_test.go", "api_op_DatetimeOffsets.go", "api_op_DatetimeOffsets_test.go", "api_op_DocumentType.go", @@ -127,6 +129,10 @@ "api_op_OmitsNullSerializesEmptyString_test.go", "api_op_OmitsSerializingEmptyLists.go", "api_op_OmitsSerializingEmptyLists_test.go", + "api_op_OperationWithDefaults.go", + "api_op_OperationWithDefaults_test.go", + "api_op_OperationWithNestedStructure.go", + "api_op_OperationWithNestedStructure_test.go", "api_op_PostPlayerAction.go", "api_op_PostPlayerAction_test.go", "api_op_PostUnionWithJsonName.go", @@ -155,6 +161,8 @@ "api_op_StreamingTraits_test.go", "api_op_TestBodyStructure.go", "api_op_TestBodyStructure_test.go", + "api_op_TestNoInputNoPayload.go", + "api_op_TestNoInputNoPayload_test.go", "api_op_TestNoPayload.go", "api_op_TestNoPayload_test.go", "api_op_TestPayloadBlob.go", diff --git a/internal/protocoltest/awsrestjson/serializers.go b/internal/protocoltest/awsrestjson/serializers.go index 5365846ab97..0829fa1dbba 100644 --- a/internal/protocoltest/awsrestjson/serializers.go +++ b/internal/protocoltest/awsrestjson/serializers.go @@ -318,6 +318,81 @@ func awsRestjson1_serializeOpHttpBindingsConstantQueryStringInput(v *ConstantQue return nil } +type awsRestjson1_serializeOpContentTypeParameters struct { +} + +func (*awsRestjson1_serializeOpContentTypeParameters) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpContentTypeParameters) 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.(*ContentTypeParametersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ContentTypeParameters") + 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_serializeOpDocumentContentTypeParametersInput(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_serializeOpHttpBindingsContentTypeParametersInput(v *ContentTypeParametersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentContentTypeParametersInput(v *ContentTypeParametersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Value != nil { + ok := object.Key("value") + ok.Integer(*v.Value) + } + + return nil +} + type awsRestjson1_serializeOpDatetimeOffsets struct { } @@ -5857,6 +5932,177 @@ func awsRestjson1_serializeOpHttpBindingsOmitsSerializingEmptyListsInput(v *Omit return nil } +type awsRestjson1_serializeOpOperationWithDefaults struct { +} + +func (*awsRestjson1_serializeOpOperationWithDefaults) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpOperationWithDefaults) 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.(*OperationWithDefaultsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/OperationWithDefaults") + 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_serializeOpDocumentOperationWithDefaultsInput(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_serializeOpHttpBindingsOperationWithDefaultsInput(v *OperationWithDefaultsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentOperationWithDefaultsInput(v *OperationWithDefaultsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientOptionalDefaults != nil { + ok := object.Key("clientOptionalDefaults") + if err := awsRestjson1_serializeDocumentClientOptionalDefaults(v.ClientOptionalDefaults, ok); err != nil { + return err + } + } + + if v.Defaults != nil { + ok := object.Key("defaults") + if err := awsRestjson1_serializeDocumentDefaults(v.Defaults, ok); err != nil { + return err + } + } + + if v.OtherTopLevelDefault != 0 { + ok := object.Key("otherTopLevelDefault") + ok.Integer(v.OtherTopLevelDefault) + } + + if v.TopLevelDefault != nil { + ok := object.Key("topLevelDefault") + ok.String(*v.TopLevelDefault) + } + + return nil +} + +type awsRestjson1_serializeOpOperationWithNestedStructure struct { +} + +func (*awsRestjson1_serializeOpOperationWithNestedStructure) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpOperationWithNestedStructure) 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.(*OperationWithNestedStructureInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/OperationWithNestedStructure") + 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_serializeOpDocumentOperationWithNestedStructureInput(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_serializeOpHttpBindingsOperationWithNestedStructureInput(v *OperationWithNestedStructureInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentOperationWithNestedStructureInput(v *OperationWithNestedStructureInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TopLevel != nil { + ok := object.Key("topLevel") + if err := awsRestjson1_serializeDocumentTopLevel(v.TopLevel, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpPostPlayerAction struct { } @@ -7009,6 +7255,58 @@ func awsRestjson1_serializeOpDocumentTestBodyStructureInput(v *TestBodyStructure return nil } +type awsRestjson1_serializeOpTestNoInputNoPayload struct { +} + +func (*awsRestjson1_serializeOpTestNoInputNoPayload) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTestNoInputNoPayload) 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.(*TestNoInputNoPayloadInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/no_input_no_payload") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTestNoInputNoPayloadInput(v *TestNoInputNoPayloadInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + type awsRestjson1_serializeOpTestNoPayload struct { } @@ -7371,6 +7669,231 @@ func awsRestjson1_serializeOpHttpBindingsUnitInputAndOutputInput(v *UnitInputAnd return nil } +func awsRestjson1_serializeDocumentClientOptionalDefaults(v *types.ClientOptionalDefaults, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Member != nil { + ok := object.Key("member") + ok.Integer(*v.Member) + } + + return nil +} + +func awsRestjson1_serializeDocumentDefaults(v *types.Defaults, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultBlob != nil { + ok := object.Key("defaultBlob") + ok.Base64EncodeBytes(v.DefaultBlob) + } + + if v.DefaultBoolean != nil { + ok := object.Key("defaultBoolean") + ok.Boolean(*v.DefaultBoolean) + } + + if v.DefaultByte != nil { + ok := object.Key("defaultByte") + ok.Byte(*v.DefaultByte) + } + + if v.DefaultDocumentBoolean != nil { + ok := object.Key("defaultDocumentBoolean") + if err := awsRestjson1_serializeDocumentDocument(v.DefaultDocumentBoolean, ok); err != nil { + return err + } + } + + if v.DefaultDocumentList != nil { + ok := object.Key("defaultDocumentList") + if err := awsRestjson1_serializeDocumentDocument(v.DefaultDocumentList, ok); err != nil { + return err + } + } + + if v.DefaultDocumentMap != nil { + ok := object.Key("defaultDocumentMap") + if err := awsRestjson1_serializeDocumentDocument(v.DefaultDocumentMap, ok); err != nil { + return err + } + } + + if v.DefaultDocumentString != nil { + ok := object.Key("defaultDocumentString") + if err := awsRestjson1_serializeDocumentDocument(v.DefaultDocumentString, ok); err != nil { + return err + } + } + + if v.DefaultDouble != nil { + ok := object.Key("defaultDouble") + switch { + case math.IsNaN(*v.DefaultDouble): + ok.String("NaN") + + case math.IsInf(*v.DefaultDouble, 1): + ok.String("Infinity") + + case math.IsInf(*v.DefaultDouble, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.DefaultDouble) + + } + } + + if len(v.DefaultEnum) > 0 { + ok := object.Key("defaultEnum") + ok.String(string(v.DefaultEnum)) + } + + if v.DefaultFloat != nil { + ok := object.Key("defaultFloat") + switch { + case math.IsNaN(float64(*v.DefaultFloat)): + ok.String("NaN") + + case math.IsInf(float64(*v.DefaultFloat), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.DefaultFloat), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.DefaultFloat) + + } + } + + if v.DefaultInteger != nil { + ok := object.Key("defaultInteger") + ok.Integer(*v.DefaultInteger) + } + + if v.DefaultIntEnum != 0 { + ok := object.Key("defaultIntEnum") + ok.Integer(v.DefaultIntEnum) + } + + if v.DefaultList != nil { + ok := object.Key("defaultList") + if err := awsRestjson1_serializeDocumentTestStringList(v.DefaultList, ok); err != nil { + return err + } + } + + if v.DefaultLong != nil { + ok := object.Key("defaultLong") + ok.Long(*v.DefaultLong) + } + + if v.DefaultMap != nil { + ok := object.Key("defaultMap") + if err := awsRestjson1_serializeDocumentTestStringMap(v.DefaultMap, ok); err != nil { + return err + } + } + + if v.DefaultNullDocument != nil { + ok := object.Key("defaultNullDocument") + if err := awsRestjson1_serializeDocumentDocument(v.DefaultNullDocument, ok); err != nil { + return err + } + } + + if v.DefaultShort != nil { + ok := object.Key("defaultShort") + ok.Short(*v.DefaultShort) + } + + if v.DefaultString != nil { + ok := object.Key("defaultString") + ok.String(*v.DefaultString) + } + + if v.DefaultTimestamp != nil { + ok := object.Key("defaultTimestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.DefaultTimestamp)) + } + + if v.EmptyBlob != nil { + ok := object.Key("emptyBlob") + ok.Base64EncodeBytes(v.EmptyBlob) + } + + if v.EmptyString != nil { + ok := object.Key("emptyString") + ok.String(*v.EmptyString) + } + + if v.FalseBoolean { + ok := object.Key("falseBoolean") + ok.Boolean(v.FalseBoolean) + } + + if v.ZeroByte != 0 { + ok := object.Key("zeroByte") + ok.Byte(v.ZeroByte) + } + + if v.ZeroDouble != 0 { + ok := object.Key("zeroDouble") + switch { + case math.IsNaN(v.ZeroDouble): + ok.String("NaN") + + case math.IsInf(v.ZeroDouble, 1): + ok.String("Infinity") + + case math.IsInf(v.ZeroDouble, -1): + ok.String("-Infinity") + + default: + ok.Double(v.ZeroDouble) + + } + } + + if v.ZeroFloat != 0 { + ok := object.Key("zeroFloat") + switch { + case math.IsNaN(float64(v.ZeroFloat)): + ok.String("NaN") + + case math.IsInf(float64(v.ZeroFloat), 1): + ok.String("Infinity") + + case math.IsInf(float64(v.ZeroFloat), -1): + ok.String("-Infinity") + + default: + ok.Float(v.ZeroFloat) + + } + } + + if v.ZeroInteger != 0 { + ok := object.Key("zeroInteger") + ok.Integer(v.ZeroInteger) + } + + if v.ZeroLong != 0 { + ok := object.Key("zeroLong") + ok.Long(v.ZeroLong) + } + + if v.ZeroShort != 0 { + ok := object.Key("zeroShort") + ok.Short(v.ZeroShort) + } + + return nil +} + func awsRestjson1_serializeDocumentDenseBooleanMap(v map[string]bool, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7434,6 +7957,57 @@ func awsRestjson1_serializeDocumentDenseStructMap(v map[string]types.GreetingStr return nil } +func awsRestjson1_serializeDocumentDialog(v *types.Dialog, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Farewell != nil { + ok := object.Key("farewell") + if err := awsRestjson1_serializeDocumentFarewell(v.Farewell, ok); err != nil { + return err + } + } + + if v.Greeting != nil { + ok := object.Key("greeting") + ok.String(*v.Greeting) + } + + if v.Language != nil { + ok := object.Key("language") + ok.String(*v.Language) + } + + return nil +} + +func awsRestjson1_serializeDocumentDialogList(v []types.Dialog, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentDialog(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentDialogMap(v map[string]types.Dialog, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + mapVar := v[key] + if err := awsRestjson1_serializeDocumentDialog(&mapVar, om); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentDocument(v document.Interface, value smithyjson.Value) error { if v == nil { return nil @@ -7465,6 +8039,18 @@ func awsRestjson1_serializeDocumentDocumentValuedMap(v map[string]document.Inter return nil } +func awsRestjson1_serializeDocumentFarewell(v *types.Farewell, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Phrase != nil { + ok := object.Key("phrase") + ok.String(*v.Phrase) + } + + return nil +} + func awsRestjson1_serializeDocumentMyUnion(v types.MyUnion, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -7758,6 +8344,56 @@ func awsRestjson1_serializeDocumentTestConfig(v *types.TestConfig, value smithyj return nil } +func awsRestjson1_serializeDocumentTestStringList(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_serializeDocumentTestStringMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} + +func awsRestjson1_serializeDocumentTopLevel(v *types.TopLevel, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Dialog != nil { + ok := object.Key("dialog") + if err := awsRestjson1_serializeDocumentDialog(v.Dialog, ok); err != nil { + return err + } + } + + if v.DialogList != nil { + ok := object.Key("dialogList") + if err := awsRestjson1_serializeDocumentDialogList(v.DialogList, ok); err != nil { + return err + } + } + + if v.DialogMap != nil { + ok := object.Key("dialogMap") + if err := awsRestjson1_serializeDocumentDialogMap(v.DialogMap, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentUnionPayload(v types.UnionPayload, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/internal/protocoltest/awsrestjson/snapshot_test.go b/internal/protocoltest/awsrestjson/snapshot_test.go index a0433cd7de5..a9261ab8c17 100644 --- a/internal/protocoltest/awsrestjson/snapshot_test.go +++ b/internal/protocoltest/awsrestjson/snapshot_test.go @@ -98,6 +98,18 @@ func TestCheckSnapshot_ConstantQueryString(t *testing.T) { } } +func TestCheckSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DatetimeOffsets(t *testing.T) { svc := New(Options{}) _, err := svc.DatetimeOffsets(context.Background(), nil, func(o *Options) { @@ -974,6 +986,30 @@ func TestCheckSnapshot_OmitsSerializingEmptyLists(t *testing.T) { } } +func TestCheckSnapshot_OperationWithDefaults(t *testing.T) { + svc := New(Options{}) + _, err := svc.OperationWithDefaults(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "OperationWithDefaults") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestCheckSnapshot_OperationWithNestedStructure(t *testing.T) { + svc := New(Options{}) + _, err := svc.OperationWithNestedStructure(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "OperationWithNestedStructure") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_PostPlayerAction(t *testing.T) { svc := New(Options{}) _, err := svc.PostPlayerAction(context.Background(), nil, func(o *Options) { @@ -1142,6 +1178,18 @@ func TestCheckSnapshot_TestBodyStructure(t *testing.T) { } } +func TestCheckSnapshot_TestNoInputNoPayload(t *testing.T) { + svc := New(Options{}) + _, err := svc.TestNoInputNoPayload(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "TestNoInputNoPayload") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_TestNoPayload(t *testing.T) { svc := New(Options{}) _, err := svc.TestNoPayload(context.Background(), nil, func(o *Options) { @@ -1237,6 +1285,18 @@ func TestUpdateSnapshot_ConstantQueryString(t *testing.T) { } } +func TestUpdateSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DatetimeOffsets(t *testing.T) { svc := New(Options{}) _, err := svc.DatetimeOffsets(context.Background(), nil, func(o *Options) { @@ -2113,6 +2173,30 @@ func TestUpdateSnapshot_OmitsSerializingEmptyLists(t *testing.T) { } } +func TestUpdateSnapshot_OperationWithDefaults(t *testing.T) { + svc := New(Options{}) + _, err := svc.OperationWithDefaults(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "OperationWithDefaults") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + +func TestUpdateSnapshot_OperationWithNestedStructure(t *testing.T) { + svc := New(Options{}) + _, err := svc.OperationWithNestedStructure(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "OperationWithNestedStructure") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_PostPlayerAction(t *testing.T) { svc := New(Options{}) _, err := svc.PostPlayerAction(context.Background(), nil, func(o *Options) { @@ -2281,6 +2365,18 @@ func TestUpdateSnapshot_TestBodyStructure(t *testing.T) { } } +func TestUpdateSnapshot_TestNoInputNoPayload(t *testing.T) { + svc := New(Options{}) + _, err := svc.TestNoInputNoPayload(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "TestNoInputNoPayload") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_TestNoPayload(t *testing.T) { svc := New(Options{}) _, err := svc.TestNoPayload(context.Background(), nil, func(o *Options) { diff --git a/internal/protocoltest/awsrestjson/types/enums.go b/internal/protocoltest/awsrestjson/types/enums.go index 45cedce552e..86acbec565f 100644 --- a/internal/protocoltest/awsrestjson/types/enums.go +++ b/internal/protocoltest/awsrestjson/types/enums.go @@ -19,6 +19,35 @@ func (StringEnum) Values() []StringEnum { } } +type TestEnum string + +// Enum values for TestEnum +const ( + TestEnumFoo TestEnum = "FOO" + TestEnumBar TestEnum = "BAR" + TestEnumBaz TestEnum = "BAZ" +) + +// Values returns all known values for TestEnum. 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 (TestEnum) Values() []TestEnum { + return []TestEnum{ + "FOO", + "BAR", + "BAZ", + } +} + +type TestIntEnum = int32 + +// Enum values for TestIntEnum +const ( + TestIntEnumOne TestIntEnum = 1 + TestIntEnumTwo TestIntEnum = 2 +) + type FooEnum string // Enum values for FooEnum diff --git a/internal/protocoltest/awsrestjson/types/types.go b/internal/protocoltest/awsrestjson/types/types.go index f53faeebe8f..ded9f270cff 100644 --- a/internal/protocoltest/awsrestjson/types/types.go +++ b/internal/protocoltest/awsrestjson/types/types.go @@ -3,16 +3,99 @@ package types import ( + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/document" smithydocument "github.com/aws/smithy-go/document" "time" ) +type ClientOptionalDefaults struct { + Member *int32 + + noSmithyDocumentSerde +} + type ComplexNestedErrorData struct { Foo *string noSmithyDocumentSerde } +type Defaults struct { + DefaultBlob []byte + + DefaultBoolean *bool + + DefaultByte *int8 + + DefaultDocumentBoolean document.Interface + + DefaultDocumentList document.Interface + + DefaultDocumentMap document.Interface + + DefaultDocumentString document.Interface + + DefaultDouble *float64 + + DefaultEnum TestEnum + + DefaultFloat *float32 + + DefaultIntEnum TestIntEnum + + DefaultInteger *int32 + + DefaultList []string + + DefaultLong *int64 + + DefaultMap map[string]string + + DefaultNullDocument document.Interface + + DefaultShort *int16 + + DefaultString *string + + DefaultTimestamp *time.Time + + EmptyBlob []byte + + EmptyString *string + + FalseBoolean bool + + ZeroByte int8 + + ZeroDouble float64 + + ZeroFloat float32 + + ZeroInteger int32 + + ZeroLong int64 + + ZeroShort int16 + + noSmithyDocumentSerde +} + +type Dialog struct { + Farewell *Farewell + + Greeting *string + + Language *string + + noSmithyDocumentSerde +} + +type Farewell struct { + Phrase *string + + noSmithyDocumentSerde +} + // A union with a representative set of types for members. // // The following types satisfy this interface: @@ -195,6 +278,18 @@ type TestConfig struct { noSmithyDocumentSerde } +type TopLevel struct { + + // This member is required. + Dialog *Dialog + + DialogList []Dialog + + DialogMap map[string]Dialog + + noSmithyDocumentSerde +} + // The following types satisfy this interface: // // UnionPayloadMemberGreeting diff --git a/internal/protocoltest/awsrestjson/validators.go b/internal/protocoltest/awsrestjson/validators.go index 90e5a10187d..c9be7143590 100644 --- a/internal/protocoltest/awsrestjson/validators.go +++ b/internal/protocoltest/awsrestjson/validators.go @@ -5,6 +5,7 @@ package awsrestjson import ( "context" "fmt" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/middleware" ) @@ -529,6 +530,26 @@ func (m *validateOpMalformedTimestampQueryHttpDate) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpOperationWithNestedStructure struct { +} + +func (*validateOpOperationWithNestedStructure) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpOperationWithNestedStructure) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*OperationWithNestedStructureInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpOperationWithNestedStructureInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpConstantQueryStringValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpConstantQueryString{}, middleware.After) } @@ -633,6 +654,25 @@ func addOpMalformedTimestampQueryHttpDateValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpMalformedTimestampQueryHttpDate{}, middleware.After) } +func addOpOperationWithNestedStructureValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpOperationWithNestedStructure{}, middleware.After) +} + +func validateTopLevel(v *types.TopLevel) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TopLevel"} + if v.Dialog == nil { + invalidParams.Add(smithy.NewErrParamRequired("Dialog")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpConstantQueryStringInput(v *ConstantQueryStringInput) error { if v == nil { return nil @@ -1067,3 +1107,22 @@ func validateOpMalformedTimestampQueryHttpDateInput(v *MalformedTimestampQueryHt return nil } } + +func validateOpOperationWithNestedStructureInput(v *OperationWithNestedStructureInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "OperationWithNestedStructureInput"} + if v.TopLevel == nil { + invalidParams.Add(smithy.NewErrParamRequired("TopLevel")) + } else if v.TopLevel != nil { + if err := validateTopLevel(v.TopLevel); err != nil { + invalidParams.AddNested("TopLevel", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go b/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go index e8aaef4302c..087f846dd7d 100644 --- a/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go +++ b/internal/protocoltest/ec2query/api_op_DatetimeOffsets_test.go @@ -34,7 +34,7 @@ func TestClient_DatetimeOffsets_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 2019-12-16T22:48:18-01:00 - requestid + requestid `), ExpectResult: &DatetimeOffsetsOutput{ @@ -50,7 +50,7 @@ func TestClient_DatetimeOffsets_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 2019-12-17T00:48:18+01:00 - requestid + requestid `), ExpectResult: &DatetimeOffsetsOutput{ diff --git a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go index af1008d22e8..5022191bc03 100644 --- a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go @@ -129,7 +129,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsEc2queryDeserialize(t *testing.T) { }, BodyMediaType: "application/xml", Body: []byte(` - requestid + requestid `), ExpectResult: &EmptyInputAndEmptyOutputOutput{}, diff --git a/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go b/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go index dcd6554d742..f1db6e0abf0 100644 --- a/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go +++ b/internal/protocoltest/ec2query/api_op_FractionalSeconds_test.go @@ -35,7 +35,7 @@ func TestClient_FractionalSeconds_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 2000-01-02T20:34:56.123Z - requestid + requestid `), ExpectResult: &FractionalSecondsOutput{ diff --git a/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go b/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go index 2e3200cbe63..a3226a33c53 100644 --- a/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go @@ -36,7 +36,7 @@ func TestClient_GreetingWithErrors_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` Hello - requestid + requestid `), ExpectResult: &GreetingWithErrorsOutput{ @@ -124,7 +124,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsEc2queryDeserialize(t *tes Hi - foo-id + foo-id `), ExpectError: &types.InvalidGreeting{ @@ -232,7 +232,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsEc2queryDeserialize(t *testin - foo-id + foo-id `), ExpectError: &types.ComplexError{ diff --git a/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go index 1c317595200..911f6393115 100644 --- a/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go +++ b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go @@ -33,7 +33,7 @@ func TestClient_IgnoresWrappingXmlName_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` bar - requestid + requestid `), ExpectResult: &IgnoresWrappingXmlNameOutput{ diff --git a/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go b/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go index 3c89a06e69e..c9275961a05 100644 --- a/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go @@ -129,7 +129,7 @@ func TestClient_NoInputAndOutput_awsEc2queryDeserialize(t *testing.T) { }, BodyMediaType: "application/xml", Body: []byte(` - requestid + requestid `), ExpectResult: &NoInputAndOutputOutput{}, diff --git a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go index aae5d79e00a..8c55532a4ee 100644 --- a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go +++ b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go @@ -45,7 +45,7 @@ func TestClient_RecursiveXmlShapes_awsEc2queryDeserialize(t *testing.T) { - requestid + requestid `), ExpectResult: &RecursiveXmlShapesOutput{ diff --git a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go index 71960f0f00e..67cc33477cc 100644 --- a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go +++ b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go @@ -43,7 +43,7 @@ func TestClient_SimpleScalarXmlProperties_awsEc2queryDeserialize(t *testing.T) { 4 5.5 6.5 - requestid + requestid `), ExpectResult: &SimpleScalarXmlPropertiesOutput{ diff --git a/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go b/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go index 5c243da59d6..f91cb563adf 100644 --- a/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go @@ -32,7 +32,7 @@ func TestClient_XmlBlobs_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` dmFsdWU= - requestid + requestid `), ExpectResult: &XmlBlobsOutput{ diff --git a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go index 9eeb6f0cc9c..6c59601cd6f 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go @@ -32,7 +32,7 @@ func TestClient_XmlEmptyBlobs_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` - requestid + requestid `), ExpectResult: &XmlEmptyBlobsOutput{ @@ -48,7 +48,7 @@ func TestClient_XmlEmptyBlobs_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` - requestid + requestid `), ExpectResult: &XmlEmptyBlobsOutput{ diff --git a/internal/protocoltest/ec2query/api_op_XmlEnums_test.go b/internal/protocoltest/ec2query/api_op_XmlEnums_test.go index 9543cc19d29..0373e3a23d0 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEnums_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEnums_test.go @@ -53,7 +53,7 @@ func TestClient_XmlEnums_awsEc2queryDeserialize(t *testing.T) { 0 - requestid + requestid `), ExpectResult: &XmlEnumsOutput{ diff --git a/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go b/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go index cd60621d512..21f95ec1f37 100644 --- a/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlIntEnums_test.go @@ -53,7 +53,7 @@ func TestClient_XmlIntEnums_awsEc2queryDeserialize(t *testing.T) { 2 - requestid + requestid `), ExpectResult: &XmlIntEnumsOutput{ diff --git a/internal/protocoltest/ec2query/api_op_XmlLists_test.go b/internal/protocoltest/ec2query/api_op_XmlLists_test.go index d6751346c10..519f697f098 100644 --- a/internal/protocoltest/ec2query/api_op_XmlLists_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlLists_test.go @@ -95,7 +95,7 @@ func TestClient_XmlLists_awsEc2queryDeserialize(t *testing.T) { 4 - requestid + requestid `), ExpectResult: &XmlListsOutput{ diff --git a/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go b/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go index 38840609eab..0f775e4512d 100644 --- a/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go @@ -40,7 +40,7 @@ func TestClient_XmlNamespaces_awsEc2queryDeserialize(t *testing.T) { Baz - requestid + requestid `), ExpectResult: &XmlNamespacesOutput{ diff --git a/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go b/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go index 07b99d328ab..ee86592f846 100644 --- a/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go @@ -34,7 +34,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 2014-04-29T18:30:38Z - requestid + requestid `), ExpectResult: &XmlTimestampsOutput{ @@ -50,7 +50,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 2014-04-29T18:30:38Z - requestid + requestid `), ExpectResult: &XmlTimestampsOutput{ @@ -67,7 +67,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 2014-04-29T18:30:38Z - requestid + requestid `), ExpectResult: &XmlTimestampsOutput{ @@ -83,7 +83,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 1398796238 - requestid + requestid `), ExpectResult: &XmlTimestampsOutput{ @@ -99,7 +99,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` 1398796238 - requestid + requestid `), ExpectResult: &XmlTimestampsOutput{ @@ -115,7 +115,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` Tue, 29 Apr 2014 18:30:38 GMT - requestid + requestid `), ExpectResult: &XmlTimestampsOutput{ @@ -131,7 +131,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` Tue, 29 Apr 2014 18:30:38 GMT - requestid + requestid `), ExpectResult: &XmlTimestampsOutput{ diff --git a/internal/protocoltest/ec2query/endpoints.go b/internal/protocoltest/ec2query/endpoints.go index d25dabefa74..af9df9f98ea 100644 --- a/internal/protocoltest/ec2query/endpoints.go +++ b/internal/protocoltest/ec2query/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/jsonrpc/api_op_ContentTypeParameters.go b/internal/protocoltest/jsonrpc/api_op_ContentTypeParameters.go new file mode 100644 index 00000000000..edd21506f83 --- /dev/null +++ b/internal/protocoltest/jsonrpc/api_op_ContentTypeParameters.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The example tests how servers must support requests containing a Content-Type +// header with parameters. +func (c *Client) ContentTypeParameters(ctx context.Context, params *ContentTypeParametersInput, optFns ...func(*Options)) (*ContentTypeParametersOutput, error) { + if params == nil { + params = &ContentTypeParametersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ContentTypeParameters", params, optFns, c.addOperationContentTypeParametersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ContentTypeParametersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ContentTypeParametersInput struct { + Value *int32 + + noSmithyDocumentSerde +} + +type ContentTypeParametersOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationContentTypeParametersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson11_serializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ContentTypeParameters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opContentTypeParameters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opContentTypeParameters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ContentTypeParameters", + } +} diff --git a/internal/protocoltest/jsonrpc/api_op_ContentTypeParameters_test.go b/internal/protocoltest/jsonrpc/api_op_ContentTypeParameters_test.go new file mode 100644 index 00000000000..726f029052f --- /dev/null +++ b/internal/protocoltest/jsonrpc/api_op_ContentTypeParameters_test.go @@ -0,0 +1,94 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" + "github.com/aws/smithy-go/middleware" + smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "net/http" + "net/url" + "testing" +) + +func TestClient_ContentTypeParameters_awsAwsjson11Serialize(t *testing.T) { + cases := map[string]struct { + Params *ContentTypeParametersInput + ExpectMethod string + ExpectURIPath string + ExpectQuery []smithytesting.QueryItem + RequireQuery []string + ForbidQuery []string + ExpectHeader http.Header + RequireHeader []string + ForbidHeader []string + Host *url.URL + BodyMediaType string + BodyAssert func(io.Reader) error + }{} + for name, c := range cases { + t.Run(name, func(t *testing.T) { + actualReq := &http.Request{} + serverURL := "http://localhost:8888/" + if c.Host != nil { + u, err := url.Parse(serverURL) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + u.Path = c.Host.Path + u.RawPath = c.Host.RawPath + u.RawQuery = c.Host.RawQuery + serverURL = u.String() + } + client := New(Options{ + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + HTTPClient: protocoltesthttp.NewClient(), + Region: "us-west-2", + }) + result, err := client.ContentTypeParameters(context.Background(), c.Params, func(options *Options) { + options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error { + return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq) + }) + }) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if e, a := c.ExpectMethod, actualReq.Method; e != a { + t.Errorf("expect %v method, got %v", e, a) + } + if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a { + t.Errorf("expect %v path, got %v", e, a) + } + queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery) + smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems) + smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems) + smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems) + smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header) + smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header) + smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header) + if c.BodyAssert != nil { + if err := c.BodyAssert(actualReq.Body); err != nil { + t.Errorf("expect body equal, got %v", err) + } + } + }) + } +} diff --git a/internal/protocoltest/jsonrpc/deserializers.go b/internal/protocoltest/jsonrpc/deserializers.go index b895e186ada..b1cbefc2712 100644 --- a/internal/protocoltest/jsonrpc/deserializers.go +++ b/internal/protocoltest/jsonrpc/deserializers.go @@ -33,6 +33,110 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsAwsjson11_deserializeOpContentTypeParameters struct { +} + +func (*awsAwsjson11_deserializeOpContentTypeParameters) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpContentTypeParameters) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorContentTypeParameters(response, &metadata) + } + output := &ContentTypeParametersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentContentTypeParametersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorContentTypeParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDatetimeOffsets struct { } @@ -3239,6 +3343,37 @@ func awsAwsjson11_deserializeDocumentStringMap(v *map[string]string, value inter return nil } +func awsAwsjson11_deserializeOpDocumentContentTypeParametersOutput(v **ContentTypeParametersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ContentTypeParametersOutput + if *v == nil { + sv = &ContentTypeParametersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDatetimeOffsetsOutput(v **DatetimeOffsetsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/internal/protocoltest/jsonrpc/endpoints.go b/internal/protocoltest/jsonrpc/endpoints.go index 0493bfbfd05..abffe66b6b0 100644 --- a/internal/protocoltest/jsonrpc/endpoints.go +++ b/internal/protocoltest/jsonrpc/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/jsonrpc/generated.json b/internal/protocoltest/jsonrpc/generated.json index 0a51a461560..8a84a76fb55 100644 --- a/internal/protocoltest/jsonrpc/generated.json +++ b/internal/protocoltest/jsonrpc/generated.json @@ -8,6 +8,8 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_ContentTypeParameters.go", + "api_op_ContentTypeParameters_test.go", "api_op_DatetimeOffsets.go", "api_op_DatetimeOffsets_test.go", "api_op_EmptyOperation.go", diff --git a/internal/protocoltest/jsonrpc/serializers.go b/internal/protocoltest/jsonrpc/serializers.go index fe91e562acf..ba34b6e3a27 100644 --- a/internal/protocoltest/jsonrpc/serializers.go +++ b/internal/protocoltest/jsonrpc/serializers.go @@ -20,6 +20,61 @@ import ( "strings" ) +type awsAwsjson11_serializeOpContentTypeParameters struct { +} + +func (*awsAwsjson11_serializeOpContentTypeParameters) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpContentTypeParameters) 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.(*ContentTypeParametersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("JsonProtocol.ContentTypeParameters") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentContentTypeParametersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDatetimeOffsets struct { } @@ -1397,6 +1452,18 @@ func awsAwsjson11_serializeDocumentStringMap(v map[string]string, value smithyjs return nil } +func awsAwsjson11_serializeOpDocumentContentTypeParametersInput(v *ContentTypeParametersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Value != nil { + ok := object.Key("value") + ok.Integer(*v.Value) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentEndpointWithHostLabelOperationInput(v *EndpointWithHostLabelOperationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/internal/protocoltest/jsonrpc/snapshot_test.go b/internal/protocoltest/jsonrpc/snapshot_test.go index 8bc0da0c081..31a78115e35 100644 --- a/internal/protocoltest/jsonrpc/snapshot_test.go +++ b/internal/protocoltest/jsonrpc/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DatetimeOffsets(t *testing.T) { svc := New(Options{}) _, err := svc.DatetimeOffsets(context.Background(), nil, func(o *Options) { @@ -253,6 +265,18 @@ func TestCheckSnapshot_SparseNullsOperation(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DatetimeOffsets(t *testing.T) { svc := New(Options{}) _, err := svc.DatetimeOffsets(context.Background(), nil, func(o *Options) { diff --git a/internal/protocoltest/jsonrpc10/api_op_ContentTypeParameters.go b/internal/protocoltest/jsonrpc10/api_op_ContentTypeParameters.go new file mode 100644 index 00000000000..27402615cc1 --- /dev/null +++ b/internal/protocoltest/jsonrpc10/api_op_ContentTypeParameters.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc10 + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The example tests how servers must support requests containing a Content-Type +// header with parameters. +func (c *Client) ContentTypeParameters(ctx context.Context, params *ContentTypeParametersInput, optFns ...func(*Options)) (*ContentTypeParametersOutput, error) { + if params == nil { + params = &ContentTypeParametersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ContentTypeParameters", params, optFns, c.addOperationContentTypeParametersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ContentTypeParametersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ContentTypeParametersInput struct { + Value *int32 + + noSmithyDocumentSerde +} + +type ContentTypeParametersOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationContentTypeParametersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsAwsjson10_serializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ContentTypeParameters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opContentTypeParameters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opContentTypeParameters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ContentTypeParameters", + } +} diff --git a/internal/protocoltest/jsonrpc10/api_op_ContentTypeParameters_test.go b/internal/protocoltest/jsonrpc10/api_op_ContentTypeParameters_test.go new file mode 100644 index 00000000000..f4b637da1c9 --- /dev/null +++ b/internal/protocoltest/jsonrpc10/api_op_ContentTypeParameters_test.go @@ -0,0 +1,94 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc10 + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" + "github.com/aws/smithy-go/middleware" + smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "net/http" + "net/url" + "testing" +) + +func TestClient_ContentTypeParameters_awsAwsjson10Serialize(t *testing.T) { + cases := map[string]struct { + Params *ContentTypeParametersInput + ExpectMethod string + ExpectURIPath string + ExpectQuery []smithytesting.QueryItem + RequireQuery []string + ForbidQuery []string + ExpectHeader http.Header + RequireHeader []string + ForbidHeader []string + Host *url.URL + BodyMediaType string + BodyAssert func(io.Reader) error + }{} + for name, c := range cases { + t.Run(name, func(t *testing.T) { + actualReq := &http.Request{} + serverURL := "http://localhost:8888/" + if c.Host != nil { + u, err := url.Parse(serverURL) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + u.Path = c.Host.Path + u.RawPath = c.Host.RawPath + u.RawQuery = c.Host.RawQuery + serverURL = u.String() + } + client := New(Options{ + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + HTTPClient: protocoltesthttp.NewClient(), + Region: "us-west-2", + }) + result, err := client.ContentTypeParameters(context.Background(), c.Params, func(options *Options) { + options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error { + return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq) + }) + }) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if e, a := c.ExpectMethod, actualReq.Method; e != a { + t.Errorf("expect %v method, got %v", e, a) + } + if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a { + t.Errorf("expect %v path, got %v", e, a) + } + queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery) + smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems) + smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems) + smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems) + smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header) + smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header) + smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header) + if c.BodyAssert != nil { + if err := c.BodyAssert(actualReq.Body); err != nil { + t.Errorf("expect body equal, got %v", err) + } + } + }) + } +} diff --git a/internal/protocoltest/jsonrpc10/deserializers.go b/internal/protocoltest/jsonrpc10/deserializers.go index 9b1aa2fdae2..728940b141b 100644 --- a/internal/protocoltest/jsonrpc10/deserializers.go +++ b/internal/protocoltest/jsonrpc10/deserializers.go @@ -33,6 +33,110 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsAwsjson10_deserializeOpContentTypeParameters struct { +} + +func (*awsAwsjson10_deserializeOpContentTypeParameters) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpContentTypeParameters) 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, awsAwsjson10_deserializeOpErrorContentTypeParameters(response, &metadata) + } + output := &ContentTypeParametersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentContentTypeParametersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorContentTypeParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + bodyInfo, err := getProtocolErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { + errorCode = restjson.SanitizeErrorCode(typ) + } + if len(bodyInfo.Message) != 0 { + errorMessage = bodyInfo.Message + } + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpEmptyInputAndEmptyOutput struct { } @@ -2131,6 +2235,37 @@ func awsAwsjson10_deserializeDocumentDocument(v *document.Interface, value inter return nil } +func awsAwsjson10_deserializeOpDocumentContentTypeParametersOutput(v **ContentTypeParametersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ContentTypeParametersOutput + if *v == nil { + sv = &ContentTypeParametersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentEmptyInputAndEmptyOutputOutput(v **EmptyInputAndEmptyOutputOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/internal/protocoltest/jsonrpc10/endpoints.go b/internal/protocoltest/jsonrpc10/endpoints.go index efa731cae4a..be563fd499b 100644 --- a/internal/protocoltest/jsonrpc10/endpoints.go +++ b/internal/protocoltest/jsonrpc10/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/jsonrpc10/generated.json b/internal/protocoltest/jsonrpc10/generated.json index addb660883d..33e8f5f020d 100644 --- a/internal/protocoltest/jsonrpc10/generated.json +++ b/internal/protocoltest/jsonrpc10/generated.json @@ -8,6 +8,8 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_ContentTypeParameters.go", + "api_op_ContentTypeParameters_test.go", "api_op_EmptyInputAndEmptyOutput.go", "api_op_EmptyInputAndEmptyOutput_test.go", "api_op_EndpointOperation.go", diff --git a/internal/protocoltest/jsonrpc10/serializers.go b/internal/protocoltest/jsonrpc10/serializers.go index 9943b12d766..8d6f4699f73 100644 --- a/internal/protocoltest/jsonrpc10/serializers.go +++ b/internal/protocoltest/jsonrpc10/serializers.go @@ -20,6 +20,61 @@ import ( "strings" ) +type awsAwsjson10_serializeOpContentTypeParameters struct { +} + +func (*awsAwsjson10_serializeOpContentTypeParameters) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpContentTypeParameters) 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.(*ContentTypeParametersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("JsonRpc10.ContentTypeParameters") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentContentTypeParametersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpEmptyInputAndEmptyOutput struct { } @@ -1154,6 +1209,18 @@ func awsAwsjson10_serializeDocumentDocument(v document.Interface, value smithyjs return nil } +func awsAwsjson10_serializeOpDocumentContentTypeParametersInput(v *ContentTypeParametersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Value != nil { + ok := object.Key("value") + ok.Integer(*v.Value) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentEmptyInputAndEmptyOutputInput(v *EmptyInputAndEmptyOutputInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/internal/protocoltest/jsonrpc10/snapshot_test.go b/internal/protocoltest/jsonrpc10/snapshot_test.go index e3361ae3455..5c32996d20d 100644 --- a/internal/protocoltest/jsonrpc10/snapshot_test.go +++ b/internal/protocoltest/jsonrpc10/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_EmptyInputAndEmptyOutput(t *testing.T) { svc := New(Options{}) _, err := svc.EmptyInputAndEmptyOutput(context.Background(), nil, func(o *Options) { @@ -217,6 +229,18 @@ func TestCheckSnapshot_SimpleScalarProperties(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_EmptyInputAndEmptyOutput(t *testing.T) { svc := New(Options{}) _, err := svc.EmptyInputAndEmptyOutput(context.Background(), nil, func(o *Options) { diff --git a/internal/protocoltest/query/endpoints.go b/internal/protocoltest/query/endpoints.go index ca3989ded47..265650e0cd8 100644 --- a/internal/protocoltest/query/endpoints.go +++ b/internal/protocoltest/query/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/restxml/api_op_ContentTypeParameters.go b/internal/protocoltest/restxml/api_op_ContentTypeParameters.go new file mode 100644 index 00000000000..fd03e12f1e1 --- /dev/null +++ b/internal/protocoltest/restxml/api_op_ContentTypeParameters.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package restxml + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// The example tests how servers must support requests containing a Content-Type +// header with parameters. +func (c *Client) ContentTypeParameters(ctx context.Context, params *ContentTypeParametersInput, optFns ...func(*Options)) (*ContentTypeParametersOutput, error) { + if params == nil { + params = &ContentTypeParametersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ContentTypeParameters", params, optFns, c.addOperationContentTypeParametersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ContentTypeParametersOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ContentTypeParametersInput struct { + Value *int32 + + noSmithyDocumentSerde +} + +type ContentTypeParametersOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationContentTypeParametersMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestxml_serializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestxml_deserializeOpContentTypeParameters{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ContentTypeParameters"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opContentTypeParameters(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opContentTypeParameters(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ContentTypeParameters", + } +} diff --git a/internal/protocoltest/restxml/api_op_ContentTypeParameters_test.go b/internal/protocoltest/restxml/api_op_ContentTypeParameters_test.go new file mode 100644 index 00000000000..3c1001fb901 --- /dev/null +++ b/internal/protocoltest/restxml/api_op_ContentTypeParameters_test.go @@ -0,0 +1,96 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package restxml + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + protocoltesthttp "github.com/aws/aws-sdk-go-v2/internal/protocoltest" + "github.com/aws/smithy-go/middleware" + smithyprivateprotocol "github.com/aws/smithy-go/private/protocol" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "net/http" + "net/url" + "testing" +) + +func TestClient_ContentTypeParameters_awsRestxmlSerialize(t *testing.T) { + cases := map[string]struct { + Params *ContentTypeParametersInput + ExpectMethod string + ExpectURIPath string + ExpectQuery []smithytesting.QueryItem + RequireQuery []string + ForbidQuery []string + ExpectHeader http.Header + RequireHeader []string + ForbidHeader []string + Host *url.URL + BodyMediaType string + BodyAssert func(io.Reader) error + }{} + for name, c := range cases { + t.Run(name, func(t *testing.T) { + actualReq := &http.Request{} + serverURL := "http://localhost:8888/" + if c.Host != nil { + u, err := url.Parse(serverURL) + if err != nil { + t.Fatalf("expect no error, got %v", err) + } + u.Path = c.Host.Path + u.RawPath = c.Host.RawPath + u.RawQuery = c.Host.RawQuery + serverURL = u.String() + } + client := New(Options{ + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + HTTPClient: protocoltesthttp.NewClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.ContentTypeParameters(context.Background(), c.Params, func(options *Options) { + options.APIOptions = append(options.APIOptions, func(stack *middleware.Stack) error { + return smithyprivateprotocol.AddCaptureRequestMiddleware(stack, actualReq) + }) + }) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if e, a := c.ExpectMethod, actualReq.Method; e != a { + t.Errorf("expect %v method, got %v", e, a) + } + if e, a := c.ExpectURIPath, actualReq.URL.RawPath; e != a { + t.Errorf("expect %v path, got %v", e, a) + } + queryItems := smithytesting.ParseRawQuery(actualReq.URL.RawQuery) + smithytesting.AssertHasQuery(t, c.ExpectQuery, queryItems) + smithytesting.AssertHasQueryKeys(t, c.RequireQuery, queryItems) + smithytesting.AssertNotHaveQueryKeys(t, c.ForbidQuery, queryItems) + smithytesting.AssertHasHeader(t, c.ExpectHeader, actualReq.Header) + smithytesting.AssertHasHeaderKeys(t, c.RequireHeader, actualReq.Header) + smithytesting.AssertNotHaveHeaderKeys(t, c.ForbidHeader, actualReq.Header) + if c.BodyAssert != nil { + if err := c.BodyAssert(actualReq.Body); err != nil { + t.Errorf("expect body equal, got %v", err) + } + } + }) + } +} diff --git a/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go b/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go index 1babdb7f97a..bb12a66891a 100644 --- a/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go +++ b/internal/protocoltest/restxml/api_op_HttpEnumPayload_test.go @@ -42,6 +42,9 @@ func TestClient_HttpEnumPayload_awsRestxmlSerialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/EnumPayload", ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"text/plain"}, + }, BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderBytes(actual, []byte(`enumvalue`)) }, @@ -121,7 +124,10 @@ func TestClient_HttpEnumPayload_awsRestxmlDeserialize(t *testing.T) { }{ "RestXmlEnumPayloadResponse": { StatusCode: 200, - Body: []byte(`enumvalue`), + Header: http.Header{ + "Content-Type": []string{"text/plain"}, + }, + Body: []byte(`enumvalue`), ExpectResult: &HttpEnumPayloadOutput{ Payload: types.StringEnum("enumvalue"), }, diff --git a/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go b/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go index 2cba8d553d0..2346ff0bbd5 100644 --- a/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go +++ b/internal/protocoltest/restxml/api_op_HttpStringPayload_test.go @@ -42,6 +42,9 @@ func TestClient_HttpStringPayload_awsRestxmlSerialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/StringPayload", ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"text/plain"}, + }, BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderBytes(actual, []byte(`rawstring`)) }, @@ -121,7 +124,10 @@ func TestClient_HttpStringPayload_awsRestxmlDeserialize(t *testing.T) { }{ "RestXmlStringPayloadResponse": { StatusCode: 200, - Body: []byte(`rawstring`), + Header: http.Header{ + "Content-Type": []string{"text/plain"}, + }, + Body: []byte(`rawstring`), ExpectResult: &HttpStringPayloadOutput{ Payload: ptr.String("rawstring"), }, diff --git a/internal/protocoltest/restxml/deserializers.go b/internal/protocoltest/restxml/deserializers.go index 6f917f64f80..94a13f9f8a1 100644 --- a/internal/protocoltest/restxml/deserializers.go +++ b/internal/protocoltest/restxml/deserializers.go @@ -377,6 +377,70 @@ func awsRestxml_deserializeOpErrorConstantQueryString(response *smithyhttp.Respo } } +type awsRestxml_deserializeOpContentTypeParameters struct { +} + +func (*awsRestxml_deserializeOpContentTypeParameters) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestxml_deserializeOpContentTypeParameters) 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, awsRestxml_deserializeOpErrorContentTypeParameters(response, &metadata) + } + output := &ContentTypeParametersOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestxml_deserializeOpErrorContentTypeParameters(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) + if err != nil { + return err + } + if reqID := errorComponents.RequestID; len(reqID) != 0 { + awsmiddleware.SetRequestIDMetadata(metadata, reqID) + } + if len(errorComponents.Code) != 0 { + errorCode = errorComponents.Code + } + if len(errorComponents.Message) != 0 { + errorMessage = errorComponents.Message + } + errorBody.Seek(0, io.SeekStart) + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestxml_deserializeOpDatetimeOffsets struct { } diff --git a/internal/protocoltest/restxml/endpoints.go b/internal/protocoltest/restxml/endpoints.go index 398c810c6fc..8595cc9b2a5 100644 --- a/internal/protocoltest/restxml/endpoints.go +++ b/internal/protocoltest/restxml/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/restxml/generated.json b/internal/protocoltest/restxml/generated.json index e1e592dbd67..02a03f1da79 100644 --- a/internal/protocoltest/restxml/generated.json +++ b/internal/protocoltest/restxml/generated.json @@ -16,6 +16,8 @@ "api_op_ConstantAndVariableQueryString_test.go", "api_op_ConstantQueryString.go", "api_op_ConstantQueryString_test.go", + "api_op_ContentTypeParameters.go", + "api_op_ContentTypeParameters_test.go", "api_op_DatetimeOffsets.go", "api_op_DatetimeOffsets_test.go", "api_op_EmptyInputAndEmptyOutput.go", diff --git a/internal/protocoltest/restxml/serializers.go b/internal/protocoltest/restxml/serializers.go index e2755f9dc5e..b6c17e5e185 100644 --- a/internal/protocoltest/restxml/serializers.go +++ b/internal/protocoltest/restxml/serializers.go @@ -399,6 +399,91 @@ func awsRestxml_serializeOpHttpBindingsConstantQueryStringInput(v *ConstantQuery return nil } +type awsRestxml_serializeOpContentTypeParameters struct { +} + +func (*awsRestxml_serializeOpContentTypeParameters) ID() string { + return "OperationSerializer" +} + +func (m *awsRestxml_serializeOpContentTypeParameters) 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.(*ContentTypeParametersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ContentTypeParameters") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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/xml") + + xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "ContentTypeParametersInput", + }, + Attr: rootAttr, + } + if err := awsRestxml_serializeOpDocumentContentTypeParametersInput(input, xmlEncoder.RootElement(root)); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + if request, err = request.SetStream(bytes.NewReader(xmlEncoder.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 awsRestxml_serializeOpHttpBindingsContentTypeParametersInput(v *ContentTypeParametersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestxml_serializeOpDocumentContentTypeParametersInput(v *ContentTypeParametersInput, value smithyxml.Value) error { + defer value.Close() + if v.Value != nil { + rootAttr := []smithyxml.Attr{} + root := smithyxml.StartElement{ + Name: smithyxml.Name{ + Local: "value", + }, + Attr: rootAttr, + } + el := value.MemberElement(root) + el.Integer(*v.Value) + } + return nil +} + type awsRestxml_serializeOpDatetimeOffsets struct { } diff --git a/internal/protocoltest/restxml/snapshot_test.go b/internal/protocoltest/restxml/snapshot_test.go index ecc312b99e0..3dcc7a6dbbb 100644 --- a/internal/protocoltest/restxml/snapshot_test.go +++ b/internal/protocoltest/restxml/snapshot_test.go @@ -110,6 +110,18 @@ func TestCheckSnapshot_ConstantQueryString(t *testing.T) { } } +func TestCheckSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DatetimeOffsets(t *testing.T) { svc := New(Options{}) _, err := svc.DatetimeOffsets(context.Background(), nil, func(o *Options) { @@ -841,6 +853,18 @@ func TestUpdateSnapshot_ConstantQueryString(t *testing.T) { } } +func TestUpdateSnapshot_ContentTypeParameters(t *testing.T) { + svc := New(Options{}) + _, err := svc.ContentTypeParameters(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ContentTypeParameters") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DatetimeOffsets(t *testing.T) { svc := New(Options{}) _, err := svc.DatetimeOffsets(context.Background(), nil, func(o *Options) { diff --git a/internal/protocoltest/restxmlwithnamespace/endpoints.go b/internal/protocoltest/restxmlwithnamespace/endpoints.go index 4701af29f4c..7ca18807420 100644 --- a/internal/protocoltest/restxmlwithnamespace/endpoints.go +++ b/internal/protocoltest/restxmlwithnamespace/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_Float16.go b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16.go new file mode 100644 index 00000000000..3afcbdb675d --- /dev/null +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package smithyrpcv2cbor + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) Float16(ctx context.Context, params *Float16Input, optFns ...func(*Options)) (*Float16Output, error) { + if params == nil { + params = &Float16Input{} + } + + result, metadata, err := c.invokeOperation(ctx, "Float16", params, optFns, c.addOperationFloat16Middlewares) + if err != nil { + return nil, err + } + + out := result.(*Float16Output) + out.ResultMetadata = metadata + return out, nil +} + +type Float16Input struct { + noSmithyDocumentSerde +} + +type Float16Output struct { + Value *float64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationFloat16Middlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&smithyRpcv2cbor_serializeOpFloat16{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&smithyRpcv2cbor_deserializeOpFloat16{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "Float16"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opFloat16(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opFloat16(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "Float16", + } +} diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_Float16_test.go b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16_test.go new file mode 100644 index 00000000000..034137cb622 --- /dev/null +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_Float16_test.go @@ -0,0 +1,184 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package smithyrpcv2cbor + +import ( + "bytes" + "context" + "encoding/base64" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytesting "github.com/aws/smithy-go/testing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io/ioutil" + "math" + "net/http" + "testing" +) + +func TestClient_Float16_smithyRpcv2cborDeserialize(t *testing.T) { + cases := map[string]struct { + StatusCode int + Header http.Header + BodyMediaType string + Body []byte + ExpectResult *Float16Output + }{ + // Ensures that clients can correctly parse float16 +Inf. + "RpcV2CborFloat16Inf": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfl8AA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.Inf(1)), + }, + }, + // Ensures that clients can correctly parse float16 -Inf. + "RpcV2CborFloat16NegInf": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfn8AA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.Inf(-1)), + }, + }, + // Ensures that clients can correctly parse float16 NaN with high LSB. + "RpcV2CborFloat16LSBNaN": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfl8AQ==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.NaN()), + }, + }, + // Ensures that clients can correctly parse float16 NaN with high MSB. + "RpcV2CborFloat16MSBNaN": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1Zfl+AA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(math.NaN()), + }, + }, + // Ensures that clients can correctly parse a subnormal float16. + "RpcV2CborFloat16Subnormal": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/cbor"}, + "smithy-protocol": []string{"rpc-v2-cbor"}, + }, + BodyMediaType: "application/cbor", + Body: func() []byte { + p, err := base64.StdEncoding.DecodeString(`oWV2YWx1ZfkAUA==`) + if err != nil { + panic(err) + } + + return p + }(), + ExpectResult: &Float16Output{ + Value: ptr.Float64(4.76837158203125e-6), + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + serverURL := "http://localhost:8888/" + client := New(Options{ + HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { + headers := http.Header{} + for k, vs := range c.Header { + for _, v := range vs { + headers.Add(k, v) + } + } + if len(c.BodyMediaType) != 0 && len(headers.Values("Content-Type")) == 0 { + headers.Set("Content-Type", c.BodyMediaType) + } + response := &http.Response{ + StatusCode: c.StatusCode, + Header: headers, + Request: r, + } + if len(c.Body) != 0 { + response.ContentLength = int64(len(c.Body)) + response.Body = ioutil.NopCloser(bytes.NewReader(c.Body)) + } else { + + response.Body = http.NoBody + } + return response, nil + }), + APIOptions: []func(*middleware.Stack) error{ + func(s *middleware.Stack) error { + s.Finalize.Clear() + s.Initialize.Remove(`OperationInputValidation`) + return nil + }, + }, + EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { + e.URL = serverURL + e.SigningRegion = "us-west-2" + return e, err + }), + Region: "us-west-2", + }) + var params Float16Input + result, err := client.Float16(context.Background(), ¶ms) + if err != nil { + t.Fatalf("expect nil err, got %v", err) + } + if result == nil { + t.Fatalf("expect not nil result") + } + if err := smithytesting.CompareValues(c.ExpectResult, result); err != nil { + t.Errorf("expect c.ExpectResult value match:\n%v", err) + } + }) + } +} diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults_test.go b/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults_test.go index 47e29c9726e..100a7a5c6ab 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults_test.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_OperationWithDefaults_test.go @@ -54,7 +54,7 @@ func TestClient_OperationWithDefaults_smithyRpcv2cborSerialize(t *testing.T) { }, BodyMediaType: "application/cbor", BodyAssert: func(actual io.Reader) error { - return smithytesting.CompareCBOR(actual, `v21kZWZhdWx0U3RyaW5nYmhpbmRlZmF1bHRCb29sZWFu9WtkZWZhdWx0TGlzdIBwZGVmYXVsdFRpbWVzdGFtcMH7AAAAAAAAAABrZGVmYXVsdEJsb2JDYWJja2RlZmF1bHRCeXRlAWxkZWZhdWx0U2hvcnQBbmRlZmF1bHRJbnRlZ2VyCmtkZWZhdWx0TG9uZxhkbGRlZmF1bHRGbG9hdPo/gAAAbWRlZmF1bHREb3VibGX7P/AAAAAAAABqZGVmYXVsdE1hcKBrZGVmYXVsdEVudW1jRk9PbmRlZmF1bHRJbnRFbnVtAWtlbXB0eVN0cmluZ2BsZmFsc2VCb29sZWFu9GllbXB0eUJsb2JAaHplcm9CeXRlAGl6ZXJvU2hvcnQAa3plcm9JbnRlZ2VyAGh6ZXJvTG9uZwBpemVyb0Zsb2F0+gAAAABqemVyb0RvdWJsZfsAAAAAAAAAAP8=`) + return smithytesting.CompareCBOR(actual, `v2hkZWZhdWx0c79tZGVmYXVsdFN0cmluZ2JoaW5kZWZhdWx0Qm9vbGVhbvVrZGVmYXVsdExpc3Sf/3BkZWZhdWx0VGltZXN0YW1wwQBrZGVmYXVsdEJsb2JjYWJja2RlZmF1bHRCeXRlAWxkZWZhdWx0U2hvcnQBbmRlZmF1bHRJbnRlZ2VyCmtkZWZhdWx0TG9uZxhkbGRlZmF1bHRGbG9hdPo/gAAAbWRlZmF1bHREb3VibGX6P4AAAGpkZWZhdWx0TWFwv/9rZGVmYXVsdEVudW1jRk9PbmRlZmF1bHRJbnRFbnVtAWtlbXB0eVN0cmluZ2BsZmFsc2VCb29sZWFu9GllbXB0eUJsb2JgaHplcm9CeXRlAGl6ZXJvU2hvcnQAa3plcm9JbnRlZ2VyAGh6ZXJvTG9uZwBpemVyb0Zsb2F0+gAAAABqemVyb0RvdWJsZfoAAAAA//8=`) }, }, // Client skips top level default values in input. diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps_test.go b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps_test.go index 823305318e2..7de7d5fa5ad 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps_test.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_RpcV2CborDenseMaps_test.go @@ -288,13 +288,16 @@ func TestClient_RpcV2CborDenseMaps_smithyRpcv2cborDeserialize(t *testing.T) { "a", "b", }, - "z": nil, }, }, }, } for name, c := range cases { t.Run(name, func(t *testing.T) { + if name == "RpcV2CborDeserializesDenseSetMapAndSkipsNull" { + t.Skip("disabled test smithy.protocoltests.rpcv2Cbor#RpcV2Protocol smithy.protocoltests.rpcv2Cbor#RpcV2CborDenseMaps") + } + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { diff --git a/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties_test.go index f8826612661..dfe0f8c4567 100644 --- a/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/smithyrpcv2cbor/api_op_SimpleScalarProperties_test.go @@ -42,7 +42,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborSerialize(t *testing.T) { ByteValue: ptr.Int8(5), DoubleValue: ptr.Float64(1.889), FalseBooleanValue: ptr.Bool(false), - FloatValue: ptr.Float32(7.624), + FloatValue: ptr.Float32(7.625), IntegerValue: ptr.Int32(256), LongValue: ptr.Int64(9873), ShortValue: ptr.Int16(9898), @@ -62,7 +62,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborSerialize(t *testing.T) { }, BodyMediaType: "application/cbor", BodyAssert: func(actual io.Reader) error { - return smithytesting.CompareCBOR(actual, `v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==`) + return smithytesting.CompareCBOR(actual, `v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==`) }, }, // RpcV2 Cbor should not serialize null structure values @@ -229,7 +229,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborDeserialize(t *testing.T) }, BodyMediaType: "application/cbor", Body: func() []byte { - p, err := base64.StdEncoding.DecodeString(`v3B0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kDz989saW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb2//`) + p, err := base64.StdEncoding.DecodeString(`v3B0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb2//`) if err != nil { panic(err) } @@ -241,7 +241,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborDeserialize(t *testing.T) FalseBooleanValue: ptr.Bool(false), ByteValue: ptr.Int8(5), DoubleValue: ptr.Float64(1.889), - FloatValue: ptr.Float32(7.624), + FloatValue: ptr.Float32(7.625), IntegerValue: ptr.Int32(256), ShortValue: ptr.Int16(9898), StringValue: ptr.String("simple"), @@ -257,7 +257,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborDeserialize(t *testing.T) }, BodyMediaType: "application/cbor", Body: func() []byte { - p, err := base64.StdEncoding.DecodeString(`qXB0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kDz989saW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb28=`) + p, err := base64.StdEncoding.DecodeString(`qXB0cnVlQm9vbGVhblZhbHVl9XFmYWxzZUJvb2xlYW5WYWx1ZfRpYnl0ZVZhbHVlBWtkb3VibGVWYWx1Zfs//jlYEGJN02pmbG9hdFZhbHVl+kD0AABsaW50ZWdlclZhbHVlGQEAanNob3J0VmFsdWUZJqprc3RyaW5nVmFsdWVmc2ltcGxlaWJsb2JWYWx1ZUNmb28=`) if err != nil { panic(err) } @@ -269,7 +269,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborDeserialize(t *testing.T) FalseBooleanValue: ptr.Bool(false), ByteValue: ptr.Int8(5), DoubleValue: ptr.Float64(1.889), - FloatValue: ptr.Float32(7.624), + FloatValue: ptr.Float32(7.625), IntegerValue: ptr.Int32(256), ShortValue: ptr.Int16(9898), StringValue: ptr.String("simple"), @@ -393,7 +393,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborDeserialize(t *testing.T) }, BodyMediaType: "application/cbor", Body: func() []byte { - p, err := base64.StdEncoding.DecodeString(`v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kDz989rZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==`) + p, err := base64.StdEncoding.DecodeString(`v2lieXRlVmFsdWUFa2RvdWJsZVZhbHVl+z/+OVgQYk3TcWZhbHNlQm9vbGVhblZhbHVl9GpmbG9hdFZhbHVl+kD0AABrZXh0cmFPYmplY3S/c2luZGVmaW5pdGVMZW5ndGhNYXC/a3dpdGhBbkFycmF5nwECA///cWRlZmluaXRlTGVuZ3RoTWFwo3J3aXRoQURlZmluaXRlQXJyYXmDAQIDeB1hbmRTb21lSW5kZWZpbml0ZUxlbmd0aFN0cmluZ3gfdGhhdCBoYXMsIGJlZW4gY2h1bmtlZCBvbiBjb21tYWxub3JtYWxTdHJpbmdjZm9vanNob3J0VmFsdWUZJw9uc29tZU90aGVyRmllbGR2dGhpcyBzaG91bGQgYmUgc2tpcHBlZP9saW50ZWdlclZhbHVlGQEAaWxvbmdWYWx1ZRkmkWpzaG9ydFZhbHVlGSaqa3N0cmluZ1ZhbHVlZnNpbXBsZXB0cnVlQm9vbGVhblZhbHVl9WlibG9iVmFsdWVDZm9v/w==`) if err != nil { panic(err) } @@ -404,7 +404,7 @@ func TestClient_SimpleScalarProperties_smithyRpcv2cborDeserialize(t *testing.T) ByteValue: ptr.Int8(5), DoubleValue: ptr.Float64(1.889), FalseBooleanValue: ptr.Bool(false), - FloatValue: ptr.Float32(7.624), + FloatValue: ptr.Float32(7.625), IntegerValue: ptr.Int32(256), LongValue: ptr.Int64(9873), ShortValue: ptr.Int16(9898), diff --git a/internal/protocoltest/smithyrpcv2cbor/deserializers.go b/internal/protocoltest/smithyrpcv2cbor/deserializers.go index c65c9ce65b5..ed5eac107d3 100644 --- a/internal/protocoltest/smithyrpcv2cbor/deserializers.go +++ b/internal/protocoltest/smithyrpcv2cbor/deserializers.go @@ -69,6 +69,65 @@ func (m *smithyRpcv2cbor_deserializeOpEmptyInputOutput) HandleDeserialize(ctx co return out, metadata, nil } +type smithyRpcv2cbor_deserializeOpFloat16 struct { +} + +func (*smithyRpcv2cbor_deserializeOpFloat16) ID() string { + return "OperationDeserializer" +} + +func (m *smithyRpcv2cbor_deserializeOpFloat16) 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 + } + + resp, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", out.RawResponse) + } + + if resp.Header.Get("smithy-protocol") != "rpc-v2-cbor" { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf( + "unexpected smithy-protocol response header '%s' (HTTP status: %s)", + resp.Header.Get("smithy-protocol"), + resp.Status, + ), + } + } + + if resp.StatusCode != 200 { + return out, metadata, rpc2_deserializeOpErrorFloat16(resp) + } + + payload, err := io.ReadAll(resp.Body) + if err != nil { + return out, metadata, err + } + + if len(payload) == 0 { + out.Result = &Float16Output{} + return out, metadata, nil + } + + cv, err := smithycbor.Decode(payload) + if err != nil { + return out, metadata, err + } + + output, err := deserializeCBOR_Float16Output(cv) + if err != nil { + return out, metadata, err + } + + out.Result = output + + return out, metadata, nil +} + type smithyRpcv2cbor_deserializeOpFractionalSeconds struct { } @@ -836,6 +895,28 @@ func deserializeCBOR_ValidationExceptionFieldList(v smithycbor.Value) ([]types.V return dl, nil } +func deserializeCBOR_Float16Output(v smithycbor.Value) (*Float16Output, error) { + av, ok := v.(smithycbor.Map) + if !ok { + return nil, fmt.Errorf("unexpected value type %T", v) + } + ds := &Float16Output{} + for key, sv := range av { + _, _ = key, sv + if key == "value" { + if _, ok := sv.(*smithycbor.Nil); ok { + continue + } + dv, err := deserializeCBOR_Float64(sv) + if err != nil { + return nil, err + } + ds.Value = ptr.Float64(dv) + } + } + return ds, nil +} + func deserializeCBOR_FractionalSecondsOutput(v smithycbor.Value) (*FractionalSecondsOutput, error) { av, ok := v.(smithycbor.Map) if !ok { @@ -2242,6 +2323,33 @@ func rpc2_deserializeOpErrorEmptyInputOutput(resp *smithyhttp.Response) error { } } +func rpc2_deserializeOpErrorFloat16(resp *smithyhttp.Response) error { + payload, err := io.ReadAll(resp.Body) + if err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("read response body: %w", err)} + } + + typ, msg, v, err := getProtocolErrorInfo(payload) + if err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("get error info: %w", err)} + } + + if len(typ) == 0 { + typ = "UnknownError" + } + if len(msg) == 0 { + msg = "UnknownError" + } + + _ = v + switch string(typ) { + + default: + + return &smithy.GenericAPIError{Code: typ, Message: msg} + } +} + func rpc2_deserializeOpErrorFractionalSeconds(resp *smithyhttp.Response) error { payload, err := io.ReadAll(resp.Body) if err != nil { diff --git a/internal/protocoltest/smithyrpcv2cbor/endpoints.go b/internal/protocoltest/smithyrpcv2cbor/endpoints.go index 3af35b54e3a..a406ebdfb70 100644 --- a/internal/protocoltest/smithyrpcv2cbor/endpoints.go +++ b/internal/protocoltest/smithyrpcv2cbor/endpoints.go @@ -224,6 +224,17 @@ func bindRegion(region string) *string { type EndpointParameters struct { } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/internal/protocoltest/smithyrpcv2cbor/generated.json b/internal/protocoltest/smithyrpcv2cbor/generated.json index 8d3aa7281c9..d6ea27cf2fb 100644 --- a/internal/protocoltest/smithyrpcv2cbor/generated.json +++ b/internal/protocoltest/smithyrpcv2cbor/generated.json @@ -10,6 +10,8 @@ "api_client_test.go", "api_op_EmptyInputOutput.go", "api_op_EmptyInputOutput_test.go", + "api_op_Float16.go", + "api_op_Float16_test.go", "api_op_FractionalSeconds.go", "api_op_FractionalSeconds_test.go", "api_op_GreetingWithErrors.go", diff --git a/internal/protocoltest/smithyrpcv2cbor/serializers.go b/internal/protocoltest/smithyrpcv2cbor/serializers.go index 9838a283191..045e4ba39ca 100644 --- a/internal/protocoltest/smithyrpcv2cbor/serializers.go +++ b/internal/protocoltest/smithyrpcv2cbor/serializers.go @@ -58,6 +58,36 @@ func (m *smithyRpcv2cbor_serializeOpEmptyInputOutput) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } +type smithyRpcv2cbor_serializeOpFloat16 struct { +} + +func (*smithyRpcv2cbor_serializeOpFloat16) ID() string { + return "OperationSerializer" +} + +func (m *smithyRpcv2cbor_serializeOpFloat16) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*Float16Input) + if !ok { + return out, metadata, fmt.Errorf("unexpected input type %T", in.Parameters) + } + _ = input + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + req.Method = http.MethodPost + req.URL.Path = "/service/RpcV2Protocol/operation/Float16" + req.Header.Set("smithy-protocol", "rpc-v2-cbor") + + req.Header.Set("Accept", "application/cbor") + + return next.HandleSerialize(ctx, in) +} + type smithyRpcv2cbor_serializeOpFractionalSeconds struct { } @@ -552,6 +582,12 @@ func serializeCBOR_EmptyInputOutputInput(v *EmptyInputOutputInput) (smithycbor.V return vm, nil } +func serializeCBOR_Float16Input(v *Float16Input) (smithycbor.Value, error) { + vm := smithycbor.Map{} + + return vm, nil +} + func serializeCBOR_FractionalSecondsInput(v *FractionalSecondsInput) (smithycbor.Value, error) { vm := smithycbor.Map{} diff --git a/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go b/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go index 1a1b47bfe57..b9b25ec2973 100644 --- a/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go +++ b/internal/protocoltest/smithyrpcv2cbor/snapshot_test.go @@ -74,6 +74,18 @@ func TestCheckSnapshot_EmptyInputOutput(t *testing.T) { } } +func TestCheckSnapshot_Float16(t *testing.T) { + svc := New(Options{}) + _, err := svc.Float16(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "Float16") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_FractionalSeconds(t *testing.T) { svc := New(Options{}) _, err := svc.FractionalSeconds(context.Background(), nil, func(o *Options) { @@ -217,6 +229,18 @@ func TestUpdateSnapshot_EmptyInputOutput(t *testing.T) { } } +func TestUpdateSnapshot_Float16(t *testing.T) { + svc := New(Options{}) + _, err := svc.Float16(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "Float16") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_FractionalSeconds(t *testing.T) { svc := New(Options{}) _, err := svc.FractionalSeconds(context.Background(), nil, func(o *Options) { diff --git a/service/accessanalyzer/endpoints.go b/service/accessanalyzer/endpoints.go index 3f1076643b1..a02ad77b634 100644 --- a/service/accessanalyzer/endpoints.go +++ b/service/accessanalyzer/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/account/endpoints.go b/service/account/endpoints.go index 5497bcdb9fc..47fe41d0307 100644 --- a/service/account/endpoints.go +++ b/service/account/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/acm/api_op_DescribeCertificate.go b/service/acm/api_op_DescribeCertificate.go index 98710bf03c5..9f779c774a5 100644 --- a/service/acm/api_op_DescribeCertificate.go +++ b/service/acm/api_op_DescribeCertificate.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/acm/endpoints.go b/service/acm/endpoints.go index 886437e2af9..1a839770d2e 100644 --- a/service/acm/endpoints.go +++ b/service/acm/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go b/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go index c40290eeee5..ffa2d3fa390 100644 --- a/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go +++ b/service/acmpca/api_op_DescribeCertificateAuthorityAuditReport.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/acmpca/endpoints.go b/service/acmpca/endpoints.go index ca2ad793108..6c75bd305c2 100644 --- a/service/acmpca/endpoints.go +++ b/service/acmpca/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/amp/api_op_DescribeScraper.go b/service/amp/api_op_DescribeScraper.go index 8ade21d8ec7..4f6901c15bf 100644 --- a/service/amp/api_op_DescribeScraper.go +++ b/service/amp/api_op_DescribeScraper.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/amp/api_op_DescribeWorkspace.go b/service/amp/api_op_DescribeWorkspace.go index bfedf0f5337..a0ba496dbab 100644 --- a/service/amp/api_op_DescribeWorkspace.go +++ b/service/amp/api_op_DescribeWorkspace.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/amp/endpoints.go b/service/amp/endpoints.go index d2ff3f52fca..8ebd7284452 100644 --- a/service/amp/endpoints.go +++ b/service/amp/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/amplify/endpoints.go b/service/amplify/endpoints.go index e79658bcd32..932e35ee2e6 100644 --- a/service/amplify/endpoints.go +++ b/service/amplify/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/amplifybackend/endpoints.go b/service/amplifybackend/endpoints.go index e7abdb96c03..5471e7cdc1e 100644 --- a/service/amplifybackend/endpoints.go +++ b/service/amplifybackend/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/amplifyuibuilder/endpoints.go b/service/amplifyuibuilder/endpoints.go index dcbb79d19f9..d5d76d75760 100644 --- a/service/amplifyuibuilder/endpoints.go +++ b/service/amplifyuibuilder/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/apigateway/endpoints.go b/service/apigateway/endpoints.go index c6b46c38bce..38912c14149 100644 --- a/service/apigateway/endpoints.go +++ b/service/apigateway/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/apigatewaymanagementapi/endpoints.go b/service/apigatewaymanagementapi/endpoints.go index c6f900a4115..858a7ecf817 100644 --- a/service/apigatewaymanagementapi/endpoints.go +++ b/service/apigatewaymanagementapi/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/apigatewayv2/endpoints.go b/service/apigatewayv2/endpoints.go index a6e165e4bbc..c2a29d63f04 100644 --- a/service/apigatewayv2/endpoints.go +++ b/service/apigatewayv2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appconfig/endpoints.go b/service/appconfig/endpoints.go index f73cfee44a9..31beec54ad5 100644 --- a/service/appconfig/endpoints.go +++ b/service/appconfig/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appconfigdata/endpoints.go b/service/appconfigdata/endpoints.go index e0f3fdb2b7c..37f9b3fb9d3 100644 --- a/service/appconfigdata/endpoints.go +++ b/service/appconfigdata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appfabric/endpoints.go b/service/appfabric/endpoints.go index 2147cb66a96..0d30615b487 100644 --- a/service/appfabric/endpoints.go +++ b/service/appfabric/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appflow/endpoints.go b/service/appflow/endpoints.go index cd325aa5db6..adbc9338e5e 100644 --- a/service/appflow/endpoints.go +++ b/service/appflow/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appintegrations/endpoints.go b/service/appintegrations/endpoints.go index 6b68f1151e5..c0f3c24b9b2 100644 --- a/service/appintegrations/endpoints.go +++ b/service/appintegrations/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/applicationautoscaling/endpoints.go b/service/applicationautoscaling/endpoints.go index 90749fbe6fd..0b86cfe34d5 100644 --- a/service/applicationautoscaling/endpoints.go +++ b/service/applicationautoscaling/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/applicationcostprofiler/endpoints.go b/service/applicationcostprofiler/endpoints.go index cb8856c093f..77525cc64b8 100644 --- a/service/applicationcostprofiler/endpoints.go +++ b/service/applicationcostprofiler/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/applicationdiscoveryservice/endpoints.go b/service/applicationdiscoveryservice/endpoints.go index 9f21ad600e8..af451c98f25 100644 --- a/service/applicationdiscoveryservice/endpoints.go +++ b/service/applicationdiscoveryservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/applicationinsights/endpoints.go b/service/applicationinsights/endpoints.go index 6053939ad78..9b2f7d2db06 100644 --- a/service/applicationinsights/endpoints.go +++ b/service/applicationinsights/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/applicationsignals/endpoints.go b/service/applicationsignals/endpoints.go index 7d0379d9479..bf4f5e9ff6d 100644 --- a/service/applicationsignals/endpoints.go +++ b/service/applicationsignals/endpoints.go @@ -271,6 +271,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appmesh/endpoints.go b/service/appmesh/endpoints.go index e70f5718907..848626f1ce6 100644 --- a/service/appmesh/endpoints.go +++ b/service/appmesh/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/apprunner/endpoints.go b/service/apprunner/endpoints.go index f59c751295e..cd0842d0a88 100644 --- a/service/apprunner/endpoints.go +++ b/service/apprunner/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appstream/api_op_DescribeFleets.go b/service/appstream/api_op_DescribeFleets.go index e06dac144b5..6f65f6ad1e7 100644 --- a/service/appstream/api_op_DescribeFleets.go +++ b/service/appstream/api_op_DescribeFleets.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/appstream/endpoints.go b/service/appstream/endpoints.go index aaf99d035d1..510930f9530 100644 --- a/service/appstream/endpoints.go +++ b/service/appstream/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/appsync/endpoints.go b/service/appsync/endpoints.go index d4c209b53c7..ad4098804d8 100644 --- a/service/appsync/endpoints.go +++ b/service/appsync/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/apptest/endpoints.go b/service/apptest/endpoints.go index 1cd636120b0..dbeec97e93f 100644 --- a/service/apptest/endpoints.go +++ b/service/apptest/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/arczonalshift/endpoints.go b/service/arczonalshift/endpoints.go index 3973cf80522..bd33cad6dda 100644 --- a/service/arczonalshift/endpoints.go +++ b/service/arczonalshift/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/artifact/endpoints.go b/service/artifact/endpoints.go index 6dca9f8c35e..9ea20b17b1d 100644 --- a/service/artifact/endpoints.go +++ b/service/artifact/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/athena/endpoints.go b/service/athena/endpoints.go index e139a5a13af..998dcbc56ea 100644 --- a/service/athena/endpoints.go +++ b/service/athena/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/auditmanager/endpoints.go b/service/auditmanager/endpoints.go index 2222c6af478..00fe01d81da 100644 --- a/service/auditmanager/endpoints.go +++ b/service/auditmanager/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/autoscaling/api_op_DescribeAutoScalingGroups.go b/service/autoscaling/api_op_DescribeAutoScalingGroups.go index 7b032b84447..efc690b66be 100644 --- a/service/autoscaling/api_op_DescribeAutoScalingGroups.go +++ b/service/autoscaling/api_op_DescribeAutoScalingGroups.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/autoscaling/endpoints.go b/service/autoscaling/endpoints.go index 2f6c7e264ae..ae86ac0e001 100644 --- a/service/autoscaling/endpoints.go +++ b/service/autoscaling/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/autoscalingplans/endpoints.go b/service/autoscalingplans/endpoints.go index 7e443087421..4ff1a973b52 100644 --- a/service/autoscalingplans/endpoints.go +++ b/service/autoscalingplans/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/b2bi/endpoints.go b/service/b2bi/endpoints.go index 0d2d0f27747..f2f556ed183 100644 --- a/service/b2bi/endpoints.go +++ b/service/b2bi/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/backup/endpoints.go b/service/backup/endpoints.go index dadc096fe78..cbe496f377a 100644 --- a/service/backup/endpoints.go +++ b/service/backup/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/backupgateway/endpoints.go b/service/backupgateway/endpoints.go index c3a26ef2945..ce399655046 100644 --- a/service/backupgateway/endpoints.go +++ b/service/backupgateway/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/batch/endpoints.go b/service/batch/endpoints.go index 4a7a8d14112..17986382dc2 100644 --- a/service/batch/endpoints.go +++ b/service/batch/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/bcmdataexports/endpoints.go b/service/bcmdataexports/endpoints.go index b140fe9a3d0..bfb37bbf57b 100644 --- a/service/bcmdataexports/endpoints.go +++ b/service/bcmdataexports/endpoints.go @@ -272,6 +272,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/bedrock/endpoints.go b/service/bedrock/endpoints.go index 7f1fafdb927..666f2c8ff32 100644 --- a/service/bedrock/endpoints.go +++ b/service/bedrock/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/bedrockagent/endpoints.go b/service/bedrockagent/endpoints.go index e9579b6f91d..fa728153183 100644 --- a/service/bedrockagent/endpoints.go +++ b/service/bedrockagent/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/bedrockagentruntime/endpoints.go b/service/bedrockagentruntime/endpoints.go index 2211253f819..fd412f42f22 100644 --- a/service/bedrockagentruntime/endpoints.go +++ b/service/bedrockagentruntime/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/bedrockruntime/endpoints.go b/service/bedrockruntime/endpoints.go index f7a8277e145..9afc1c821dc 100644 --- a/service/bedrockruntime/endpoints.go +++ b/service/bedrockruntime/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/billingconductor/endpoints.go b/service/billingconductor/endpoints.go index f77b2782a91..90f428c3bef 100644 --- a/service/billingconductor/endpoints.go +++ b/service/billingconductor/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/braket/endpoints.go b/service/braket/endpoints.go index c1bcbd001fb..7f9d5e6d18d 100644 --- a/service/braket/endpoints.go +++ b/service/braket/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/budgets/endpoints.go b/service/budgets/endpoints.go index 657fa10b06b..1ec253508da 100644 --- a/service/budgets/endpoints.go +++ b/service/budgets/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/chatbot/endpoints.go b/service/chatbot/endpoints.go index d9d9417e8a5..b47ae75f909 100644 --- a/service/chatbot/endpoints.go +++ b/service/chatbot/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/chime/endpoints.go b/service/chime/endpoints.go index 18bc753d636..2d6b4cc9fe2 100644 --- a/service/chime/endpoints.go +++ b/service/chime/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/chimesdkidentity/endpoints.go b/service/chimesdkidentity/endpoints.go index 5e092a33d56..0be49afdfa6 100644 --- a/service/chimesdkidentity/endpoints.go +++ b/service/chimesdkidentity/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/chimesdkmediapipelines/endpoints.go b/service/chimesdkmediapipelines/endpoints.go index 400a9836be6..b197cd60762 100644 --- a/service/chimesdkmediapipelines/endpoints.go +++ b/service/chimesdkmediapipelines/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/chimesdkmeetings/endpoints.go b/service/chimesdkmeetings/endpoints.go index 5fcd25fb2c5..30fd7845c59 100644 --- a/service/chimesdkmeetings/endpoints.go +++ b/service/chimesdkmeetings/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/chimesdkmessaging/endpoints.go b/service/chimesdkmessaging/endpoints.go index 9db031675b6..ac62a4583db 100644 --- a/service/chimesdkmessaging/endpoints.go +++ b/service/chimesdkmessaging/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/chimesdkvoice/endpoints.go b/service/chimesdkvoice/endpoints.go index 29ef61eeddf..d4df9cd48d6 100644 --- a/service/chimesdkvoice/endpoints.go +++ b/service/chimesdkvoice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cleanrooms/endpoints.go b/service/cleanrooms/endpoints.go index 47103f8e5d2..e24c6dcdb9a 100644 --- a/service/cleanrooms/endpoints.go +++ b/service/cleanrooms/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cleanroomsml/endpoints.go b/service/cleanroomsml/endpoints.go index f4e57fc40cf..93fa627dc8f 100644 --- a/service/cleanroomsml/endpoints.go +++ b/service/cleanroomsml/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloud9/endpoints.go b/service/cloud9/endpoints.go index 045fc83f03c..ec32d9dc923 100644 --- a/service/cloud9/endpoints.go +++ b/service/cloud9/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudcontrol/api_op_GetResourceRequestStatus.go b/service/cloudcontrol/api_op_GetResourceRequestStatus.go index 72105dcaf82..650b2fd5bca 100644 --- a/service/cloudcontrol/api_op_GetResourceRequestStatus.go +++ b/service/cloudcontrol/api_op_GetResourceRequestStatus.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/cloudcontrol/endpoints.go b/service/cloudcontrol/endpoints.go index a4f9defa460..465cc793e13 100644 --- a/service/cloudcontrol/endpoints.go +++ b/service/cloudcontrol/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/clouddirectory/endpoints.go b/service/clouddirectory/endpoints.go index de57e31adeb..a682ee02d9c 100644 --- a/service/clouddirectory/endpoints.go +++ b/service/clouddirectory/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudformation/api_op_DescribeChangeSet.go b/service/cloudformation/api_op_DescribeChangeSet.go index 9155c1cb888..13a7af18550 100644 --- a/service/cloudformation/api_op_DescribeChangeSet.go +++ b/service/cloudformation/api_op_DescribeChangeSet.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/cloudformation/api_op_DescribeStacks.go b/service/cloudformation/api_op_DescribeStacks.go index 81c57e1011f..8460bb535f7 100644 --- a/service/cloudformation/api_op_DescribeStacks.go +++ b/service/cloudformation/api_op_DescribeStacks.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/cloudformation/api_op_DescribeTypeRegistration.go b/service/cloudformation/api_op_DescribeTypeRegistration.go index c062be6117f..743c9c1d192 100644 --- a/service/cloudformation/api_op_DescribeTypeRegistration.go +++ b/service/cloudformation/api_op_DescribeTypeRegistration.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/cloudformation/endpoints.go b/service/cloudformation/endpoints.go index 778b40c5eda..2f6c06bebf6 100644 --- a/service/cloudformation/endpoints.go +++ b/service/cloudformation/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudfront/api_op_GetDistribution.go b/service/cloudfront/api_op_GetDistribution.go index 06e69175ba5..a3db93281f9 100644 --- a/service/cloudfront/api_op_GetDistribution.go +++ b/service/cloudfront/api_op_GetDistribution.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/cloudfront/api_op_GetInvalidation.go b/service/cloudfront/api_op_GetInvalidation.go index 927ab21affd..08f56300591 100644 --- a/service/cloudfront/api_op_GetInvalidation.go +++ b/service/cloudfront/api_op_GetInvalidation.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/cloudfront/api_op_GetStreamingDistribution.go b/service/cloudfront/api_op_GetStreamingDistribution.go index c9f25e85293..fb8884772d7 100644 --- a/service/cloudfront/api_op_GetStreamingDistribution.go +++ b/service/cloudfront/api_op_GetStreamingDistribution.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/cloudfront/endpoints.go b/service/cloudfront/endpoints.go index 4371fecdc8f..c5ae67460e0 100644 --- a/service/cloudfront/endpoints.go +++ b/service/cloudfront/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go b/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go index b06f30bb4b7..30b14f2a417 100644 --- a/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go +++ b/service/cloudfrontkeyvaluestore/api_op_DeleteKey.go @@ -48,6 +48,7 @@ type DeleteKeyInput struct { } func (in *DeleteKeyInput) bindEndpointParams(p *EndpointParameters) { + p.KvsARN = in.KvsARN } diff --git a/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go b/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go index e2f0ad4ad55..ed095f9aaee 100644 --- a/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go +++ b/service/cloudfrontkeyvaluestore/api_op_DescribeKeyValueStore.go @@ -38,6 +38,7 @@ type DescribeKeyValueStoreInput struct { } func (in *DescribeKeyValueStoreInput) bindEndpointParams(p *EndpointParameters) { + p.KvsARN = in.KvsARN } diff --git a/service/cloudfrontkeyvaluestore/api_op_GetKey.go b/service/cloudfrontkeyvaluestore/api_op_GetKey.go index e1fe1cc4c44..bcd2618f7ab 100644 --- a/service/cloudfrontkeyvaluestore/api_op_GetKey.go +++ b/service/cloudfrontkeyvaluestore/api_op_GetKey.go @@ -42,6 +42,7 @@ type GetKeyInput struct { } func (in *GetKeyInput) bindEndpointParams(p *EndpointParameters) { + p.KvsARN = in.KvsARN } diff --git a/service/cloudfrontkeyvaluestore/api_op_ListKeys.go b/service/cloudfrontkeyvaluestore/api_op_ListKeys.go index c85d6507261..9c86eceeca9 100644 --- a/service/cloudfrontkeyvaluestore/api_op_ListKeys.go +++ b/service/cloudfrontkeyvaluestore/api_op_ListKeys.go @@ -46,6 +46,7 @@ type ListKeysInput struct { } func (in *ListKeysInput) bindEndpointParams(p *EndpointParameters) { + p.KvsARN = in.KvsARN } diff --git a/service/cloudfrontkeyvaluestore/api_op_PutKey.go b/service/cloudfrontkeyvaluestore/api_op_PutKey.go index dc848347ad5..79727336042 100644 --- a/service/cloudfrontkeyvaluestore/api_op_PutKey.go +++ b/service/cloudfrontkeyvaluestore/api_op_PutKey.go @@ -54,6 +54,7 @@ type PutKeyInput struct { } func (in *PutKeyInput) bindEndpointParams(p *EndpointParameters) { + p.KvsARN = in.KvsARN } diff --git a/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go b/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go index 51e73fa304d..f405d69efc1 100644 --- a/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go +++ b/service/cloudfrontkeyvaluestore/api_op_UpdateKeys.go @@ -50,6 +50,7 @@ type UpdateKeysInput struct { } func (in *UpdateKeysInput) bindEndpointParams(p *EndpointParameters) { + p.KvsARN = in.KvsARN } diff --git a/service/cloudfrontkeyvaluestore/endpoints.go b/service/cloudfrontkeyvaluestore/endpoints.go index a7b15a46cd6..e729c73a35e 100644 --- a/service/cloudfrontkeyvaluestore/endpoints.go +++ b/service/cloudfrontkeyvaluestore/endpoints.go @@ -278,6 +278,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudhsm/endpoints.go b/service/cloudhsm/endpoints.go index de2773b1fb9..549db83d41f 100644 --- a/service/cloudhsm/endpoints.go +++ b/service/cloudhsm/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudhsmv2/endpoints.go b/service/cloudhsmv2/endpoints.go index f66ca040036..2b73c575b37 100644 --- a/service/cloudhsmv2/endpoints.go +++ b/service/cloudhsmv2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudsearch/endpoints.go b/service/cloudsearch/endpoints.go index e0237318a90..cfeed2121bf 100644 --- a/service/cloudsearch/endpoints.go +++ b/service/cloudsearch/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudsearchdomain/endpoints.go b/service/cloudsearchdomain/endpoints.go index 5e4f02ae2f2..1473e43912b 100644 --- a/service/cloudsearchdomain/endpoints.go +++ b/service/cloudsearchdomain/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudtrail/endpoints.go b/service/cloudtrail/endpoints.go index 692e540dbe6..7cf5edcb85c 100644 --- a/service/cloudtrail/endpoints.go +++ b/service/cloudtrail/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudtraildata/endpoints.go b/service/cloudtraildata/endpoints.go index abd5f5fa4a1..f7e6e6d1be9 100644 --- a/service/cloudtraildata/endpoints.go +++ b/service/cloudtraildata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudwatch/api_op_DescribeAlarms.go b/service/cloudwatch/api_op_DescribeAlarms.go index 156626d92b9..73b8634627d 100644 --- a/service/cloudwatch/api_op_DescribeAlarms.go +++ b/service/cloudwatch/api_op_DescribeAlarms.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/cloudwatch/endpoints.go b/service/cloudwatch/endpoints.go index 08dd647d025..bef96efb1fa 100644 --- a/service/cloudwatch/endpoints.go +++ b/service/cloudwatch/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudwatchevents/endpoints.go b/service/cloudwatchevents/endpoints.go index 2d82495d647..6c9a0c57e27 100644 --- a/service/cloudwatchevents/endpoints.go +++ b/service/cloudwatchevents/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cloudwatchlogs/endpoints.go b/service/cloudwatchlogs/endpoints.go index 80a1f29e4c9..38333211ae5 100644 --- a/service/cloudwatchlogs/endpoints.go +++ b/service/cloudwatchlogs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codeartifact/endpoints.go b/service/codeartifact/endpoints.go index 8f950756fa6..8b8100b7d0b 100644 --- a/service/codeartifact/endpoints.go +++ b/service/codeartifact/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codebuild/endpoints.go b/service/codebuild/endpoints.go index 518fdb76cf4..bf27d510eb1 100644 --- a/service/codebuild/endpoints.go +++ b/service/codebuild/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codecatalyst/endpoints.go b/service/codecatalyst/endpoints.go index cc1f516511a..6c294a40ce1 100644 --- a/service/codecatalyst/endpoints.go +++ b/service/codecatalyst/endpoints.go @@ -271,6 +271,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codecommit/endpoints.go b/service/codecommit/endpoints.go index 9faf83de065..a419d5ce10b 100644 --- a/service/codecommit/endpoints.go +++ b/service/codecommit/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codeconnections/endpoints.go b/service/codeconnections/endpoints.go index 9a003054afc..560c752bc6a 100644 --- a/service/codeconnections/endpoints.go +++ b/service/codeconnections/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codedeploy/api_op_GetDeployment.go b/service/codedeploy/api_op_GetDeployment.go index 6c63ba11986..40803aa6cd3 100644 --- a/service/codedeploy/api_op_GetDeployment.go +++ b/service/codedeploy/api_op_GetDeployment.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/codedeploy/endpoints.go b/service/codedeploy/endpoints.go index 5fa23eeb6f9..d74cf30a50e 100644 --- a/service/codedeploy/endpoints.go +++ b/service/codedeploy/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codeguruprofiler/endpoints.go b/service/codeguruprofiler/endpoints.go index b15a610476b..2cd6cce431b 100644 --- a/service/codeguruprofiler/endpoints.go +++ b/service/codeguruprofiler/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codegurureviewer/api_op_DescribeCodeReview.go b/service/codegurureviewer/api_op_DescribeCodeReview.go index d4a1192e0df..36b71458c9f 100644 --- a/service/codegurureviewer/api_op_DescribeCodeReview.go +++ b/service/codegurureviewer/api_op_DescribeCodeReview.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go b/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go index fe46e042e2b..4a6563bf4d9 100644 --- a/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go +++ b/service/codegurureviewer/api_op_DescribeRepositoryAssociation.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/codegurureviewer/endpoints.go b/service/codegurureviewer/endpoints.go index e14c0ee93b7..fcc543fa0cf 100644 --- a/service/codegurureviewer/endpoints.go +++ b/service/codegurureviewer/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codegurusecurity/endpoints.go b/service/codegurusecurity/endpoints.go index 3c724d208d8..e4a19745c01 100644 --- a/service/codegurusecurity/endpoints.go +++ b/service/codegurusecurity/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codepipeline/endpoints.go b/service/codepipeline/endpoints.go index 2a97f2eb228..e1bc3edd5a8 100644 --- a/service/codepipeline/endpoints.go +++ b/service/codepipeline/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codestar/endpoints.go b/service/codestar/endpoints.go index be5404378aa..6667374f378 100644 --- a/service/codestar/endpoints.go +++ b/service/codestar/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codestarconnections/endpoints.go b/service/codestarconnections/endpoints.go index 5a482e4b130..8a16ac8c5ea 100644 --- a/service/codestarconnections/endpoints.go +++ b/service/codestarconnections/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/codestarnotifications/endpoints.go b/service/codestarnotifications/endpoints.go index 18fe8c87cdc..0ef2d204ec9 100644 --- a/service/codestarnotifications/endpoints.go +++ b/service/codestarnotifications/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cognitoidentity/endpoints.go b/service/cognitoidentity/endpoints.go index 781724af5bb..68d2fb1c1fb 100644 --- a/service/cognitoidentity/endpoints.go +++ b/service/cognitoidentity/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cognitoidentityprovider/endpoints.go b/service/cognitoidentityprovider/endpoints.go index a41610da4b6..e8be3cfb9b4 100644 --- a/service/cognitoidentityprovider/endpoints.go +++ b/service/cognitoidentityprovider/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/cognitosync/endpoints.go b/service/cognitosync/endpoints.go index 173290fa16e..b9e6bbe63d9 100644 --- a/service/cognitosync/endpoints.go +++ b/service/cognitosync/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/comprehend/endpoints.go b/service/comprehend/endpoints.go index c4cc1fc55ba..e015232f68d 100644 --- a/service/comprehend/endpoints.go +++ b/service/comprehend/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/comprehendmedical/endpoints.go b/service/comprehendmedical/endpoints.go index a5ec954140f..6d74ee3bffb 100644 --- a/service/comprehendmedical/endpoints.go +++ b/service/comprehendmedical/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/computeoptimizer/endpoints.go b/service/computeoptimizer/endpoints.go index 0bf8dba7eb1..ab90ee1f32d 100644 --- a/service/computeoptimizer/endpoints.go +++ b/service/computeoptimizer/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/configservice/endpoints.go b/service/configservice/endpoints.go index 409bc5c4e5a..8ccf30f2343 100644 --- a/service/configservice/endpoints.go +++ b/service/configservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/connect/endpoints.go b/service/connect/endpoints.go index 253e106b855..802f92d363b 100644 --- a/service/connect/endpoints.go +++ b/service/connect/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/connectcampaigns/endpoints.go b/service/connectcampaigns/endpoints.go index cf935df0e83..243085a0724 100644 --- a/service/connectcampaigns/endpoints.go +++ b/service/connectcampaigns/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/connectcases/endpoints.go b/service/connectcases/endpoints.go index cdfc0ddd76b..fc278aea389 100644 --- a/service/connectcases/endpoints.go +++ b/service/connectcases/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/connectcontactlens/endpoints.go b/service/connectcontactlens/endpoints.go index 73f38aba307..974505502e9 100644 --- a/service/connectcontactlens/endpoints.go +++ b/service/connectcontactlens/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/connectparticipant/endpoints.go b/service/connectparticipant/endpoints.go index f1e0bce4914..2ebaf944e07 100644 --- a/service/connectparticipant/endpoints.go +++ b/service/connectparticipant/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/controlcatalog/endpoints.go b/service/controlcatalog/endpoints.go index 3dd3f2199d9..10e7c345cae 100644 --- a/service/controlcatalog/endpoints.go +++ b/service/controlcatalog/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/controltower/endpoints.go b/service/controltower/endpoints.go index e2edd21cb64..e34f9233b9f 100644 --- a/service/controltower/endpoints.go +++ b/service/controltower/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/costandusagereportservice/endpoints.go b/service/costandusagereportservice/endpoints.go index 7fe02958386..a98810c664a 100644 --- a/service/costandusagereportservice/endpoints.go +++ b/service/costandusagereportservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/costexplorer/endpoints.go b/service/costexplorer/endpoints.go index ee68f26264a..82b0fc57ff8 100644 --- a/service/costexplorer/endpoints.go +++ b/service/costexplorer/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/costoptimizationhub/endpoints.go b/service/costoptimizationhub/endpoints.go index 368c1000da9..9807a97bee6 100644 --- a/service/costoptimizationhub/endpoints.go +++ b/service/costoptimizationhub/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/customerprofiles/endpoints.go b/service/customerprofiles/endpoints.go index faec5598c52..e545d4a2e60 100644 --- a/service/customerprofiles/endpoints.go +++ b/service/customerprofiles/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/databasemigrationservice/api_op_DescribeConnections.go b/service/databasemigrationservice/api_op_DescribeConnections.go index 2922ed7706f..6592b7808d2 100644 --- a/service/databasemigrationservice/api_op_DescribeConnections.go +++ b/service/databasemigrationservice/api_op_DescribeConnections.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/databasemigrationservice/api_op_DescribeEndpoints.go b/service/databasemigrationservice/api_op_DescribeEndpoints.go index 91633795c59..d0771ff9f97 100644 --- a/service/databasemigrationservice/api_op_DescribeEndpoints.go +++ b/service/databasemigrationservice/api_op_DescribeEndpoints.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go index c5d67cfa97e..c75f34357e6 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationInstances.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationInstances.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go index 3f16601ddd7..2ed68e14a6a 100644 --- a/service/databasemigrationservice/api_op_DescribeReplicationTasks.go +++ b/service/databasemigrationservice/api_op_DescribeReplicationTasks.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/databasemigrationservice/endpoints.go b/service/databasemigrationservice/endpoints.go index be02ef63b15..d72a8a0daee 100644 --- a/service/databasemigrationservice/endpoints.go +++ b/service/databasemigrationservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/databrew/endpoints.go b/service/databrew/endpoints.go index ab837aeb8cb..518bf78c805 100644 --- a/service/databrew/endpoints.go +++ b/service/databrew/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/dataexchange/endpoints.go b/service/dataexchange/endpoints.go index ad5f41d7fcf..1d756a45080 100644 --- a/service/dataexchange/endpoints.go +++ b/service/dataexchange/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/datapipeline/endpoints.go b/service/datapipeline/endpoints.go index d95c4d77c08..cd9ddf8fae9 100644 --- a/service/datapipeline/endpoints.go +++ b/service/datapipeline/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/datasync/endpoints.go b/service/datasync/endpoints.go index fb1caaaddf9..fd85291c0df 100644 --- a/service/datasync/endpoints.go +++ b/service/datasync/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/datazone/endpoints.go b/service/datazone/endpoints.go index 71070899ee3..9e444fe1052 100644 --- a/service/datazone/endpoints.go +++ b/service/datazone/endpoints.go @@ -271,6 +271,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/dax/endpoints.go b/service/dax/endpoints.go index 5ea9807ca14..8a104f192d7 100644 --- a/service/dax/endpoints.go +++ b/service/dax/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/deadline/api_op_GetFleet.go b/service/deadline/api_op_GetFleet.go index 3844db669d6..5b78dea997d 100644 --- a/service/deadline/api_op_GetFleet.go +++ b/service/deadline/api_op_GetFleet.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/deadline/api_op_GetJob.go b/service/deadline/api_op_GetJob.go index 5a5484cfc20..85325ed5dbd 100644 --- a/service/deadline/api_op_GetJob.go +++ b/service/deadline/api_op_GetJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/deadline/api_op_GetLicenseEndpoint.go b/service/deadline/api_op_GetLicenseEndpoint.go index 4c9b67bcf86..51af8236714 100644 --- a/service/deadline/api_op_GetLicenseEndpoint.go +++ b/service/deadline/api_op_GetLicenseEndpoint.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/deadline/api_op_GetQueue.go b/service/deadline/api_op_GetQueue.go index 9de0b57909a..75fdb938c05 100644 --- a/service/deadline/api_op_GetQueue.go +++ b/service/deadline/api_op_GetQueue.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/deadline/api_op_GetQueueFleetAssociation.go b/service/deadline/api_op_GetQueueFleetAssociation.go index 227204ee338..410ddd2ea18 100644 --- a/service/deadline/api_op_GetQueueFleetAssociation.go +++ b/service/deadline/api_op_GetQueueFleetAssociation.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/deadline/endpoints.go b/service/deadline/endpoints.go index a96a53f07f6..01dcd5c0b0a 100644 --- a/service/deadline/endpoints.go +++ b/service/deadline/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/detective/endpoints.go b/service/detective/endpoints.go index 95fdabb946e..efbf739e89a 100644 --- a/service/detective/endpoints.go +++ b/service/detective/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/devicefarm/endpoints.go b/service/devicefarm/endpoints.go index 34566d47204..ef0614700d4 100644 --- a/service/devicefarm/endpoints.go +++ b/service/devicefarm/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/devopsguru/endpoints.go b/service/devopsguru/endpoints.go index ba785a82880..24431d0d697 100644 --- a/service/devopsguru/endpoints.go +++ b/service/devopsguru/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/directconnect/endpoints.go b/service/directconnect/endpoints.go index 896ecacb3c0..d9d19a0ac0b 100644 --- a/service/directconnect/endpoints.go +++ b/service/directconnect/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/directoryservice/endpoints.go b/service/directoryservice/endpoints.go index aba169d4e9c..f5ba2a249ac 100644 --- a/service/directoryservice/endpoints.go +++ b/service/directoryservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/dlm/endpoints.go b/service/dlm/endpoints.go index 59d4d381a5c..44113272c7e 100644 --- a/service/dlm/endpoints.go +++ b/service/dlm/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/docdb/api_op_DescribeDBInstances.go b/service/docdb/api_op_DescribeDBInstances.go index 862a4361483..79075f25ba6 100644 --- a/service/docdb/api_op_DescribeDBInstances.go +++ b/service/docdb/api_op_DescribeDBInstances.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/docdb/endpoints.go b/service/docdb/endpoints.go index 34ff8e8569e..23c0b7925c5 100644 --- a/service/docdb/endpoints.go +++ b/service/docdb/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/docdbelastic/endpoints.go b/service/docdbelastic/endpoints.go index ed18fa003ed..736adb1e0d7 100644 --- a/service/docdbelastic/endpoints.go +++ b/service/docdbelastic/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/drs/endpoints.go b/service/drs/endpoints.go index e44112efa19..ec47bba3ba4 100644 --- a/service/drs/endpoints.go +++ b/service/drs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/dynamodb/api_op_DescribeTable.go b/service/dynamodb/api_op_DescribeTable.go index 80548a34284..b89eade6d88 100644 --- a/service/dynamodb/api_op_DescribeTable.go +++ b/service/dynamodb/api_op_DescribeTable.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/dynamodb/endpoints.go b/service/dynamodb/endpoints.go index 7818b10f42b..5c948ddff7b 100644 --- a/service/dynamodb/endpoints.go +++ b/service/dynamodb/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/dynamodbstreams/endpoints.go b/service/dynamodbstreams/endpoints.go index 51b844acdae..abcfa771087 100644 --- a/service/dynamodbstreams/endpoints.go +++ b/service/dynamodbstreams/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ebs/endpoints.go b/service/ebs/endpoints.go index 6cdc9bd5af3..4953ef503ec 100644 --- a/service/ebs/endpoints.go +++ b/service/ebs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ec2/api_op_DescribeBundleTasks.go b/service/ec2/api_op_DescribeBundleTasks.go index 1d00d35eabe..add19eb359e 100644 --- a/service/ec2/api_op_DescribeBundleTasks.go +++ b/service/ec2/api_op_DescribeBundleTasks.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeConversionTasks.go b/service/ec2/api_op_DescribeConversionTasks.go index 1d38f4f5583..999edbf9b82 100644 --- a/service/ec2/api_op_DescribeConversionTasks.go +++ b/service/ec2/api_op_DescribeConversionTasks.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeCustomerGateways.go b/service/ec2/api_op_DescribeCustomerGateways.go index 9eba2b49408..01832f8b033 100644 --- a/service/ec2/api_op_DescribeCustomerGateways.go +++ b/service/ec2/api_op_DescribeCustomerGateways.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeExportTasks.go b/service/ec2/api_op_DescribeExportTasks.go index 9c2507f9027..877fd6d4fc7 100644 --- a/service/ec2/api_op_DescribeExportTasks.go +++ b/service/ec2/api_op_DescribeExportTasks.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeImages.go b/service/ec2/api_op_DescribeImages.go index 4baf9749886..8cf41e5544e 100644 --- a/service/ec2/api_op_DescribeImages.go +++ b/service/ec2/api_op_DescribeImages.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/ec2/api_op_DescribeImportSnapshotTasks.go b/service/ec2/api_op_DescribeImportSnapshotTasks.go index c27ce77c77e..725d6e5b8ea 100644 --- a/service/ec2/api_op_DescribeImportSnapshotTasks.go +++ b/service/ec2/api_op_DescribeImportSnapshotTasks.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeInstanceStatus.go b/service/ec2/api_op_DescribeInstanceStatus.go index 0f453aa136a..5a8b702ec39 100644 --- a/service/ec2/api_op_DescribeInstanceStatus.go +++ b/service/ec2/api_op_DescribeInstanceStatus.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeInstances.go b/service/ec2/api_op_DescribeInstances.go index 25edbc5b003..7558f676efd 100644 --- a/service/ec2/api_op_DescribeInstances.go +++ b/service/ec2/api_op_DescribeInstances.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/ec2/api_op_DescribeInternetGateways.go b/service/ec2/api_op_DescribeInternetGateways.go index 2080e42bda0..e18a82f276d 100644 --- a/service/ec2/api_op_DescribeInternetGateways.go +++ b/service/ec2/api_op_DescribeInternetGateways.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/ec2/api_op_DescribeKeyPairs.go b/service/ec2/api_op_DescribeKeyPairs.go index 2abccade17c..bc44cc7ffb0 100644 --- a/service/ec2/api_op_DescribeKeyPairs.go +++ b/service/ec2/api_op_DescribeKeyPairs.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/ec2/api_op_DescribeNatGateways.go b/service/ec2/api_op_DescribeNatGateways.go index c99fb7fabff..d641696f485 100644 --- a/service/ec2/api_op_DescribeNatGateways.go +++ b/service/ec2/api_op_DescribeNatGateways.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeNetworkInterfaces.go b/service/ec2/api_op_DescribeNetworkInterfaces.go index 5a0bf337f32..e1fe76cfb7e 100644 --- a/service/ec2/api_op_DescribeNetworkInterfaces.go +++ b/service/ec2/api_op_DescribeNetworkInterfaces.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeSecurityGroups.go b/service/ec2/api_op_DescribeSecurityGroups.go index 06a2d96c6c5..38e78e1464b 100644 --- a/service/ec2/api_op_DescribeSecurityGroups.go +++ b/service/ec2/api_op_DescribeSecurityGroups.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/ec2/api_op_DescribeSnapshots.go b/service/ec2/api_op_DescribeSnapshots.go index c6c9971ee82..890ed6cee74 100644 --- a/service/ec2/api_op_DescribeSnapshots.go +++ b/service/ec2/api_op_DescribeSnapshots.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeSpotInstanceRequests.go b/service/ec2/api_op_DescribeSpotInstanceRequests.go index 8345d3bd593..69b672acdde 100644 --- a/service/ec2/api_op_DescribeSpotInstanceRequests.go +++ b/service/ec2/api_op_DescribeSpotInstanceRequests.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeStoreImageTasks.go b/service/ec2/api_op_DescribeStoreImageTasks.go index f7cc0b3f749..e7c2547b224 100644 --- a/service/ec2/api_op_DescribeStoreImageTasks.go +++ b/service/ec2/api_op_DescribeStoreImageTasks.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeSubnets.go b/service/ec2/api_op_DescribeSubnets.go index 921f4e5d7ca..978ecb97799 100644 --- a/service/ec2/api_op_DescribeSubnets.go +++ b/service/ec2/api_op_DescribeSubnets.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeVolumes.go b/service/ec2/api_op_DescribeVolumes.go index 294a4dfc661..4689460a825 100644 --- a/service/ec2/api_op_DescribeVolumes.go +++ b/service/ec2/api_op_DescribeVolumes.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeVpcPeeringConnections.go b/service/ec2/api_op_DescribeVpcPeeringConnections.go index 3289c357e95..3f9ad7b0379 100644 --- a/service/ec2/api_op_DescribeVpcPeeringConnections.go +++ b/service/ec2/api_op_DescribeVpcPeeringConnections.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeVpcs.go b/service/ec2/api_op_DescribeVpcs.go index 86a0cda2cea..e8145f4f92e 100644 --- a/service/ec2/api_op_DescribeVpcs.go +++ b/service/ec2/api_op_DescribeVpcs.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_DescribeVpnConnections.go b/service/ec2/api_op_DescribeVpnConnections.go index 0615a33dd49..f6c4f0bde07 100644 --- a/service/ec2/api_op_DescribeVpnConnections.go +++ b/service/ec2/api_op_DescribeVpnConnections.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ec2/api_op_GetPasswordData.go b/service/ec2/api_op_GetPasswordData.go index 7d296b07f04..2a4f65eeae4 100644 --- a/service/ec2/api_op_GetPasswordData.go +++ b/service/ec2/api_op_GetPasswordData.go @@ -10,7 +10,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/ec2/endpoints.go b/service/ec2/endpoints.go index a87566a917e..9d4e7790339 100644 --- a/service/ec2/endpoints.go +++ b/service/ec2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ec2instanceconnect/endpoints.go b/service/ec2instanceconnect/endpoints.go index 25271d1b990..43c83bcddbc 100644 --- a/service/ec2instanceconnect/endpoints.go +++ b/service/ec2instanceconnect/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ecr/api_op_DescribeImageScanFindings.go b/service/ecr/api_op_DescribeImageScanFindings.go index ad68b261288..69de9993838 100644 --- a/service/ecr/api_op_DescribeImageScanFindings.go +++ b/service/ecr/api_op_DescribeImageScanFindings.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ecr/api_op_GetLifecyclePolicyPreview.go b/service/ecr/api_op_GetLifecyclePolicyPreview.go index f05612814dd..4e6f11bcadf 100644 --- a/service/ecr/api_op_GetLifecyclePolicyPreview.go +++ b/service/ecr/api_op_GetLifecyclePolicyPreview.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ecr/endpoints.go b/service/ecr/endpoints.go index 541c50c7bd0..fb6b29025c4 100644 --- a/service/ecr/endpoints.go +++ b/service/ecr/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ecrpublic/endpoints.go b/service/ecrpublic/endpoints.go index 53d2051d3fa..24b045c963a 100644 --- a/service/ecrpublic/endpoints.go +++ b/service/ecrpublic/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ecs/api_op_DescribeServices.go b/service/ecs/api_op_DescribeServices.go index 8d6a8a5f6f3..73c2b677e3b 100644 --- a/service/ecs/api_op_DescribeServices.go +++ b/service/ecs/api_op_DescribeServices.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/ecs/api_op_DescribeTasks.go b/service/ecs/api_op_DescribeTasks.go index ce9a080694e..910507ed558 100644 --- a/service/ecs/api_op_DescribeTasks.go +++ b/service/ecs/api_op_DescribeTasks.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ecs/endpoints.go b/service/ecs/endpoints.go index 542352e8028..998f4b3b1fb 100644 --- a/service/ecs/endpoints.go +++ b/service/ecs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/efs/endpoints.go b/service/efs/endpoints.go index 1e8794a88ea..9585ce31f99 100644 --- a/service/efs/endpoints.go +++ b/service/efs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/eks/api_op_DescribeAddon.go b/service/eks/api_op_DescribeAddon.go index e3316a5efa2..19d3d99c987 100644 --- a/service/eks/api_op_DescribeAddon.go +++ b/service/eks/api_op_DescribeAddon.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/eks/api_op_DescribeCluster.go b/service/eks/api_op_DescribeCluster.go index ec8bb7ca80f..cbd7b9233c5 100644 --- a/service/eks/api_op_DescribeCluster.go +++ b/service/eks/api_op_DescribeCluster.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/eks/api_op_DescribeFargateProfile.go b/service/eks/api_op_DescribeFargateProfile.go index 5ff5f326d69..d282d968607 100644 --- a/service/eks/api_op_DescribeFargateProfile.go +++ b/service/eks/api_op_DescribeFargateProfile.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/eks/api_op_DescribeNodegroup.go b/service/eks/api_op_DescribeNodegroup.go index 95fc495fc57..71aec277c76 100644 --- a/service/eks/api_op_DescribeNodegroup.go +++ b/service/eks/api_op_DescribeNodegroup.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/eks/endpoints.go b/service/eks/endpoints.go index 6ac37cc34bb..e72653dc9b1 100644 --- a/service/eks/endpoints.go +++ b/service/eks/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/eksauth/endpoints.go b/service/eksauth/endpoints.go index fb3bb2a7146..c282480d844 100644 --- a/service/eksauth/endpoints.go +++ b/service/eksauth/endpoints.go @@ -271,6 +271,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/elasticache/api_op_DescribeCacheClusters.go b/service/elasticache/api_op_DescribeCacheClusters.go index 22b3962abb1..0c27314c5c9 100644 --- a/service/elasticache/api_op_DescribeCacheClusters.go +++ b/service/elasticache/api_op_DescribeCacheClusters.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/elasticache/api_op_DescribeReplicationGroups.go b/service/elasticache/api_op_DescribeReplicationGroups.go index caafb6a0642..a7d1c31a7ad 100644 --- a/service/elasticache/api_op_DescribeReplicationGroups.go +++ b/service/elasticache/api_op_DescribeReplicationGroups.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/elasticache/endpoints.go b/service/elasticache/endpoints.go index c468e6092c7..5f58177aa82 100644 --- a/service/elasticache/endpoints.go +++ b/service/elasticache/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/elasticbeanstalk/api_op_DescribeEnvironments.go b/service/elasticbeanstalk/api_op_DescribeEnvironments.go index 93b251b1698..b5fb87779f0 100644 --- a/service/elasticbeanstalk/api_op_DescribeEnvironments.go +++ b/service/elasticbeanstalk/api_op_DescribeEnvironments.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/elasticbeanstalk/endpoints.go b/service/elasticbeanstalk/endpoints.go index 2f922b43e9c..28cdb31d196 100644 --- a/service/elasticbeanstalk/endpoints.go +++ b/service/elasticbeanstalk/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/elasticinference/endpoints.go b/service/elasticinference/endpoints.go index 3987cf38abe..17c82f6a961 100644 --- a/service/elasticinference/endpoints.go +++ b/service/elasticinference/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go b/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go index 377539ee9dd..055955a179f 100644 --- a/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go +++ b/service/elasticloadbalancing/api_op_DescribeInstanceHealth.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/elasticloadbalancing/endpoints.go b/service/elasticloadbalancing/endpoints.go index 00f99c90eb1..962002737ea 100644 --- a/service/elasticloadbalancing/endpoints.go +++ b/service/elasticloadbalancing/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go index 49e94ee9d51..e341ebcfe74 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go +++ b/service/elasticloadbalancingv2/api_op_DescribeLoadBalancers.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go b/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go index 6a7b80a0297..aa389a03c6f 100644 --- a/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go +++ b/service/elasticloadbalancingv2/api_op_DescribeTargetHealth.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/elasticloadbalancingv2/endpoints.go b/service/elasticloadbalancingv2/endpoints.go index b0571a210ac..2ba80039c5d 100644 --- a/service/elasticloadbalancingv2/endpoints.go +++ b/service/elasticloadbalancingv2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/elasticsearchservice/endpoints.go b/service/elasticsearchservice/endpoints.go index b4bb68d1079..d813004e8dd 100644 --- a/service/elasticsearchservice/endpoints.go +++ b/service/elasticsearchservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/elastictranscoder/api_op_ReadJob.go b/service/elastictranscoder/api_op_ReadJob.go index 3bc6ef67636..8682a10903e 100644 --- a/service/elastictranscoder/api_op_ReadJob.go +++ b/service/elastictranscoder/api_op_ReadJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/elastictranscoder/endpoints.go b/service/elastictranscoder/endpoints.go index f59809187d9..85836b684b3 100644 --- a/service/elastictranscoder/endpoints.go +++ b/service/elastictranscoder/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/emr/api_op_DescribeCluster.go b/service/emr/api_op_DescribeCluster.go index 77312a7e422..50997ed6ba7 100644 --- a/service/emr/api_op_DescribeCluster.go +++ b/service/emr/api_op_DescribeCluster.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/emr/api_op_DescribeStep.go b/service/emr/api_op_DescribeStep.go index 322d54812bf..a5c7851d08b 100644 --- a/service/emr/api_op_DescribeStep.go +++ b/service/emr/api_op_DescribeStep.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/emr/endpoints.go b/service/emr/endpoints.go index 1dcf04b3974..149efa391cb 100644 --- a/service/emr/endpoints.go +++ b/service/emr/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/emrcontainers/endpoints.go b/service/emrcontainers/endpoints.go index acdbb9d8b84..7595a9cc0fd 100644 --- a/service/emrcontainers/endpoints.go +++ b/service/emrcontainers/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/emrserverless/endpoints.go b/service/emrserverless/endpoints.go index e7c5087b5fd..b4bbc0ef9ce 100644 --- a/service/emrserverless/endpoints.go +++ b/service/emrserverless/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/entityresolution/endpoints.go b/service/entityresolution/endpoints.go index c260ef19bae..df9d903e4bd 100644 --- a/service/entityresolution/endpoints.go +++ b/service/entityresolution/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/eventbridge/api_op_PutEvents.go b/service/eventbridge/api_op_PutEvents.go index 1285f6c5e79..d1f7c17302b 100644 --- a/service/eventbridge/api_op_PutEvents.go +++ b/service/eventbridge/api_op_PutEvents.go @@ -61,6 +61,7 @@ type PutEventsInput struct { } func (in *PutEventsInput) bindEndpointParams(p *EndpointParameters) { + p.EndpointId = in.EndpointId } diff --git a/service/eventbridge/endpoints.go b/service/eventbridge/endpoints.go index 22d96fbfb56..adec4990ad0 100644 --- a/service/eventbridge/endpoints.go +++ b/service/eventbridge/endpoints.go @@ -295,6 +295,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/evidently/endpoints.go b/service/evidently/endpoints.go index 6cf349ba1d8..80d45e3880c 100644 --- a/service/evidently/endpoints.go +++ b/service/evidently/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/finspace/endpoints.go b/service/finspace/endpoints.go index 62a3612bc47..87607b1fdf7 100644 --- a/service/finspace/endpoints.go +++ b/service/finspace/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/finspacedata/endpoints.go b/service/finspacedata/endpoints.go index 245040e66b6..7ef5c59fadb 100644 --- a/service/finspacedata/endpoints.go +++ b/service/finspacedata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/firehose/endpoints.go b/service/firehose/endpoints.go index d7bcb77229a..d04b3b8ff39 100644 --- a/service/firehose/endpoints.go +++ b/service/firehose/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/fis/endpoints.go b/service/fis/endpoints.go index 951c6223c53..47d82cf739a 100644 --- a/service/fis/endpoints.go +++ b/service/fis/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/fms/endpoints.go b/service/fms/endpoints.go index 23b942cc0cd..5357820d46d 100644 --- a/service/fms/endpoints.go +++ b/service/fms/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/forecast/endpoints.go b/service/forecast/endpoints.go index 28f465fb642..a631d75f77c 100644 --- a/service/forecast/endpoints.go +++ b/service/forecast/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/forecastquery/endpoints.go b/service/forecastquery/endpoints.go index 1944b45022d..cb5d1682d5a 100644 --- a/service/forecastquery/endpoints.go +++ b/service/forecastquery/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/frauddetector/endpoints.go b/service/frauddetector/endpoints.go index 2d6bf64c834..937bad0c1f0 100644 --- a/service/frauddetector/endpoints.go +++ b/service/frauddetector/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/freetier/endpoints.go b/service/freetier/endpoints.go index 290a841c477..98102a647ac 100644 --- a/service/freetier/endpoints.go +++ b/service/freetier/endpoints.go @@ -272,6 +272,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/fsx/endpoints.go b/service/fsx/endpoints.go index 15e3af3f934..7a41e4d02ed 100644 --- a/service/fsx/endpoints.go +++ b/service/fsx/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/gamelift/endpoints.go b/service/gamelift/endpoints.go index 2cc6f82c950..ace1c5af715 100644 --- a/service/gamelift/endpoints.go +++ b/service/gamelift/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/glacier/endpoints.go b/service/glacier/endpoints.go index ed666cc58fc..cb740a47a3f 100644 --- a/service/glacier/endpoints.go +++ b/service/glacier/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/globalaccelerator/endpoints.go b/service/globalaccelerator/endpoints.go index cff87d17e37..4a82467ae5d 100644 --- a/service/globalaccelerator/endpoints.go +++ b/service/globalaccelerator/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/glue/endpoints.go b/service/glue/endpoints.go index 91aae743390..3a0660b8ba9 100644 --- a/service/glue/endpoints.go +++ b/service/glue/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/grafana/endpoints.go b/service/grafana/endpoints.go index 8410938b88c..8e18dec87a7 100644 --- a/service/grafana/endpoints.go +++ b/service/grafana/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/greengrass/endpoints.go b/service/greengrass/endpoints.go index 4a7c15eaaa2..a7c3d2b285f 100644 --- a/service/greengrass/endpoints.go +++ b/service/greengrass/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/greengrassv2/endpoints.go b/service/greengrassv2/endpoints.go index dc16f4a1c03..472f07c9a8e 100644 --- a/service/greengrassv2/endpoints.go +++ b/service/greengrassv2/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/groundstation/api_op_DescribeContact.go b/service/groundstation/api_op_DescribeContact.go index c59cfe77f4f..feba15f49ba 100644 --- a/service/groundstation/api_op_DescribeContact.go +++ b/service/groundstation/api_op_DescribeContact.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/groundstation/endpoints.go b/service/groundstation/endpoints.go index bfc65fc6ecd..0af59622ff3 100644 --- a/service/groundstation/endpoints.go +++ b/service/groundstation/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/guardduty/endpoints.go b/service/guardduty/endpoints.go index 93b0f97f49c..23df3bcb844 100644 --- a/service/guardduty/endpoints.go +++ b/service/guardduty/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/health/endpoints.go b/service/health/endpoints.go index 4244741fa86..9918cdd6407 100644 --- a/service/health/endpoints.go +++ b/service/health/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/healthlake/endpoints.go b/service/healthlake/endpoints.go index 24da6b1f2c9..da2a31b7a95 100644 --- a/service/healthlake/endpoints.go +++ b/service/healthlake/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iam/endpoints.go b/service/iam/endpoints.go index f68e5dd1a11..3c0775b82ca 100644 --- a/service/iam/endpoints.go +++ b/service/iam/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/identitystore/endpoints.go b/service/identitystore/endpoints.go index 5b741d9d702..d1557935383 100644 --- a/service/identitystore/endpoints.go +++ b/service/identitystore/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/imagebuilder/endpoints.go b/service/imagebuilder/endpoints.go index 43a9089f9a1..f9fcc8d1152 100644 --- a/service/imagebuilder/endpoints.go +++ b/service/imagebuilder/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/inspector/endpoints.go b/service/inspector/endpoints.go index ee1242577cf..20c086a0534 100644 --- a/service/inspector/endpoints.go +++ b/service/inspector/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/inspector2/endpoints.go b/service/inspector2/endpoints.go index bedec69e900..d131a9189bf 100644 --- a/service/inspector2/endpoints.go +++ b/service/inspector2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/inspectorscan/endpoints.go b/service/inspectorscan/endpoints.go index 976c173ee23..4994930872d 100644 --- a/service/inspectorscan/endpoints.go +++ b/service/inspectorscan/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/internal/integrationtest/go.mod b/service/internal/integrationtest/go.mod index 0f4272339a4..5ce42187606 100644 --- a/service/internal/integrationtest/go.mod +++ b/service/internal/integrationtest/go.mod @@ -246,8 +246,6 @@ replace github.com/aws/aws-sdk-go-v2/service/marketplacecommerceanalytics => ../ replace github.com/aws/aws-sdk-go-v2/service/neptune => ../../../service/neptune/ -replace github.com/aws/aws-sdk-go-v2/service/opsworks => ../../../service/opsworks/ - replace github.com/aws/aws-sdk-go-v2/service/pinpointemail => ../../../service/pinpointemail/ replace github.com/aws/aws-sdk-go-v2/service/polly => ../../../service/polly/ diff --git a/service/internetmonitor/endpoints.go b/service/internetmonitor/endpoints.go index 0c7232813b3..429779cfaa8 100644 --- a/service/internetmonitor/endpoints.go +++ b/service/internetmonitor/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iot/endpoints.go b/service/iot/endpoints.go index 5af34bfea92..431cee144ba 100644 --- a/service/iot/endpoints.go +++ b/service/iot/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iot1clickdevicesservice/endpoints.go b/service/iot1clickdevicesservice/endpoints.go index ee79d4fb33e..1c0fdf04d78 100644 --- a/service/iot1clickdevicesservice/endpoints.go +++ b/service/iot1clickdevicesservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iot1clickprojects/endpoints.go b/service/iot1clickprojects/endpoints.go index 5e687f9115c..07ff126de97 100644 --- a/service/iot1clickprojects/endpoints.go +++ b/service/iot1clickprojects/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotanalytics/endpoints.go b/service/iotanalytics/endpoints.go index 567100fcae5..9ee636e6ccd 100644 --- a/service/iotanalytics/endpoints.go +++ b/service/iotanalytics/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotdataplane/endpoints.go b/service/iotdataplane/endpoints.go index e4f9a260716..85c1a52c5e9 100644 --- a/service/iotdataplane/endpoints.go +++ b/service/iotdataplane/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotdeviceadvisor/endpoints.go b/service/iotdeviceadvisor/endpoints.go index 84b2c2a2bf4..cc6b493c142 100644 --- a/service/iotdeviceadvisor/endpoints.go +++ b/service/iotdeviceadvisor/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotevents/endpoints.go b/service/iotevents/endpoints.go index 45d9ce721b4..ed26e14c263 100644 --- a/service/iotevents/endpoints.go +++ b/service/iotevents/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ioteventsdata/endpoints.go b/service/ioteventsdata/endpoints.go index 15a7a587c7a..122778f8da0 100644 --- a/service/ioteventsdata/endpoints.go +++ b/service/ioteventsdata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotfleethub/endpoints.go b/service/iotfleethub/endpoints.go index 63248c88099..51e7147ece4 100644 --- a/service/iotfleethub/endpoints.go +++ b/service/iotfleethub/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotfleetwise/endpoints.go b/service/iotfleetwise/endpoints.go index 87aa38af63c..a9bf72f21ed 100644 --- a/service/iotfleetwise/endpoints.go +++ b/service/iotfleetwise/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotjobsdataplane/endpoints.go b/service/iotjobsdataplane/endpoints.go index 4934deecf6a..da22790e5de 100644 --- a/service/iotjobsdataplane/endpoints.go +++ b/service/iotjobsdataplane/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotsecuretunneling/endpoints.go b/service/iotsecuretunneling/endpoints.go index 98c0fc301ae..ed10107506d 100644 --- a/service/iotsecuretunneling/endpoints.go +++ b/service/iotsecuretunneling/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotsitewise/api_op_DescribeAsset.go b/service/iotsitewise/api_op_DescribeAsset.go index 46a3483701a..cfd059c6189 100644 --- a/service/iotsitewise/api_op_DescribeAsset.go +++ b/service/iotsitewise/api_op_DescribeAsset.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/iotsitewise/api_op_DescribeAssetModel.go b/service/iotsitewise/api_op_DescribeAssetModel.go index fa632d6157b..d192224ef2f 100644 --- a/service/iotsitewise/api_op_DescribeAssetModel.go +++ b/service/iotsitewise/api_op_DescribeAssetModel.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/iotsitewise/api_op_DescribePortal.go b/service/iotsitewise/api_op_DescribePortal.go index 97a6d90d4f7..78382c59bf5 100644 --- a/service/iotsitewise/api_op_DescribePortal.go +++ b/service/iotsitewise/api_op_DescribePortal.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/iotsitewise/endpoints.go b/service/iotsitewise/endpoints.go index 9ab284198be..2dac9e9a274 100644 --- a/service/iotsitewise/endpoints.go +++ b/service/iotsitewise/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotthingsgraph/endpoints.go b/service/iotthingsgraph/endpoints.go index 08fa5aa36f6..7631daa2f1f 100644 --- a/service/iotthingsgraph/endpoints.go +++ b/service/iotthingsgraph/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iottwinmaker/endpoints.go b/service/iottwinmaker/endpoints.go index 0b97249c5d4..b5cf875a14a 100644 --- a/service/iottwinmaker/endpoints.go +++ b/service/iottwinmaker/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/iotwireless/endpoints.go b/service/iotwireless/endpoints.go index e2ac08e2dd8..1e55ff17b4b 100644 --- a/service/iotwireless/endpoints.go +++ b/service/iotwireless/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ivs/endpoints.go b/service/ivs/endpoints.go index 9d1191a376a..cfe13c81861 100644 --- a/service/ivs/endpoints.go +++ b/service/ivs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ivschat/endpoints.go b/service/ivschat/endpoints.go index af1fd07c031..c58881975be 100644 --- a/service/ivschat/endpoints.go +++ b/service/ivschat/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ivsrealtime/endpoints.go b/service/ivsrealtime/endpoints.go index 32c873bac48..ad2fa1e17d0 100644 --- a/service/ivsrealtime/endpoints.go +++ b/service/ivsrealtime/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kafka/endpoints.go b/service/kafka/endpoints.go index e94ea087d4f..72e2076922b 100644 --- a/service/kafka/endpoints.go +++ b/service/kafka/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kafkaconnect/endpoints.go b/service/kafkaconnect/endpoints.go index e154ec60692..3315b130613 100644 --- a/service/kafkaconnect/endpoints.go +++ b/service/kafkaconnect/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kendra/endpoints.go b/service/kendra/endpoints.go index 1d5b150caca..bec9a621095 100644 --- a/service/kendra/endpoints.go +++ b/service/kendra/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kendraranking/endpoints.go b/service/kendraranking/endpoints.go index 65820d639b5..345a1dbf8e3 100644 --- a/service/kendraranking/endpoints.go +++ b/service/kendraranking/endpoints.go @@ -271,6 +271,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/keyspaces/endpoints.go b/service/keyspaces/endpoints.go index 10e4bced82c..ad1df9eab04 100644 --- a/service/keyspaces/endpoints.go +++ b/service/keyspaces/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesis/api_op_AddTagsToStream.go b/service/kinesis/api_op_AddTagsToStream.go index 5667f9d31f9..486523c3950 100644 --- a/service/kinesis/api_op_AddTagsToStream.go +++ b/service/kinesis/api_op_AddTagsToStream.go @@ -55,6 +55,7 @@ type AddTagsToStreamInput struct { } func (in *AddTagsToStreamInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go b/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go index 719ee2d4be1..d421520cde8 100644 --- a/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go +++ b/service/kinesis/api_op_DecreaseStreamRetentionPeriod.go @@ -56,6 +56,7 @@ type DecreaseStreamRetentionPeriodInput struct { } func (in *DecreaseStreamRetentionPeriodInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_DeleteResourcePolicy.go b/service/kinesis/api_op_DeleteResourcePolicy.go index 272d04a41e5..8ebb05c470a 100644 --- a/service/kinesis/api_op_DeleteResourcePolicy.go +++ b/service/kinesis/api_op_DeleteResourcePolicy.go @@ -44,6 +44,7 @@ type DeleteResourcePolicyInput struct { } func (in *DeleteResourcePolicyInput) bindEndpointParams(p *EndpointParameters) { + p.ResourceARN = in.ResourceARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_DeleteStream.go b/service/kinesis/api_op_DeleteStream.go index d24f33dac3e..59546447005 100644 --- a/service/kinesis/api_op_DeleteStream.go +++ b/service/kinesis/api_op_DeleteStream.go @@ -68,6 +68,7 @@ type DeleteStreamInput struct { } func (in *DeleteStreamInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_DeregisterStreamConsumer.go b/service/kinesis/api_op_DeregisterStreamConsumer.go index edf6f8ccb92..6aaf4834cfc 100644 --- a/service/kinesis/api_op_DeregisterStreamConsumer.go +++ b/service/kinesis/api_op_DeregisterStreamConsumer.go @@ -57,6 +57,7 @@ type DeregisterStreamConsumerInput struct { } func (in *DeregisterStreamConsumerInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.ConsumerARN = in.ConsumerARN p.OperationType = ptr.String("control") diff --git a/service/kinesis/api_op_DescribeStream.go b/service/kinesis/api_op_DescribeStream.go index ed2f6d5a196..b7b8ea41c03 100644 --- a/service/kinesis/api_op_DescribeStream.go +++ b/service/kinesis/api_op_DescribeStream.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) @@ -87,6 +87,7 @@ type DescribeStreamInput struct { } func (in *DescribeStreamInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_DescribeStreamConsumer.go b/service/kinesis/api_op_DescribeStreamConsumer.go index ff01564fedd..384b0b00104 100644 --- a/service/kinesis/api_op_DescribeStreamConsumer.go +++ b/service/kinesis/api_op_DescribeStreamConsumer.go @@ -57,6 +57,7 @@ type DescribeStreamConsumerInput struct { } func (in *DescribeStreamConsumerInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.ConsumerARN = in.ConsumerARN p.OperationType = ptr.String("control") diff --git a/service/kinesis/api_op_DescribeStreamSummary.go b/service/kinesis/api_op_DescribeStreamSummary.go index 84e1891c5b2..ae9bb977f73 100644 --- a/service/kinesis/api_op_DescribeStreamSummary.go +++ b/service/kinesis/api_op_DescribeStreamSummary.go @@ -51,6 +51,7 @@ type DescribeStreamSummaryInput struct { } func (in *DescribeStreamSummaryInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_DisableEnhancedMonitoring.go b/service/kinesis/api_op_DisableEnhancedMonitoring.go index acb590be095..4d3c8a3cd72 100644 --- a/service/kinesis/api_op_DisableEnhancedMonitoring.go +++ b/service/kinesis/api_op_DisableEnhancedMonitoring.go @@ -73,6 +73,7 @@ type DisableEnhancedMonitoringInput struct { } func (in *DisableEnhancedMonitoringInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_EnableEnhancedMonitoring.go b/service/kinesis/api_op_EnableEnhancedMonitoring.go index 0ce5810582a..3dc3d780c93 100644 --- a/service/kinesis/api_op_EnableEnhancedMonitoring.go +++ b/service/kinesis/api_op_EnableEnhancedMonitoring.go @@ -73,6 +73,7 @@ type EnableEnhancedMonitoringInput struct { } func (in *EnableEnhancedMonitoringInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_GetRecords.go b/service/kinesis/api_op_GetRecords.go index 44684ab323a..2a3bd737e2e 100644 --- a/service/kinesis/api_op_GetRecords.go +++ b/service/kinesis/api_op_GetRecords.go @@ -114,6 +114,7 @@ type GetRecordsInput struct { } func (in *GetRecordsInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("data") } diff --git a/service/kinesis/api_op_GetResourcePolicy.go b/service/kinesis/api_op_GetResourcePolicy.go index 52cc5a20a83..06a9f3b4676 100644 --- a/service/kinesis/api_op_GetResourcePolicy.go +++ b/service/kinesis/api_op_GetResourcePolicy.go @@ -44,6 +44,7 @@ type GetResourcePolicyInput struct { } func (in *GetResourcePolicyInput) bindEndpointParams(p *EndpointParameters) { + p.ResourceARN = in.ResourceARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_GetShardIterator.go b/service/kinesis/api_op_GetShardIterator.go index 796a38f6a79..db5051950d1 100644 --- a/service/kinesis/api_op_GetShardIterator.go +++ b/service/kinesis/api_op_GetShardIterator.go @@ -123,6 +123,7 @@ type GetShardIteratorInput struct { } func (in *GetShardIteratorInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("data") } diff --git a/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go b/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go index 1fc0e6fb911..9882f320265 100644 --- a/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go +++ b/service/kinesis/api_op_IncreaseStreamRetentionPeriod.go @@ -60,6 +60,7 @@ type IncreaseStreamRetentionPeriodInput struct { } func (in *IncreaseStreamRetentionPeriodInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_ListShards.go b/service/kinesis/api_op_ListShards.go index 226cfea2bd3..3a995c84a82 100644 --- a/service/kinesis/api_op_ListShards.go +++ b/service/kinesis/api_op_ListShards.go @@ -128,6 +128,7 @@ type ListShardsInput struct { } func (in *ListShardsInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_ListStreamConsumers.go b/service/kinesis/api_op_ListStreamConsumers.go index 5220eb46170..5f2eb9dfd98 100644 --- a/service/kinesis/api_op_ListStreamConsumers.go +++ b/service/kinesis/api_op_ListStreamConsumers.go @@ -83,6 +83,7 @@ type ListStreamConsumersInput struct { } func (in *ListStreamConsumersInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_ListTagsForStream.go b/service/kinesis/api_op_ListTagsForStream.go index 32b46c852ba..4e8e60c7b17 100644 --- a/service/kinesis/api_op_ListTagsForStream.go +++ b/service/kinesis/api_op_ListTagsForStream.go @@ -55,6 +55,7 @@ type ListTagsForStreamInput struct { } func (in *ListTagsForStreamInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_MergeShards.go b/service/kinesis/api_op_MergeShards.go index ac82d5b57af..380ca612037 100644 --- a/service/kinesis/api_op_MergeShards.go +++ b/service/kinesis/api_op_MergeShards.go @@ -91,6 +91,7 @@ type MergeShardsInput struct { } func (in *MergeShardsInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_PutRecord.go b/service/kinesis/api_op_PutRecord.go index 6a2faff5db1..eb2c63ec8bf 100644 --- a/service/kinesis/api_op_PutRecord.go +++ b/service/kinesis/api_op_PutRecord.go @@ -119,6 +119,7 @@ type PutRecordInput struct { } func (in *PutRecordInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("data") } diff --git a/service/kinesis/api_op_PutRecords.go b/service/kinesis/api_op_PutRecords.go index 2bb2cd092a3..73dc2f258c8 100644 --- a/service/kinesis/api_op_PutRecords.go +++ b/service/kinesis/api_op_PutRecords.go @@ -115,6 +115,7 @@ type PutRecordsInput struct { } func (in *PutRecordsInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("data") } diff --git a/service/kinesis/api_op_PutResourcePolicy.go b/service/kinesis/api_op_PutResourcePolicy.go index 566648ca3f5..3c50531704d 100644 --- a/service/kinesis/api_op_PutResourcePolicy.go +++ b/service/kinesis/api_op_PutResourcePolicy.go @@ -62,6 +62,7 @@ type PutResourcePolicyInput struct { } func (in *PutResourcePolicyInput) bindEndpointParams(p *EndpointParameters) { + p.ResourceARN = in.ResourceARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_RegisterStreamConsumer.go b/service/kinesis/api_op_RegisterStreamConsumer.go index 72d5b36b40f..6ef47480aa2 100644 --- a/service/kinesis/api_op_RegisterStreamConsumer.go +++ b/service/kinesis/api_op_RegisterStreamConsumer.go @@ -63,6 +63,7 @@ type RegisterStreamConsumerInput struct { } func (in *RegisterStreamConsumerInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_RemoveTagsFromStream.go b/service/kinesis/api_op_RemoveTagsFromStream.go index 33f59007932..16948a3923c 100644 --- a/service/kinesis/api_op_RemoveTagsFromStream.go +++ b/service/kinesis/api_op_RemoveTagsFromStream.go @@ -54,6 +54,7 @@ type RemoveTagsFromStreamInput struct { } func (in *RemoveTagsFromStreamInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_SplitShard.go b/service/kinesis/api_op_SplitShard.go index c9619e577a8..47f5bd06625 100644 --- a/service/kinesis/api_op_SplitShard.go +++ b/service/kinesis/api_op_SplitShard.go @@ -105,6 +105,7 @@ type SplitShardInput struct { } func (in *SplitShardInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_StartStreamEncryption.go b/service/kinesis/api_op_StartStreamEncryption.go index d8b2c0148eb..4542d94346a 100644 --- a/service/kinesis/api_op_StartStreamEncryption.go +++ b/service/kinesis/api_op_StartStreamEncryption.go @@ -86,6 +86,7 @@ type StartStreamEncryptionInput struct { } func (in *StartStreamEncryptionInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_StopStreamEncryption.go b/service/kinesis/api_op_StopStreamEncryption.go index 58af4cf628a..fd38cbab2bf 100644 --- a/service/kinesis/api_op_StopStreamEncryption.go +++ b/service/kinesis/api_op_StopStreamEncryption.go @@ -86,6 +86,7 @@ type StopStreamEncryptionInput struct { } func (in *StopStreamEncryptionInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_SubscribeToShard.go b/service/kinesis/api_op_SubscribeToShard.go index efaf86709fc..1b3767b33c1 100644 --- a/service/kinesis/api_op_SubscribeToShard.go +++ b/service/kinesis/api_op_SubscribeToShard.go @@ -75,6 +75,7 @@ type SubscribeToShardInput struct { } func (in *SubscribeToShardInput) bindEndpointParams(p *EndpointParameters) { + p.ConsumerARN = in.ConsumerARN p.OperationType = ptr.String("data") } diff --git a/service/kinesis/api_op_UpdateShardCount.go b/service/kinesis/api_op_UpdateShardCount.go index b2de4f3674f..63c991c6ffe 100644 --- a/service/kinesis/api_op_UpdateShardCount.go +++ b/service/kinesis/api_op_UpdateShardCount.go @@ -110,6 +110,7 @@ type UpdateShardCountInput struct { } func (in *UpdateShardCountInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/api_op_UpdateStreamMode.go b/service/kinesis/api_op_UpdateStreamMode.go index a78ac98a678..b932f3d1225 100644 --- a/service/kinesis/api_op_UpdateStreamMode.go +++ b/service/kinesis/api_op_UpdateStreamMode.go @@ -49,6 +49,7 @@ type UpdateStreamModeInput struct { } func (in *UpdateStreamModeInput) bindEndpointParams(p *EndpointParameters) { + p.StreamARN = in.StreamARN p.OperationType = ptr.String("control") } diff --git a/service/kinesis/endpoints.go b/service/kinesis/endpoints.go index c2d7349457c..fc5e425ded5 100644 --- a/service/kinesis/endpoints.go +++ b/service/kinesis/endpoints.go @@ -310,6 +310,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesisanalytics/endpoints.go b/service/kinesisanalytics/endpoints.go index 1765dc6b045..fe06a009a51 100644 --- a/service/kinesisanalytics/endpoints.go +++ b/service/kinesisanalytics/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesisanalyticsv2/endpoints.go b/service/kinesisanalyticsv2/endpoints.go index 658afc3210c..ba71afe3606 100644 --- a/service/kinesisanalyticsv2/endpoints.go +++ b/service/kinesisanalyticsv2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesisvideo/endpoints.go b/service/kinesisvideo/endpoints.go index 4d062c06d45..ee00c8f4122 100644 --- a/service/kinesisvideo/endpoints.go +++ b/service/kinesisvideo/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesisvideoarchivedmedia/endpoints.go b/service/kinesisvideoarchivedmedia/endpoints.go index 9931b53a3d1..afcd0e892e0 100644 --- a/service/kinesisvideoarchivedmedia/endpoints.go +++ b/service/kinesisvideoarchivedmedia/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesisvideomedia/endpoints.go b/service/kinesisvideomedia/endpoints.go index faa61946b09..8fd51fb5115 100644 --- a/service/kinesisvideomedia/endpoints.go +++ b/service/kinesisvideomedia/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesisvideosignaling/endpoints.go b/service/kinesisvideosignaling/endpoints.go index e1a3b0c46d5..e3d85c3df70 100644 --- a/service/kinesisvideosignaling/endpoints.go +++ b/service/kinesisvideosignaling/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kinesisvideowebrtcstorage/endpoints.go b/service/kinesisvideowebrtcstorage/endpoints.go index d1762b1cfb3..838b7a0d73e 100644 --- a/service/kinesisvideowebrtcstorage/endpoints.go +++ b/service/kinesisvideowebrtcstorage/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/kms/endpoints.go b/service/kms/endpoints.go index 7804877f7c0..57bd194b65a 100644 --- a/service/kms/endpoints.go +++ b/service/kms/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lakeformation/endpoints.go b/service/lakeformation/endpoints.go index 765cdfcf816..e0673ee9b4b 100644 --- a/service/lakeformation/endpoints.go +++ b/service/lakeformation/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lambda/api_op_GetFunction.go b/service/lambda/api_op_GetFunction.go index 121d2cbb24b..cc09bb9e18a 100644 --- a/service/lambda/api_op_GetFunction.go +++ b/service/lambda/api_op_GetFunction.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lambda/api_op_GetFunctionConfiguration.go b/service/lambda/api_op_GetFunctionConfiguration.go index 60112aa8075..44fc9ddc5f2 100644 --- a/service/lambda/api_op_GetFunctionConfiguration.go +++ b/service/lambda/api_op_GetFunctionConfiguration.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lambda/endpoints.go b/service/lambda/endpoints.go index 36fec5de576..d6bc0c43676 100644 --- a/service/lambda/endpoints.go +++ b/service/lambda/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/launchwizard/endpoints.go b/service/launchwizard/endpoints.go index fb4d7717e86..bb2cac27967 100644 --- a/service/launchwizard/endpoints.go +++ b/service/launchwizard/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lexmodelbuildingservice/endpoints.go b/service/lexmodelbuildingservice/endpoints.go index 5bdc4b444f9..5d113bfb1e4 100644 --- a/service/lexmodelbuildingservice/endpoints.go +++ b/service/lexmodelbuildingservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lexmodelsv2/api_op_DescribeBot.go b/service/lexmodelsv2/api_op_DescribeBot.go index 4668a410ecd..e08b05b1574 100644 --- a/service/lexmodelsv2/api_op_DescribeBot.go +++ b/service/lexmodelsv2/api_op_DescribeBot.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lexmodelsv2/api_op_DescribeBotAlias.go b/service/lexmodelsv2/api_op_DescribeBotAlias.go index f7f9d96fa2b..da2dab4c004 100644 --- a/service/lexmodelsv2/api_op_DescribeBotAlias.go +++ b/service/lexmodelsv2/api_op_DescribeBotAlias.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lexmodelsv2/api_op_DescribeBotLocale.go b/service/lexmodelsv2/api_op_DescribeBotLocale.go index 9ba90b935ec..b038c1ad649 100644 --- a/service/lexmodelsv2/api_op_DescribeBotLocale.go +++ b/service/lexmodelsv2/api_op_DescribeBotLocale.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lexmodelsv2/api_op_DescribeBotVersion.go b/service/lexmodelsv2/api_op_DescribeBotVersion.go index c8d6341d69f..a84f62ead89 100644 --- a/service/lexmodelsv2/api_op_DescribeBotVersion.go +++ b/service/lexmodelsv2/api_op_DescribeBotVersion.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lexmodelsv2/api_op_DescribeExport.go b/service/lexmodelsv2/api_op_DescribeExport.go index 2b89c8a306b..1c70f826180 100644 --- a/service/lexmodelsv2/api_op_DescribeExport.go +++ b/service/lexmodelsv2/api_op_DescribeExport.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lexmodelsv2/api_op_DescribeImport.go b/service/lexmodelsv2/api_op_DescribeImport.go index 1441c411087..491a30a13a5 100644 --- a/service/lexmodelsv2/api_op_DescribeImport.go +++ b/service/lexmodelsv2/api_op_DescribeImport.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/lexmodelsv2/endpoints.go b/service/lexmodelsv2/endpoints.go index b081e9c334f..6966bb4a1d6 100644 --- a/service/lexmodelsv2/endpoints.go +++ b/service/lexmodelsv2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lexruntimeservice/endpoints.go b/service/lexruntimeservice/endpoints.go index 70feaec4210..f310c8d20ad 100644 --- a/service/lexruntimeservice/endpoints.go +++ b/service/lexruntimeservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lexruntimev2/endpoints.go b/service/lexruntimev2/endpoints.go index 210bc86fc60..83efbfec9c8 100644 --- a/service/lexruntimev2/endpoints.go +++ b/service/lexruntimev2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/licensemanager/endpoints.go b/service/licensemanager/endpoints.go index b21329d747b..587c3599eca 100644 --- a/service/licensemanager/endpoints.go +++ b/service/licensemanager/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/licensemanagerlinuxsubscriptions/endpoints.go b/service/licensemanagerlinuxsubscriptions/endpoints.go index 93773cfab09..e20361fcb39 100644 --- a/service/licensemanagerlinuxsubscriptions/endpoints.go +++ b/service/licensemanagerlinuxsubscriptions/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/licensemanagerusersubscriptions/endpoints.go b/service/licensemanagerusersubscriptions/endpoints.go index b39958c5a92..a54ffe565cd 100644 --- a/service/licensemanagerusersubscriptions/endpoints.go +++ b/service/licensemanagerusersubscriptions/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lightsail/endpoints.go b/service/lightsail/endpoints.go index 57812ffe592..f2662ab32d5 100644 --- a/service/lightsail/endpoints.go +++ b/service/lightsail/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/location/endpoints.go b/service/location/endpoints.go index c5ce20ed6b7..67c2e51c9a4 100644 --- a/service/location/endpoints.go +++ b/service/location/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lookoutequipment/endpoints.go b/service/lookoutequipment/endpoints.go index bb7b5b24b0a..34c8a6d4d11 100644 --- a/service/lookoutequipment/endpoints.go +++ b/service/lookoutequipment/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lookoutmetrics/endpoints.go b/service/lookoutmetrics/endpoints.go index 91dad1c9389..b586c871691 100644 --- a/service/lookoutmetrics/endpoints.go +++ b/service/lookoutmetrics/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/lookoutvision/endpoints.go b/service/lookoutvision/endpoints.go index 6670f50f824..fae3350c684 100644 --- a/service/lookoutvision/endpoints.go +++ b/service/lookoutvision/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/m2/endpoints.go b/service/m2/endpoints.go index fea4d0cb39c..9218b177905 100644 --- a/service/m2/endpoints.go +++ b/service/m2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/machinelearning/api_op_DescribeBatchPredictions.go b/service/machinelearning/api_op_DescribeBatchPredictions.go index 1c88b38553b..f2db05c1ac3 100644 --- a/service/machinelearning/api_op_DescribeBatchPredictions.go +++ b/service/machinelearning/api_op_DescribeBatchPredictions.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/machinelearning/api_op_DescribeDataSources.go b/service/machinelearning/api_op_DescribeDataSources.go index b50b96e5807..239fd87e417 100644 --- a/service/machinelearning/api_op_DescribeDataSources.go +++ b/service/machinelearning/api_op_DescribeDataSources.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/machinelearning/api_op_DescribeEvaluations.go b/service/machinelearning/api_op_DescribeEvaluations.go index 83570d23101..92560f2a677 100644 --- a/service/machinelearning/api_op_DescribeEvaluations.go +++ b/service/machinelearning/api_op_DescribeEvaluations.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/machinelearning/api_op_DescribeMLModels.go b/service/machinelearning/api_op_DescribeMLModels.go index 6746baeae6c..402fdcbed5a 100644 --- a/service/machinelearning/api_op_DescribeMLModels.go +++ b/service/machinelearning/api_op_DescribeMLModels.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/machinelearning/endpoints.go b/service/machinelearning/endpoints.go index 2c6955ee324..be81c93396a 100644 --- a/service/machinelearning/endpoints.go +++ b/service/machinelearning/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/macie2/api_op_GetSensitiveDataOccurrences.go b/service/macie2/api_op_GetSensitiveDataOccurrences.go index ec6618735ba..6994ee14d7b 100644 --- a/service/macie2/api_op_GetSensitiveDataOccurrences.go +++ b/service/macie2/api_op_GetSensitiveDataOccurrences.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/macie2/endpoints.go b/service/macie2/endpoints.go index 0e6a228b794..427ea2c3f7e 100644 --- a/service/macie2/endpoints.go +++ b/service/macie2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mailmanager/endpoints.go b/service/mailmanager/endpoints.go index ab0e543c181..caa11285fca 100644 --- a/service/mailmanager/endpoints.go +++ b/service/mailmanager/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/managedblockchain/endpoints.go b/service/managedblockchain/endpoints.go index c5621429127..b41d4dda994 100644 --- a/service/managedblockchain/endpoints.go +++ b/service/managedblockchain/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/managedblockchainquery/endpoints.go b/service/managedblockchainquery/endpoints.go index 34915381c61..edba31875c5 100644 --- a/service/managedblockchainquery/endpoints.go +++ b/service/managedblockchainquery/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/marketplaceagreement/endpoints.go b/service/marketplaceagreement/endpoints.go index 024020b931c..6ac01d4ff8d 100644 --- a/service/marketplaceagreement/endpoints.go +++ b/service/marketplaceagreement/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/marketplacecatalog/endpoints.go b/service/marketplacecatalog/endpoints.go index 3c2a2647421..86d0f1e001d 100644 --- a/service/marketplacecatalog/endpoints.go +++ b/service/marketplacecatalog/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/marketplacecommerceanalytics/endpoints.go b/service/marketplacecommerceanalytics/endpoints.go index 4279d752ed5..7f8c8cf1c62 100644 --- a/service/marketplacecommerceanalytics/endpoints.go +++ b/service/marketplacecommerceanalytics/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/marketplacedeployment/endpoints.go b/service/marketplacedeployment/endpoints.go index 15af78e8512..1e7f32ea110 100644 --- a/service/marketplacedeployment/endpoints.go +++ b/service/marketplacedeployment/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/marketplaceentitlementservice/endpoints.go b/service/marketplaceentitlementservice/endpoints.go index 2ca05cb7ed0..22c5222de74 100644 --- a/service/marketplaceentitlementservice/endpoints.go +++ b/service/marketplaceentitlementservice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/marketplacemetering/endpoints.go b/service/marketplacemetering/endpoints.go index d2b1ccde03a..aa048a23909 100644 --- a/service/marketplacemetering/endpoints.go +++ b/service/marketplacemetering/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediaconnect/api_op_DescribeFlow.go b/service/mediaconnect/api_op_DescribeFlow.go index 39449db5e0a..309d58fe6ed 100644 --- a/service/mediaconnect/api_op_DescribeFlow.go +++ b/service/mediaconnect/api_op_DescribeFlow.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/mediaconnect/endpoints.go b/service/mediaconnect/endpoints.go index 3776f4faf06..4d76387bc8b 100644 --- a/service/mediaconnect/endpoints.go +++ b/service/mediaconnect/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediaconvert/endpoints.go b/service/mediaconvert/endpoints.go index e6953ffd521..eb824c705c2 100644 --- a/service/mediaconvert/endpoints.go +++ b/service/mediaconvert/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/medialive/api_op_DescribeChannel.go b/service/medialive/api_op_DescribeChannel.go index 8ac40de2ca6..2394db4ca16 100644 --- a/service/medialive/api_op_DescribeChannel.go +++ b/service/medialive/api_op_DescribeChannel.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/medialive/api_op_DescribeInput.go b/service/medialive/api_op_DescribeInput.go index 54cbd889dea..27d8bb358c2 100644 --- a/service/medialive/api_op_DescribeInput.go +++ b/service/medialive/api_op_DescribeInput.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/medialive/api_op_DescribeMultiplex.go b/service/medialive/api_op_DescribeMultiplex.go index 0e855fe46cd..0e978d5258f 100644 --- a/service/medialive/api_op_DescribeMultiplex.go +++ b/service/medialive/api_op_DescribeMultiplex.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/medialive/api_op_GetSignalMap.go b/service/medialive/api_op_GetSignalMap.go index fc286a99fce..0757877e1ef 100644 --- a/service/medialive/api_op_GetSignalMap.go +++ b/service/medialive/api_op_GetSignalMap.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/medialive/endpoints.go b/service/medialive/endpoints.go index 2babaded0e4..5bef0df33d2 100644 --- a/service/medialive/endpoints.go +++ b/service/medialive/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediapackage/endpoints.go b/service/mediapackage/endpoints.go index ce1c9e3372a..887065cbdbd 100644 --- a/service/mediapackage/endpoints.go +++ b/service/mediapackage/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediapackagev2/endpoints.go b/service/mediapackagev2/endpoints.go index cf76cdac840..bbc9ed37b69 100644 --- a/service/mediapackagev2/endpoints.go +++ b/service/mediapackagev2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediapackagevod/endpoints.go b/service/mediapackagevod/endpoints.go index 37b84118dba..341113d2269 100644 --- a/service/mediapackagevod/endpoints.go +++ b/service/mediapackagevod/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediastore/endpoints.go b/service/mediastore/endpoints.go index 5fd15e4eef1..58df84b2a5e 100644 --- a/service/mediastore/endpoints.go +++ b/service/mediastore/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediastoredata/endpoints.go b/service/mediastoredata/endpoints.go index 2eb63e8e6d7..6c2e934ecc9 100644 --- a/service/mediastoredata/endpoints.go +++ b/service/mediastoredata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mediatailor/endpoints.go b/service/mediatailor/endpoints.go index 36bcb25665f..93f05d28eca 100644 --- a/service/mediatailor/endpoints.go +++ b/service/mediatailor/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/medicalimaging/endpoints.go b/service/medicalimaging/endpoints.go index a83aa6c266d..11951a43325 100644 --- a/service/medicalimaging/endpoints.go +++ b/service/medicalimaging/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/memorydb/endpoints.go b/service/memorydb/endpoints.go index 2d49e28910b..611d03299d2 100644 --- a/service/memorydb/endpoints.go +++ b/service/memorydb/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mgn/endpoints.go b/service/mgn/endpoints.go index 90ded3e2d98..249fdabb6d5 100644 --- a/service/mgn/endpoints.go +++ b/service/mgn/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/migrationhub/endpoints.go b/service/migrationhub/endpoints.go index 13dde3bcdca..4c85acf464d 100644 --- a/service/migrationhub/endpoints.go +++ b/service/migrationhub/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/migrationhubconfig/endpoints.go b/service/migrationhubconfig/endpoints.go index adfb18ae7e9..53ef36bf664 100644 --- a/service/migrationhubconfig/endpoints.go +++ b/service/migrationhubconfig/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/migrationhuborchestrator/endpoints.go b/service/migrationhuborchestrator/endpoints.go index 2936dd478dd..c7aacfe9234 100644 --- a/service/migrationhuborchestrator/endpoints.go +++ b/service/migrationhuborchestrator/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/migrationhubrefactorspaces/endpoints.go b/service/migrationhubrefactorspaces/endpoints.go index abdc8cf9e58..cb1d234e911 100644 --- a/service/migrationhubrefactorspaces/endpoints.go +++ b/service/migrationhubrefactorspaces/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/migrationhubstrategy/endpoints.go b/service/migrationhubstrategy/endpoints.go index bc77113abf3..9c30ef7c3e3 100644 --- a/service/migrationhubstrategy/endpoints.go +++ b/service/migrationhubstrategy/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mobile/endpoints.go b/service/mobile/endpoints.go index e4a83a767e1..425d3ae14bc 100644 --- a/service/mobile/endpoints.go +++ b/service/mobile/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mq/endpoints.go b/service/mq/endpoints.go index 020ac510d09..d3b7f8a4f9b 100644 --- a/service/mq/endpoints.go +++ b/service/mq/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mturk/endpoints.go b/service/mturk/endpoints.go index 5ed316dcc68..f2de0d4859a 100644 --- a/service/mturk/endpoints.go +++ b/service/mturk/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/mwaa/endpoints.go b/service/mwaa/endpoints.go index 4e22f457a55..69d461bd4a2 100644 --- a/service/mwaa/endpoints.go +++ b/service/mwaa/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/neptune/api_op_DescribeDBInstances.go b/service/neptune/api_op_DescribeDBInstances.go index b15d395a9f2..824080b9a6a 100644 --- a/service/neptune/api_op_DescribeDBInstances.go +++ b/service/neptune/api_op_DescribeDBInstances.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/neptune/endpoints.go b/service/neptune/endpoints.go index 31a937fd6e6..2a8821b2f30 100644 --- a/service/neptune/endpoints.go +++ b/service/neptune/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/neptunedata/endpoints.go b/service/neptunedata/endpoints.go index 59071a13c81..f5d0de9cb9b 100644 --- a/service/neptunedata/endpoints.go +++ b/service/neptunedata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/neptunegraph/api_op_GetGraph.go b/service/neptunegraph/api_op_GetGraph.go index 864e044d0d5..33f2a5f8205 100644 --- a/service/neptunegraph/api_op_GetGraph.go +++ b/service/neptunegraph/api_op_GetGraph.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/neptunegraph/api_op_GetGraphSnapshot.go b/service/neptunegraph/api_op_GetGraphSnapshot.go index 1bd6f0c0284..3b6e20af628 100644 --- a/service/neptunegraph/api_op_GetGraphSnapshot.go +++ b/service/neptunegraph/api_op_GetGraphSnapshot.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/neptunegraph/api_op_GetImportTask.go b/service/neptunegraph/api_op_GetImportTask.go index dfd96d6d6fc..bf2df9b95cc 100644 --- a/service/neptunegraph/api_op_GetImportTask.go +++ b/service/neptunegraph/api_op_GetImportTask.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go b/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go index 99022765395..b9de76966c8 100644 --- a/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go +++ b/service/neptunegraph/api_op_GetPrivateGraphEndpoint.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/neptunegraph/endpoints.go b/service/neptunegraph/endpoints.go index 3e9beafc2bf..02c0011ab04 100644 --- a/service/neptunegraph/endpoints.go +++ b/service/neptunegraph/endpoints.go @@ -295,6 +295,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/networkfirewall/endpoints.go b/service/networkfirewall/endpoints.go index a1b74c0969c..9c4cd77414b 100644 --- a/service/networkfirewall/endpoints.go +++ b/service/networkfirewall/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/networkmanager/endpoints.go b/service/networkmanager/endpoints.go index 0bf0b16a0fb..5109716cff4 100644 --- a/service/networkmanager/endpoints.go +++ b/service/networkmanager/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/networkmonitor/endpoints.go b/service/networkmonitor/endpoints.go index 5d1c2dbcb0c..ba021073445 100644 --- a/service/networkmonitor/endpoints.go +++ b/service/networkmonitor/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/nimble/api_op_GetLaunchProfile.go b/service/nimble/api_op_GetLaunchProfile.go index 4d7371cc6ec..8f84fc3ea52 100644 --- a/service/nimble/api_op_GetLaunchProfile.go +++ b/service/nimble/api_op_GetLaunchProfile.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/nimble/api_op_GetStreamingImage.go b/service/nimble/api_op_GetStreamingImage.go index cac13635edb..6f6fe592f16 100644 --- a/service/nimble/api_op_GetStreamingImage.go +++ b/service/nimble/api_op_GetStreamingImage.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/nimble/api_op_GetStreamingSession.go b/service/nimble/api_op_GetStreamingSession.go index f59845ad9da..0654654ee0a 100644 --- a/service/nimble/api_op_GetStreamingSession.go +++ b/service/nimble/api_op_GetStreamingSession.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/nimble/api_op_GetStreamingSessionStream.go b/service/nimble/api_op_GetStreamingSessionStream.go index 157f9f2059b..0d3c08f2960 100644 --- a/service/nimble/api_op_GetStreamingSessionStream.go +++ b/service/nimble/api_op_GetStreamingSessionStream.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/nimble/api_op_GetStudio.go b/service/nimble/api_op_GetStudio.go index 7d939ad7b3a..18e75b8bf41 100644 --- a/service/nimble/api_op_GetStudio.go +++ b/service/nimble/api_op_GetStudio.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/nimble/api_op_GetStudioComponent.go b/service/nimble/api_op_GetStudioComponent.go index 66284375353..d6104531861 100644 --- a/service/nimble/api_op_GetStudioComponent.go +++ b/service/nimble/api_op_GetStudioComponent.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/nimble/endpoints.go b/service/nimble/endpoints.go index 0408819dcc3..f25e0ff0ef1 100644 --- a/service/nimble/endpoints.go +++ b/service/nimble/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/oam/endpoints.go b/service/oam/endpoints.go index 2acc97d41e7..fa883501ab8 100644 --- a/service/oam/endpoints.go +++ b/service/oam/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/omics/api_op_GetAnnotationImportJob.go b/service/omics/api_op_GetAnnotationImportJob.go index e07ddc816ba..298f39c4e8f 100644 --- a/service/omics/api_op_GetAnnotationImportJob.go +++ b/service/omics/api_op_GetAnnotationImportJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetAnnotationStore.go b/service/omics/api_op_GetAnnotationStore.go index 73516ed047a..bd97b996b57 100644 --- a/service/omics/api_op_GetAnnotationStore.go +++ b/service/omics/api_op_GetAnnotationStore.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetAnnotationStoreVersion.go b/service/omics/api_op_GetAnnotationStoreVersion.go index 5d5297f5ade..8c0e4cb1920 100644 --- a/service/omics/api_op_GetAnnotationStoreVersion.go +++ b/service/omics/api_op_GetAnnotationStoreVersion.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetReadSetActivationJob.go b/service/omics/api_op_GetReadSetActivationJob.go index 18764a66f3f..c07a787f21e 100644 --- a/service/omics/api_op_GetReadSetActivationJob.go +++ b/service/omics/api_op_GetReadSetActivationJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetReadSetExportJob.go b/service/omics/api_op_GetReadSetExportJob.go index 13fbf592618..78cc91e4aa2 100644 --- a/service/omics/api_op_GetReadSetExportJob.go +++ b/service/omics/api_op_GetReadSetExportJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetReadSetImportJob.go b/service/omics/api_op_GetReadSetImportJob.go index 426bd9e117e..43da5f1b136 100644 --- a/service/omics/api_op_GetReadSetImportJob.go +++ b/service/omics/api_op_GetReadSetImportJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetReferenceImportJob.go b/service/omics/api_op_GetReferenceImportJob.go index 7324ddded1e..c6b2d9dbce2 100644 --- a/service/omics/api_op_GetReferenceImportJob.go +++ b/service/omics/api_op_GetReferenceImportJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetRun.go b/service/omics/api_op_GetRun.go index c0bac78ec10..afa1c248ec3 100644 --- a/service/omics/api_op_GetRun.go +++ b/service/omics/api_op_GetRun.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetRunTask.go b/service/omics/api_op_GetRunTask.go index 798180e3145..9dbf0dad3b7 100644 --- a/service/omics/api_op_GetRunTask.go +++ b/service/omics/api_op_GetRunTask.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetVariantImportJob.go b/service/omics/api_op_GetVariantImportJob.go index 85252aa6dae..9f2e97fb3c7 100644 --- a/service/omics/api_op_GetVariantImportJob.go +++ b/service/omics/api_op_GetVariantImportJob.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetVariantStore.go b/service/omics/api_op_GetVariantStore.go index 1935133ee6f..93ff3a34342 100644 --- a/service/omics/api_op_GetVariantStore.go +++ b/service/omics/api_op_GetVariantStore.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/api_op_GetWorkflow.go b/service/omics/api_op_GetWorkflow.go index 2259fee15b6..a4975cfd51e 100644 --- a/service/omics/api_op_GetWorkflow.go +++ b/service/omics/api_op_GetWorkflow.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/omics/endpoints.go b/service/omics/endpoints.go index 864f233a50b..9a4610a607b 100644 --- a/service/omics/endpoints.go +++ b/service/omics/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/opensearch/endpoints.go b/service/opensearch/endpoints.go index 3d193d45139..e9bfed85b68 100644 --- a/service/opensearch/endpoints.go +++ b/service/opensearch/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/opensearchserverless/endpoints.go b/service/opensearchserverless/endpoints.go index fe7e8c3928d..a82d024aefd 100644 --- a/service/opensearchserverless/endpoints.go +++ b/service/opensearchserverless/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/opsworks/api_op_DescribeDeployments.go b/service/opsworks/api_op_DescribeDeployments.go index 7458a206293..fdca41b2ea1 100644 --- a/service/opsworks/api_op_DescribeDeployments.go +++ b/service/opsworks/api_op_DescribeDeployments.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/opsworks/api_op_DescribeInstances.go b/service/opsworks/api_op_DescribeInstances.go index 39440953ba2..2aeacd74190 100644 --- a/service/opsworks/api_op_DescribeInstances.go +++ b/service/opsworks/api_op_DescribeInstances.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/opsworks/endpoints.go b/service/opsworks/endpoints.go index c00d45a079e..0132698bbca 100644 --- a/service/opsworks/endpoints.go +++ b/service/opsworks/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go b/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go index a42537f9da2..2f6934aa2bb 100644 --- a/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go +++ b/service/opsworkscm/api_op_DescribeNodeAssociationStatus.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/opsworkscm/endpoints.go b/service/opsworkscm/endpoints.go index 8c9a9f85ad7..534e48cd896 100644 --- a/service/opsworkscm/endpoints.go +++ b/service/opsworkscm/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/organizations/endpoints.go b/service/organizations/endpoints.go index cb5a8787aac..7989dd0c9ba 100644 --- a/service/organizations/endpoints.go +++ b/service/organizations/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/osis/endpoints.go b/service/osis/endpoints.go index b38536db352..bf736f19401 100644 --- a/service/osis/endpoints.go +++ b/service/osis/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/outposts/endpoints.go b/service/outposts/endpoints.go index 9cfd3dbaf91..7ec58161642 100644 --- a/service/outposts/endpoints.go +++ b/service/outposts/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/panorama/endpoints.go b/service/panorama/endpoints.go index 5d7eb226e28..c5b55ac4438 100644 --- a/service/panorama/endpoints.go +++ b/service/panorama/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/paymentcryptography/endpoints.go b/service/paymentcryptography/endpoints.go index a30f81f4b4a..87fb4c72b79 100644 --- a/service/paymentcryptography/endpoints.go +++ b/service/paymentcryptography/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/paymentcryptographydata/endpoints.go b/service/paymentcryptographydata/endpoints.go index e917f3ae358..2c0311871cc 100644 --- a/service/paymentcryptographydata/endpoints.go +++ b/service/paymentcryptographydata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pcaconnectorad/endpoints.go b/service/pcaconnectorad/endpoints.go index 600b5cf044b..767cb0dd292 100644 --- a/service/pcaconnectorad/endpoints.go +++ b/service/pcaconnectorad/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pcaconnectorscep/endpoints.go b/service/pcaconnectorscep/endpoints.go index 9769df1b6fb..80011f66533 100644 --- a/service/pcaconnectorscep/endpoints.go +++ b/service/pcaconnectorscep/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/personalize/endpoints.go b/service/personalize/endpoints.go index bdebf59c906..aa8cb99146b 100644 --- a/service/personalize/endpoints.go +++ b/service/personalize/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/personalizeevents/endpoints.go b/service/personalizeevents/endpoints.go index 8c4f2751e0f..510eccda6a8 100644 --- a/service/personalizeevents/endpoints.go +++ b/service/personalizeevents/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/personalizeruntime/endpoints.go b/service/personalizeruntime/endpoints.go index e893d6f192f..30d25a92182 100644 --- a/service/personalizeruntime/endpoints.go +++ b/service/personalizeruntime/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pi/endpoints.go b/service/pi/endpoints.go index 094080a9fab..8decf56d187 100644 --- a/service/pi/endpoints.go +++ b/service/pi/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pinpoint/endpoints.go b/service/pinpoint/endpoints.go index fcd1c66a988..df8a2dcc895 100644 --- a/service/pinpoint/endpoints.go +++ b/service/pinpoint/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pinpointemail/endpoints.go b/service/pinpointemail/endpoints.go index 83b819478ec..1944e6970f2 100644 --- a/service/pinpointemail/endpoints.go +++ b/service/pinpointemail/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pinpointsmsvoice/endpoints.go b/service/pinpointsmsvoice/endpoints.go index 7eb276749bc..fbfc3ba252e 100644 --- a/service/pinpointsmsvoice/endpoints.go +++ b/service/pinpointsmsvoice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pinpointsmsvoicev2/endpoints.go b/service/pinpointsmsvoicev2/endpoints.go index c74b13b68ca..c480655f2ae 100644 --- a/service/pinpointsmsvoicev2/endpoints.go +++ b/service/pinpointsmsvoicev2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pipes/endpoints.go b/service/pipes/endpoints.go index d1e2bba085c..0ad6a40a827 100644 --- a/service/pipes/endpoints.go +++ b/service/pipes/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/polly/endpoints.go b/service/polly/endpoints.go index f531c3c7f77..395c9bc1f38 100644 --- a/service/polly/endpoints.go +++ b/service/polly/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/pricing/endpoints.go b/service/pricing/endpoints.go index 751d964914f..99bed6fa90a 100644 --- a/service/pricing/endpoints.go +++ b/service/pricing/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/privatenetworks/endpoints.go b/service/privatenetworks/endpoints.go index 3d683ac09f8..83f4af57de6 100644 --- a/service/privatenetworks/endpoints.go +++ b/service/privatenetworks/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/proton/api_op_GetComponent.go b/service/proton/api_op_GetComponent.go index 7aaf977dadd..74eda093769 100644 --- a/service/proton/api_op_GetComponent.go +++ b/service/proton/api_op_GetComponent.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/proton/api_op_GetEnvironment.go b/service/proton/api_op_GetEnvironment.go index e75a53ea84b..ba0517e495a 100644 --- a/service/proton/api_op_GetEnvironment.go +++ b/service/proton/api_op_GetEnvironment.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/proton/api_op_GetEnvironmentTemplateVersion.go b/service/proton/api_op_GetEnvironmentTemplateVersion.go index 7045e25ca2a..13e295b1e22 100644 --- a/service/proton/api_op_GetEnvironmentTemplateVersion.go +++ b/service/proton/api_op_GetEnvironmentTemplateVersion.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/proton/api_op_GetService.go b/service/proton/api_op_GetService.go index 61b4c410a25..2551aa8a65b 100644 --- a/service/proton/api_op_GetService.go +++ b/service/proton/api_op_GetService.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/proton/api_op_GetServiceInstance.go b/service/proton/api_op_GetServiceInstance.go index 4742cc4134b..bb67b21d649 100644 --- a/service/proton/api_op_GetServiceInstance.go +++ b/service/proton/api_op_GetServiceInstance.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/proton/api_op_GetServiceTemplateVersion.go b/service/proton/api_op_GetServiceTemplateVersion.go index 57aba2de450..3c2165130eb 100644 --- a/service/proton/api_op_GetServiceTemplateVersion.go +++ b/service/proton/api_op_GetServiceTemplateVersion.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/proton/endpoints.go b/service/proton/endpoints.go index 06171ea9730..2f53608fd23 100644 --- a/service/proton/endpoints.go +++ b/service/proton/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/qbusiness/endpoints.go b/service/qbusiness/endpoints.go index fee7ac73224..88695c23997 100644 --- a/service/qbusiness/endpoints.go +++ b/service/qbusiness/endpoints.go @@ -271,6 +271,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/qconnect/endpoints.go b/service/qconnect/endpoints.go index 2902d72bde5..405f1d2a9ed 100644 --- a/service/qconnect/endpoints.go +++ b/service/qconnect/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/qldb/endpoints.go b/service/qldb/endpoints.go index 8c2e63474e5..2cc75075687 100644 --- a/service/qldb/endpoints.go +++ b/service/qldb/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/qldbsession/endpoints.go b/service/qldbsession/endpoints.go index f222b76eba4..c4eac19da2b 100644 --- a/service/qldbsession/endpoints.go +++ b/service/qldbsession/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/quicksight/endpoints.go b/service/quicksight/endpoints.go index 7e47d46f907..3263221bdee 100644 --- a/service/quicksight/endpoints.go +++ b/service/quicksight/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ram/endpoints.go b/service/ram/endpoints.go index 614372127ae..7a00a1ebfbc 100644 --- a/service/ram/endpoints.go +++ b/service/ram/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/rbin/endpoints.go b/service/rbin/endpoints.go index 01660bc6cf1..855ed120122 100644 --- a/service/rbin/endpoints.go +++ b/service/rbin/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/rds/api_op_DescribeDBClusterSnapshots.go b/service/rds/api_op_DescribeDBClusterSnapshots.go index 14867dc34ac..7397847c3d2 100644 --- a/service/rds/api_op_DescribeDBClusterSnapshots.go +++ b/service/rds/api_op_DescribeDBClusterSnapshots.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/rds/api_op_DescribeDBClusters.go b/service/rds/api_op_DescribeDBClusters.go index ce334c91cbd..98cb861eebf 100644 --- a/service/rds/api_op_DescribeDBClusters.go +++ b/service/rds/api_op_DescribeDBClusters.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/rds/api_op_DescribeDBInstances.go b/service/rds/api_op_DescribeDBInstances.go index dd2163420e1..1ef1f8d5434 100644 --- a/service/rds/api_op_DescribeDBInstances.go +++ b/service/rds/api_op_DescribeDBInstances.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/rds/api_op_DescribeDBSnapshots.go b/service/rds/api_op_DescribeDBSnapshots.go index ef11920eb6a..f21c2813888 100644 --- a/service/rds/api_op_DescribeDBSnapshots.go +++ b/service/rds/api_op_DescribeDBSnapshots.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/rds/api_op_DescribeTenantDatabases.go b/service/rds/api_op_DescribeTenantDatabases.go index b0b8d2780c1..0117e25bed3 100644 --- a/service/rds/api_op_DescribeTenantDatabases.go +++ b/service/rds/api_op_DescribeTenantDatabases.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "strconv" "time" ) diff --git a/service/rds/endpoints.go b/service/rds/endpoints.go index 6346a4c5838..583fe63a141 100644 --- a/service/rds/endpoints.go +++ b/service/rds/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/rdsdata/endpoints.go b/service/rdsdata/endpoints.go index 9255c087ae8..f42d10733e8 100644 --- a/service/rdsdata/endpoints.go +++ b/service/rdsdata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/redshift/api_op_DescribeClusterSnapshots.go b/service/redshift/api_op_DescribeClusterSnapshots.go index 05de7a14121..1b2ff7589c9 100644 --- a/service/redshift/api_op_DescribeClusterSnapshots.go +++ b/service/redshift/api_op_DescribeClusterSnapshots.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/redshift/api_op_DescribeClusters.go b/service/redshift/api_op_DescribeClusters.go index 3a2db82d554..d797db33ccb 100644 --- a/service/redshift/api_op_DescribeClusters.go +++ b/service/redshift/api_op_DescribeClusters.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/redshift/endpoints.go b/service/redshift/endpoints.go index 10d018ceb0b..53dac7fece7 100644 --- a/service/redshift/endpoints.go +++ b/service/redshift/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/redshiftdata/endpoints.go b/service/redshiftdata/endpoints.go index fe1b1894938..40f42904581 100644 --- a/service/redshiftdata/endpoints.go +++ b/service/redshiftdata/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/redshiftserverless/endpoints.go b/service/redshiftserverless/endpoints.go index 24f30e46b59..9318d728d99 100644 --- a/service/redshiftserverless/endpoints.go +++ b/service/redshiftserverless/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/rekognition/api_op_DescribeProjectVersions.go b/service/rekognition/api_op_DescribeProjectVersions.go index a2e3bd4f480..bad21887aaf 100644 --- a/service/rekognition/api_op_DescribeProjectVersions.go +++ b/service/rekognition/api_op_DescribeProjectVersions.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/rekognition/endpoints.go b/service/rekognition/endpoints.go index cbc2fd62fe4..31ce95322cd 100644 --- a/service/rekognition/endpoints.go +++ b/service/rekognition/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/repostspace/endpoints.go b/service/repostspace/endpoints.go index 49332e78e83..342944a1783 100644 --- a/service/repostspace/endpoints.go +++ b/service/repostspace/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/resiliencehub/endpoints.go b/service/resiliencehub/endpoints.go index a23e3a952d8..1c21c5fae7e 100644 --- a/service/resiliencehub/endpoints.go +++ b/service/resiliencehub/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/resourceexplorer2/endpoints.go b/service/resourceexplorer2/endpoints.go index 19fb856f50b..e1fe209715f 100644 --- a/service/resourceexplorer2/endpoints.go +++ b/service/resourceexplorer2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/resourcegroups/endpoints.go b/service/resourcegroups/endpoints.go index 4875d6ac62b..8b8b02aa4f7 100644 --- a/service/resourcegroups/endpoints.go +++ b/service/resourcegroups/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/resourcegroupstaggingapi/endpoints.go b/service/resourcegroupstaggingapi/endpoints.go index 52daf3dc8a8..74812d1571d 100644 --- a/service/resourcegroupstaggingapi/endpoints.go +++ b/service/resourcegroupstaggingapi/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/robomaker/endpoints.go b/service/robomaker/endpoints.go index 6dfcef793a5..8992e3da3b0 100644 --- a/service/robomaker/endpoints.go +++ b/service/robomaker/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/rolesanywhere/endpoints.go b/service/rolesanywhere/endpoints.go index dd0228c6f6e..c48a16b07d9 100644 --- a/service/rolesanywhere/endpoints.go +++ b/service/rolesanywhere/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/route53/api_op_GetChange.go b/service/route53/api_op_GetChange.go index e51691b8394..16672d1116d 100644 --- a/service/route53/api_op_GetChange.go +++ b/service/route53/api_op_GetChange.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/route53/endpoints.go b/service/route53/endpoints.go index d2a349f38ce..1777d15bb98 100644 --- a/service/route53/endpoints.go +++ b/service/route53/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/route53domains/endpoints.go b/service/route53domains/endpoints.go index 0268acaa175..5fb9839640e 100644 --- a/service/route53domains/endpoints.go +++ b/service/route53domains/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/route53profiles/endpoints.go b/service/route53profiles/endpoints.go index 6a77d1a6d60..69a8700f2c2 100644 --- a/service/route53profiles/endpoints.go +++ b/service/route53profiles/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/route53recoverycluster/endpoints.go b/service/route53recoverycluster/endpoints.go index fea2b1f3034..d18b10f7e2d 100644 --- a/service/route53recoverycluster/endpoints.go +++ b/service/route53recoverycluster/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/route53recoverycontrolconfig/api_op_DescribeCluster.go b/service/route53recoverycontrolconfig/api_op_DescribeCluster.go index a41c30c4da9..69a98414dbe 100644 --- a/service/route53recoverycontrolconfig/api_op_DescribeCluster.go +++ b/service/route53recoverycontrolconfig/api_op_DescribeCluster.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go b/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go index 37b417c3da7..4bdb09ae00f 100644 --- a/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go +++ b/service/route53recoverycontrolconfig/api_op_DescribeControlPanel.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go b/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go index 856a3e247c5..4405e648cbc 100644 --- a/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go +++ b/service/route53recoverycontrolconfig/api_op_DescribeRoutingControl.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/route53recoverycontrolconfig/endpoints.go b/service/route53recoverycontrolconfig/endpoints.go index 8b32033e658..9282ef78061 100644 --- a/service/route53recoverycontrolconfig/endpoints.go +++ b/service/route53recoverycontrolconfig/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/route53recoveryreadiness/endpoints.go b/service/route53recoveryreadiness/endpoints.go index f5e7a6f9df4..38d6a76488b 100644 --- a/service/route53recoveryreadiness/endpoints.go +++ b/service/route53recoveryreadiness/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/route53resolver/endpoints.go b/service/route53resolver/endpoints.go index 15c8510ae2c..b2ebe85cb8c 100644 --- a/service/route53resolver/endpoints.go +++ b/service/route53resolver/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/rum/endpoints.go b/service/rum/endpoints.go index d14ba78ad58..3729391f60f 100644 --- a/service/rum/endpoints.go +++ b/service/rum/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/s3/api_op_AbortMultipartUpload.go b/service/s3/api_op_AbortMultipartUpload.go index d1344cb1120..00e395efb62 100644 --- a/service/s3/api_op_AbortMultipartUpload.go +++ b/service/s3/api_op_AbortMultipartUpload.go @@ -156,6 +156,7 @@ type AbortMultipartUploadInput struct { } func (in *AbortMultipartUploadInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_CompleteMultipartUpload.go b/service/s3/api_op_CompleteMultipartUpload.go index 04b8657b87b..29c7e3ea8e9 100644 --- a/service/s3/api_op_CompleteMultipartUpload.go +++ b/service/s3/api_op_CompleteMultipartUpload.go @@ -280,6 +280,7 @@ type CompleteMultipartUploadInput struct { } func (in *CompleteMultipartUploadInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_CopyObject.go b/service/s3/api_op_CopyObject.go index 46562d8391f..5f63de146bc 100644 --- a/service/s3/api_op_CopyObject.go +++ b/service/s3/api_op_CopyObject.go @@ -735,6 +735,7 @@ type CopyObjectInput struct { } func (in *CopyObjectInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.CopySource = in.CopySource p.Key = in.Key diff --git a/service/s3/api_op_CreateBucket.go b/service/s3/api_op_CreateBucket.go index f9be56fe417..6334c1cfcf9 100644 --- a/service/s3/api_op_CreateBucket.go +++ b/service/s3/api_op_CreateBucket.go @@ -235,6 +235,7 @@ type CreateBucketInput struct { } func (in *CreateBucketInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) p.DisableAccessPoints = ptr.Bool(true) diff --git a/service/s3/api_op_CreateMultipartUpload.go b/service/s3/api_op_CreateMultipartUpload.go index b9b6dcb2868..a3d6ef9e4c3 100644 --- a/service/s3/api_op_CreateMultipartUpload.go +++ b/service/s3/api_op_CreateMultipartUpload.go @@ -630,6 +630,7 @@ type CreateMultipartUploadInput struct { } func (in *CreateMultipartUploadInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_CreateSession.go b/service/s3/api_op_CreateSession.go index 7030c9b8537..5ebee7f8452 100644 --- a/service/s3/api_op_CreateSession.go +++ b/service/s3/api_op_CreateSession.go @@ -117,6 +117,7 @@ type CreateSessionInput struct { } func (in *CreateSessionInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.DisableS3ExpressSessionAuth = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucket.go b/service/s3/api_op_DeleteBucket.go index de383254d22..e0654a0c18c 100644 --- a/service/s3/api_op_DeleteBucket.go +++ b/service/s3/api_op_DeleteBucket.go @@ -98,6 +98,7 @@ type DeleteBucketInput struct { } func (in *DeleteBucketInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go b/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go index 5214e2d5ab5..e4e0d3b72a4 100644 --- a/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_DeleteBucketAnalyticsConfiguration.go @@ -75,6 +75,7 @@ type DeleteBucketAnalyticsConfigurationInput struct { } func (in *DeleteBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketCors.go b/service/s3/api_op_DeleteBucketCors.go index b46d3044b0a..cbf73158354 100644 --- a/service/s3/api_op_DeleteBucketCors.go +++ b/service/s3/api_op_DeleteBucketCors.go @@ -63,6 +63,7 @@ type DeleteBucketCorsInput struct { } func (in *DeleteBucketCorsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketEncryption.go b/service/s3/api_op_DeleteBucketEncryption.go index b799f56afc2..fa37719c0b3 100644 --- a/service/s3/api_op_DeleteBucketEncryption.go +++ b/service/s3/api_op_DeleteBucketEncryption.go @@ -68,6 +68,7 @@ type DeleteBucketEncryptionInput struct { } func (in *DeleteBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go b/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go index c6551c88598..2a64710c172 100644 --- a/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go +++ b/service/s3/api_op_DeleteBucketIntelligentTieringConfiguration.go @@ -77,6 +77,7 @@ type DeleteBucketIntelligentTieringConfigurationInput struct { } func (in *DeleteBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketInventoryConfiguration.go b/service/s3/api_op_DeleteBucketInventoryConfiguration.go index 830dbe8a45e..8fa7d1e4385 100644 --- a/service/s3/api_op_DeleteBucketInventoryConfiguration.go +++ b/service/s3/api_op_DeleteBucketInventoryConfiguration.go @@ -75,6 +75,7 @@ type DeleteBucketInventoryConfigurationInput struct { } func (in *DeleteBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketLifecycle.go b/service/s3/api_op_DeleteBucketLifecycle.go index cb43e414a3a..4c843ee5ff8 100644 --- a/service/s3/api_op_DeleteBucketLifecycle.go +++ b/service/s3/api_op_DeleteBucketLifecycle.go @@ -70,6 +70,7 @@ type DeleteBucketLifecycleInput struct { } func (in *DeleteBucketLifecycleInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketMetricsConfiguration.go b/service/s3/api_op_DeleteBucketMetricsConfiguration.go index d38de5e70ff..645b5712b75 100644 --- a/service/s3/api_op_DeleteBucketMetricsConfiguration.go +++ b/service/s3/api_op_DeleteBucketMetricsConfiguration.go @@ -79,6 +79,7 @@ type DeleteBucketMetricsConfigurationInput struct { } func (in *DeleteBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketOwnershipControls.go b/service/s3/api_op_DeleteBucketOwnershipControls.go index b13495e30da..893b0f1d55e 100644 --- a/service/s3/api_op_DeleteBucketOwnershipControls.go +++ b/service/s3/api_op_DeleteBucketOwnershipControls.go @@ -60,6 +60,7 @@ type DeleteBucketOwnershipControlsInput struct { } func (in *DeleteBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketPolicy.go b/service/s3/api_op_DeleteBucketPolicy.go index e30cf0cf60d..f9e53d54959 100644 --- a/service/s3/api_op_DeleteBucketPolicy.go +++ b/service/s3/api_op_DeleteBucketPolicy.go @@ -110,6 +110,7 @@ type DeleteBucketPolicyInput struct { } func (in *DeleteBucketPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketReplication.go b/service/s3/api_op_DeleteBucketReplication.go index 8ea04e8a26b..c7e9803e538 100644 --- a/service/s3/api_op_DeleteBucketReplication.go +++ b/service/s3/api_op_DeleteBucketReplication.go @@ -70,6 +70,7 @@ type DeleteBucketReplicationInput struct { } func (in *DeleteBucketReplicationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketTagging.go b/service/s3/api_op_DeleteBucketTagging.go index b3b0b10179c..3f511103b4f 100644 --- a/service/s3/api_op_DeleteBucketTagging.go +++ b/service/s3/api_op_DeleteBucketTagging.go @@ -60,6 +60,7 @@ type DeleteBucketTaggingInput struct { } func (in *DeleteBucketTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteBucketWebsite.go b/service/s3/api_op_DeleteBucketWebsite.go index c5df2daa922..58ae1d017ae 100644 --- a/service/s3/api_op_DeleteBucketWebsite.go +++ b/service/s3/api_op_DeleteBucketWebsite.go @@ -69,6 +69,7 @@ type DeleteBucketWebsiteInput struct { } func (in *DeleteBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_DeleteObject.go b/service/s3/api_op_DeleteObject.go index bae1eab7801..9af132c8c64 100644 --- a/service/s3/api_op_DeleteObject.go +++ b/service/s3/api_op_DeleteObject.go @@ -203,6 +203,7 @@ type DeleteObjectInput struct { } func (in *DeleteObjectInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_DeleteObjectTagging.go b/service/s3/api_op_DeleteObjectTagging.go index ed134ee08b7..473479057b0 100644 --- a/service/s3/api_op_DeleteObjectTagging.go +++ b/service/s3/api_op_DeleteObjectTagging.go @@ -92,6 +92,7 @@ type DeleteObjectTaggingInput struct { } func (in *DeleteObjectTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_DeleteObjects.go b/service/s3/api_op_DeleteObjects.go index f49411450d7..3f7cf79c34b 100644 --- a/service/s3/api_op_DeleteObjects.go +++ b/service/s3/api_op_DeleteObjects.go @@ -247,6 +247,7 @@ type DeleteObjectsInput struct { } func (in *DeleteObjectsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_DeletePublicAccessBlock.go b/service/s3/api_op_DeletePublicAccessBlock.go index 284a4c888ce..dee7f1f1946 100644 --- a/service/s3/api_op_DeletePublicAccessBlock.go +++ b/service/s3/api_op_DeletePublicAccessBlock.go @@ -66,6 +66,7 @@ type DeletePublicAccessBlockInput struct { } func (in *DeletePublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketAccelerateConfiguration.go b/service/s3/api_op_GetBucketAccelerateConfiguration.go index 8c969a6fc3e..c8e93d02857 100644 --- a/service/s3/api_op_GetBucketAccelerateConfiguration.go +++ b/service/s3/api_op_GetBucketAccelerateConfiguration.go @@ -87,6 +87,7 @@ type GetBucketAccelerateConfigurationInput struct { } func (in *GetBucketAccelerateConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketAcl.go b/service/s3/api_op_GetBucketAcl.go index c3817050e53..73557d2eef2 100644 --- a/service/s3/api_op_GetBucketAcl.go +++ b/service/s3/api_op_GetBucketAcl.go @@ -85,6 +85,7 @@ type GetBucketAclInput struct { } func (in *GetBucketAclInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketAnalyticsConfiguration.go b/service/s3/api_op_GetBucketAnalyticsConfiguration.go index 6f8c670504f..d3b27f9ffc1 100644 --- a/service/s3/api_op_GetBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_GetBucketAnalyticsConfiguration.go @@ -77,6 +77,7 @@ type GetBucketAnalyticsConfigurationInput struct { } func (in *GetBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketCors.go b/service/s3/api_op_GetBucketCors.go index 8916dc79dcb..ef33218e378 100644 --- a/service/s3/api_op_GetBucketCors.go +++ b/service/s3/api_op_GetBucketCors.go @@ -86,6 +86,7 @@ type GetBucketCorsInput struct { } func (in *GetBucketCorsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketEncryption.go b/service/s3/api_op_GetBucketEncryption.go index 7aa5497d154..8e768fe0d0d 100644 --- a/service/s3/api_op_GetBucketEncryption.go +++ b/service/s3/api_op_GetBucketEncryption.go @@ -69,6 +69,7 @@ type GetBucketEncryptionInput struct { } func (in *GetBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go b/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go index a8f30ee51cb..def1765a6bf 100644 --- a/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go +++ b/service/s3/api_op_GetBucketIntelligentTieringConfiguration.go @@ -78,6 +78,7 @@ type GetBucketIntelligentTieringConfigurationInput struct { } func (in *GetBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketInventoryConfiguration.go b/service/s3/api_op_GetBucketInventoryConfiguration.go index 04c94d19bd2..8e09aec2c35 100644 --- a/service/s3/api_op_GetBucketInventoryConfiguration.go +++ b/service/s3/api_op_GetBucketInventoryConfiguration.go @@ -76,6 +76,7 @@ type GetBucketInventoryConfigurationInput struct { } func (in *GetBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketLifecycleConfiguration.go b/service/s3/api_op_GetBucketLifecycleConfiguration.go index 1c206dcf3e1..4d3e018d08d 100644 --- a/service/s3/api_op_GetBucketLifecycleConfiguration.go +++ b/service/s3/api_op_GetBucketLifecycleConfiguration.go @@ -90,6 +90,7 @@ type GetBucketLifecycleConfigurationInput struct { } func (in *GetBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketLocation.go b/service/s3/api_op_GetBucketLocation.go index b24abf45b65..6ff8e95779a 100644 --- a/service/s3/api_op_GetBucketLocation.go +++ b/service/s3/api_op_GetBucketLocation.go @@ -90,6 +90,7 @@ type GetBucketLocationInput struct { } func (in *GetBucketLocationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketLogging.go b/service/s3/api_op_GetBucketLogging.go index f29eff8d356..fec538ee64f 100644 --- a/service/s3/api_op_GetBucketLogging.go +++ b/service/s3/api_op_GetBucketLogging.go @@ -58,6 +58,7 @@ type GetBucketLoggingInput struct { } func (in *GetBucketLoggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketMetricsConfiguration.go b/service/s3/api_op_GetBucketMetricsConfiguration.go index 080409350bc..13cf42f403c 100644 --- a/service/s3/api_op_GetBucketMetricsConfiguration.go +++ b/service/s3/api_op_GetBucketMetricsConfiguration.go @@ -79,6 +79,7 @@ type GetBucketMetricsConfigurationInput struct { } func (in *GetBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketNotificationConfiguration.go b/service/s3/api_op_GetBucketNotificationConfiguration.go index 0f6e784391a..66915f732fc 100644 --- a/service/s3/api_op_GetBucketNotificationConfiguration.go +++ b/service/s3/api_op_GetBucketNotificationConfiguration.go @@ -88,6 +88,7 @@ type GetBucketNotificationConfigurationInput struct { } func (in *GetBucketNotificationConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketOwnershipControls.go b/service/s3/api_op_GetBucketOwnershipControls.go index 252ed8432ec..f8d2486b555 100644 --- a/service/s3/api_op_GetBucketOwnershipControls.go +++ b/service/s3/api_op_GetBucketOwnershipControls.go @@ -61,6 +61,7 @@ type GetBucketOwnershipControlsInput struct { } func (in *GetBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketPolicy.go b/service/s3/api_op_GetBucketPolicy.go index 769c4cb0f8b..1a2f25193af 100644 --- a/service/s3/api_op_GetBucketPolicy.go +++ b/service/s3/api_op_GetBucketPolicy.go @@ -127,6 +127,7 @@ type GetBucketPolicyInput struct { } func (in *GetBucketPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketPolicyStatus.go b/service/s3/api_op_GetBucketPolicyStatus.go index dc73b85d4eb..57cee1fb3fc 100644 --- a/service/s3/api_op_GetBucketPolicyStatus.go +++ b/service/s3/api_op_GetBucketPolicyStatus.go @@ -70,6 +70,7 @@ type GetBucketPolicyStatusInput struct { } func (in *GetBucketPolicyStatusInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketReplication.go b/service/s3/api_op_GetBucketReplication.go index 7affb7ffa2d..10a0f6a1091 100644 --- a/service/s3/api_op_GetBucketReplication.go +++ b/service/s3/api_op_GetBucketReplication.go @@ -76,6 +76,7 @@ type GetBucketReplicationInput struct { } func (in *GetBucketReplicationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketRequestPayment.go b/service/s3/api_op_GetBucketRequestPayment.go index 0982c5aa9a6..2a4c0584281 100644 --- a/service/s3/api_op_GetBucketRequestPayment.go +++ b/service/s3/api_op_GetBucketRequestPayment.go @@ -56,6 +56,7 @@ type GetBucketRequestPaymentInput struct { } func (in *GetBucketRequestPaymentInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketTagging.go b/service/s3/api_op_GetBucketTagging.go index 2c75533c020..61c62de03ae 100644 --- a/service/s3/api_op_GetBucketTagging.go +++ b/service/s3/api_op_GetBucketTagging.go @@ -67,6 +67,7 @@ type GetBucketTaggingInput struct { } func (in *GetBucketTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketVersioning.go b/service/s3/api_op_GetBucketVersioning.go index 45ef5225458..86fcc67bb87 100644 --- a/service/s3/api_op_GetBucketVersioning.go +++ b/service/s3/api_op_GetBucketVersioning.go @@ -66,6 +66,7 @@ type GetBucketVersioningInput struct { } func (in *GetBucketVersioningInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetBucketWebsite.go b/service/s3/api_op_GetBucketWebsite.go index 87a89a1cd46..72254092aea 100644 --- a/service/s3/api_op_GetBucketWebsite.go +++ b/service/s3/api_op_GetBucketWebsite.go @@ -65,6 +65,7 @@ type GetBucketWebsiteInput struct { } func (in *GetBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_GetObject.go b/service/s3/api_op_GetObject.go index bb12b6b7f83..088c48c7ca9 100644 --- a/service/s3/api_op_GetObject.go +++ b/service/s3/api_op_GetObject.go @@ -408,6 +408,7 @@ type GetObjectInput struct { } func (in *GetObjectInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_GetObjectAcl.go b/service/s3/api_op_GetObjectAcl.go index ce9c6ae09ae..debdaab0e31 100644 --- a/service/s3/api_op_GetObjectAcl.go +++ b/service/s3/api_op_GetObjectAcl.go @@ -110,6 +110,7 @@ type GetObjectAclInput struct { } func (in *GetObjectAclInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_GetObjectAttributes.go b/service/s3/api_op_GetObjectAttributes.go index cbe48692458..98ebb0d7be5 100644 --- a/service/s3/api_op_GetObjectAttributes.go +++ b/service/s3/api_op_GetObjectAttributes.go @@ -269,6 +269,7 @@ type GetObjectAttributesInput struct { } func (in *GetObjectAttributesInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_GetObjectLegalHold.go b/service/s3/api_op_GetObjectLegalHold.go index ffcee213ab2..0c39051e5a7 100644 --- a/service/s3/api_op_GetObjectLegalHold.go +++ b/service/s3/api_op_GetObjectLegalHold.go @@ -88,6 +88,7 @@ type GetObjectLegalHoldInput struct { } func (in *GetObjectLegalHoldInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_GetObjectLockConfiguration.go b/service/s3/api_op_GetObjectLockConfiguration.go index f43e2a92b19..28ea0fd1294 100644 --- a/service/s3/api_op_GetObjectLockConfiguration.go +++ b/service/s3/api_op_GetObjectLockConfiguration.go @@ -67,6 +67,7 @@ type GetObjectLockConfigurationInput struct { } func (in *GetObjectLockConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_GetObjectRetention.go b/service/s3/api_op_GetObjectRetention.go index 97201d69c38..678afb91b28 100644 --- a/service/s3/api_op_GetObjectRetention.go +++ b/service/s3/api_op_GetObjectRetention.go @@ -88,6 +88,7 @@ type GetObjectRetentionInput struct { } func (in *GetObjectRetentionInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_GetObjectTagging.go b/service/s3/api_op_GetObjectTagging.go index 484bb6fe587..bd70ccadd64 100644 --- a/service/s3/api_op_GetObjectTagging.go +++ b/service/s3/api_op_GetObjectTagging.go @@ -113,6 +113,7 @@ type GetObjectTaggingInput struct { } func (in *GetObjectTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_GetObjectTorrent.go b/service/s3/api_op_GetObjectTorrent.go index 32317a1c9b4..5be63e2e332 100644 --- a/service/s3/api_op_GetObjectTorrent.go +++ b/service/s3/api_op_GetObjectTorrent.go @@ -80,6 +80,7 @@ type GetObjectTorrentInput struct { } func (in *GetObjectTorrentInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_GetPublicAccessBlock.go b/service/s3/api_op_GetPublicAccessBlock.go index 59ec3196092..3eac86cb6c2 100644 --- a/service/s3/api_op_GetPublicAccessBlock.go +++ b/service/s3/api_op_GetPublicAccessBlock.go @@ -78,6 +78,7 @@ type GetPublicAccessBlockInput struct { } func (in *GetPublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_HeadBucket.go b/service/s3/api_op_HeadBucket.go index f8eb030f03c..e53d4f4d041 100644 --- a/service/s3/api_op_HeadBucket.go +++ b/service/s3/api_op_HeadBucket.go @@ -137,6 +137,7 @@ type HeadBucketInput struct { } func (in *HeadBucketInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_HeadObject.go b/service/s3/api_op_HeadObject.go index cae826ad0b1..97aea22fdf8 100644 --- a/service/s3/api_op_HeadObject.go +++ b/service/s3/api_op_HeadObject.go @@ -320,6 +320,7 @@ type HeadObjectInput struct { } func (in *HeadObjectInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_ListBucketAnalyticsConfigurations.go b/service/s3/api_op_ListBucketAnalyticsConfigurations.go index 9f2c709a574..f2ba3443955 100644 --- a/service/s3/api_op_ListBucketAnalyticsConfigurations.go +++ b/service/s3/api_op_ListBucketAnalyticsConfigurations.go @@ -83,6 +83,7 @@ type ListBucketAnalyticsConfigurationsInput struct { } func (in *ListBucketAnalyticsConfigurationsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go b/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go index dc39fef574f..01b66028e1b 100644 --- a/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go +++ b/service/s3/api_op_ListBucketIntelligentTieringConfigurations.go @@ -77,6 +77,7 @@ type ListBucketIntelligentTieringConfigurationsInput struct { } func (in *ListBucketIntelligentTieringConfigurationsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_ListBucketInventoryConfigurations.go b/service/s3/api_op_ListBucketInventoryConfigurations.go index 3b2300d5a6c..889ad026477 100644 --- a/service/s3/api_op_ListBucketInventoryConfigurations.go +++ b/service/s3/api_op_ListBucketInventoryConfigurations.go @@ -85,6 +85,7 @@ type ListBucketInventoryConfigurationsInput struct { } func (in *ListBucketInventoryConfigurationsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_ListBucketMetricsConfigurations.go b/service/s3/api_op_ListBucketMetricsConfigurations.go index 49afb4b9565..8a3a080afa6 100644 --- a/service/s3/api_op_ListBucketMetricsConfigurations.go +++ b/service/s3/api_op_ListBucketMetricsConfigurations.go @@ -86,6 +86,7 @@ type ListBucketMetricsConfigurationsInput struct { } func (in *ListBucketMetricsConfigurationsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_ListMultipartUploads.go b/service/s3/api_op_ListMultipartUploads.go index 52b08494dcb..60f9e130687 100644 --- a/service/s3/api_op_ListMultipartUploads.go +++ b/service/s3/api_op_ListMultipartUploads.go @@ -244,6 +244,7 @@ type ListMultipartUploadsInput struct { } func (in *ListMultipartUploadsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Prefix = in.Prefix diff --git a/service/s3/api_op_ListObjectVersions.go b/service/s3/api_op_ListObjectVersions.go index d2274c6b412..2f7cc8d2c93 100644 --- a/service/s3/api_op_ListObjectVersions.go +++ b/service/s3/api_op_ListObjectVersions.go @@ -123,6 +123,7 @@ type ListObjectVersionsInput struct { } func (in *ListObjectVersionsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Prefix = in.Prefix diff --git a/service/s3/api_op_ListObjects.go b/service/s3/api_op_ListObjects.go index dc022ddf452..f8b2eeb62c7 100644 --- a/service/s3/api_op_ListObjects.go +++ b/service/s3/api_op_ListObjects.go @@ -137,6 +137,7 @@ type ListObjectsInput struct { } func (in *ListObjectsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Prefix = in.Prefix diff --git a/service/s3/api_op_ListObjectsV2.go b/service/s3/api_op_ListObjectsV2.go index 314f1fc3733..296ee7e8e6d 100644 --- a/service/s3/api_op_ListObjectsV2.go +++ b/service/s3/api_op_ListObjectsV2.go @@ -204,6 +204,7 @@ type ListObjectsV2Input struct { } func (in *ListObjectsV2Input) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Prefix = in.Prefix diff --git a/service/s3/api_op_ListParts.go b/service/s3/api_op_ListParts.go index 6b1fe316e02..9ff3365815b 100644 --- a/service/s3/api_op_ListParts.go +++ b/service/s3/api_op_ListParts.go @@ -206,6 +206,7 @@ type ListPartsInput struct { } func (in *ListPartsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_PutBucketAccelerateConfiguration.go b/service/s3/api_op_PutBucketAccelerateConfiguration.go index 69069135142..03da71d2e48 100644 --- a/service/s3/api_op_PutBucketAccelerateConfiguration.go +++ b/service/s3/api_op_PutBucketAccelerateConfiguration.go @@ -103,6 +103,7 @@ type PutBucketAccelerateConfigurationInput struct { } func (in *PutBucketAccelerateConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketAcl.go b/service/s3/api_op_PutBucketAcl.go index cfdc1086122..35282558c4c 100644 --- a/service/s3/api_op_PutBucketAcl.go +++ b/service/s3/api_op_PutBucketAcl.go @@ -247,6 +247,7 @@ type PutBucketAclInput struct { } func (in *PutBucketAclInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketAnalyticsConfiguration.go b/service/s3/api_op_PutBucketAnalyticsConfiguration.go index 00775bdc3f4..9d0908613d1 100644 --- a/service/s3/api_op_PutBucketAnalyticsConfiguration.go +++ b/service/s3/api_op_PutBucketAnalyticsConfiguration.go @@ -116,6 +116,7 @@ type PutBucketAnalyticsConfigurationInput struct { } func (in *PutBucketAnalyticsConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketCors.go b/service/s3/api_op_PutBucketCors.go index ecb6b30b822..6ce434d6f70 100644 --- a/service/s3/api_op_PutBucketCors.go +++ b/service/s3/api_op_PutBucketCors.go @@ -125,6 +125,7 @@ type PutBucketCorsInput struct { } func (in *PutBucketCorsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketEncryption.go b/service/s3/api_op_PutBucketEncryption.go index 2cf8e9eb950..187e73f2484 100644 --- a/service/s3/api_op_PutBucketEncryption.go +++ b/service/s3/api_op_PutBucketEncryption.go @@ -114,6 +114,7 @@ type PutBucketEncryptionInput struct { } func (in *PutBucketEncryptionInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go b/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go index e7aefa40ca5..5087cdee952 100644 --- a/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go +++ b/service/s3/api_op_PutBucketIntelligentTieringConfiguration.go @@ -103,6 +103,7 @@ type PutBucketIntelligentTieringConfigurationInput struct { } func (in *PutBucketIntelligentTieringConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketInventoryConfiguration.go b/service/s3/api_op_PutBucketInventoryConfiguration.go index f14c3e58e35..b15df17a15b 100644 --- a/service/s3/api_op_PutBucketInventoryConfiguration.go +++ b/service/s3/api_op_PutBucketInventoryConfiguration.go @@ -125,6 +125,7 @@ type PutBucketInventoryConfigurationInput struct { } func (in *PutBucketInventoryConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketLifecycleConfiguration.go b/service/s3/api_op_PutBucketLifecycleConfiguration.go index ad4e0186270..5f20c6d566c 100644 --- a/service/s3/api_op_PutBucketLifecycleConfiguration.go +++ b/service/s3/api_op_PutBucketLifecycleConfiguration.go @@ -133,6 +133,7 @@ type PutBucketLifecycleConfigurationInput struct { } func (in *PutBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketLogging.go b/service/s3/api_op_PutBucketLogging.go index 97ad6a96584..cf2183d0eb6 100644 --- a/service/s3/api_op_PutBucketLogging.go +++ b/service/s3/api_op_PutBucketLogging.go @@ -132,6 +132,7 @@ type PutBucketLoggingInput struct { } func (in *PutBucketLoggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketMetricsConfiguration.go b/service/s3/api_op_PutBucketMetricsConfiguration.go index 302bced6ec2..837e7180cc4 100644 --- a/service/s3/api_op_PutBucketMetricsConfiguration.go +++ b/service/s3/api_op_PutBucketMetricsConfiguration.go @@ -94,6 +94,7 @@ type PutBucketMetricsConfigurationInput struct { } func (in *PutBucketMetricsConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketNotificationConfiguration.go b/service/s3/api_op_PutBucketNotificationConfiguration.go index 10ee67450a7..d6d4e510964 100644 --- a/service/s3/api_op_PutBucketNotificationConfiguration.go +++ b/service/s3/api_op_PutBucketNotificationConfiguration.go @@ -108,6 +108,7 @@ type PutBucketNotificationConfigurationInput struct { } func (in *PutBucketNotificationConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketOwnershipControls.go b/service/s3/api_op_PutBucketOwnershipControls.go index 8f1f8aad2b5..99e26fd558b 100644 --- a/service/s3/api_op_PutBucketOwnershipControls.go +++ b/service/s3/api_op_PutBucketOwnershipControls.go @@ -74,6 +74,7 @@ type PutBucketOwnershipControlsInput struct { } func (in *PutBucketOwnershipControlsInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketPolicy.go b/service/s3/api_op_PutBucketPolicy.go index 7ab86cf17c4..93f66ab6196 100644 --- a/service/s3/api_op_PutBucketPolicy.go +++ b/service/s3/api_op_PutBucketPolicy.go @@ -172,6 +172,7 @@ type PutBucketPolicyInput struct { } func (in *PutBucketPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketReplication.go b/service/s3/api_op_PutBucketReplication.go index 02b202b7cb7..2f9d26774f3 100644 --- a/service/s3/api_op_PutBucketReplication.go +++ b/service/s3/api_op_PutBucketReplication.go @@ -143,6 +143,7 @@ type PutBucketReplicationInput struct { } func (in *PutBucketReplicationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketRequestPayment.go b/service/s3/api_op_PutBucketRequestPayment.go index 1d0949b2925..e0f9f31ef72 100644 --- a/service/s3/api_op_PutBucketRequestPayment.go +++ b/service/s3/api_op_PutBucketRequestPayment.go @@ -90,6 +90,7 @@ type PutBucketRequestPaymentInput struct { } func (in *PutBucketRequestPaymentInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketTagging.go b/service/s3/api_op_PutBucketTagging.go index f6ffa6b7bb9..2ed4fb6a176 100644 --- a/service/s3/api_op_PutBucketTagging.go +++ b/service/s3/api_op_PutBucketTagging.go @@ -122,6 +122,7 @@ type PutBucketTaggingInput struct { } func (in *PutBucketTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketVersioning.go b/service/s3/api_op_PutBucketVersioning.go index 3096bfd73e0..25b038ecf33 100644 --- a/service/s3/api_op_PutBucketVersioning.go +++ b/service/s3/api_op_PutBucketVersioning.go @@ -119,6 +119,7 @@ type PutBucketVersioningInput struct { } func (in *PutBucketVersioningInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutBucketWebsite.go b/service/s3/api_op_PutBucketWebsite.go index 0945edb1a21..65a7f39e44a 100644 --- a/service/s3/api_op_PutBucketWebsite.go +++ b/service/s3/api_op_PutBucketWebsite.go @@ -145,6 +145,7 @@ type PutBucketWebsiteInput struct { } func (in *PutBucketWebsiteInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_PutObject.go b/service/s3/api_op_PutObject.go index fffa96a7aba..270f19f1a4f 100644 --- a/service/s3/api_op_PutObject.go +++ b/service/s3/api_op_PutObject.go @@ -507,6 +507,7 @@ type PutObjectInput struct { } func (in *PutObjectInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_PutObjectAcl.go b/service/s3/api_op_PutObjectAcl.go index 504d91bd140..b0b50898aa2 100644 --- a/service/s3/api_op_PutObjectAcl.go +++ b/service/s3/api_op_PutObjectAcl.go @@ -291,6 +291,7 @@ type PutObjectAclInput struct { } func (in *PutObjectAclInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_PutObjectLegalHold.go b/service/s3/api_op_PutObjectLegalHold.go index c97c5b125dd..cbd9af75ef7 100644 --- a/service/s3/api_op_PutObjectLegalHold.go +++ b/service/s3/api_op_PutObjectLegalHold.go @@ -107,6 +107,7 @@ type PutObjectLegalHoldInput struct { } func (in *PutObjectLegalHoldInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_PutObjectLockConfiguration.go b/service/s3/api_op_PutObjectLockConfiguration.go index 6b81238d7f7..9a737f28534 100644 --- a/service/s3/api_op_PutObjectLockConfiguration.go +++ b/service/s3/api_op_PutObjectLockConfiguration.go @@ -98,6 +98,7 @@ type PutObjectLockConfigurationInput struct { } func (in *PutObjectLockConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_PutObjectRetention.go b/service/s3/api_op_PutObjectRetention.go index be54b741b90..00709c0774c 100644 --- a/service/s3/api_op_PutObjectRetention.go +++ b/service/s3/api_op_PutObjectRetention.go @@ -114,6 +114,7 @@ type PutObjectRetentionInput struct { } func (in *PutObjectRetentionInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_PutObjectTagging.go b/service/s3/api_op_PutObjectTagging.go index be9d01b112c..54485241dbf 100644 --- a/service/s3/api_op_PutObjectTagging.go +++ b/service/s3/api_op_PutObjectTagging.go @@ -153,6 +153,7 @@ type PutObjectTaggingInput struct { } func (in *PutObjectTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_PutPublicAccessBlock.go b/service/s3/api_op_PutPublicAccessBlock.go index 33ac3513ad7..97b8a8ae9e2 100644 --- a/service/s3/api_op_PutPublicAccessBlock.go +++ b/service/s3/api_op_PutPublicAccessBlock.go @@ -108,6 +108,7 @@ type PutPublicAccessBlockInput struct { } func (in *PutPublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.UseS3ExpressControlEndpoint = ptr.Bool(true) } diff --git a/service/s3/api_op_RestoreObject.go b/service/s3/api_op_RestoreObject.go index d468591a39f..53f7ffd3d90 100644 --- a/service/s3/api_op_RestoreObject.go +++ b/service/s3/api_op_RestoreObject.go @@ -248,6 +248,7 @@ type RestoreObjectInput struct { } func (in *RestoreObjectInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_SelectObjectContent.go b/service/s3/api_op_SelectObjectContent.go index da3c0574db1..c8663907e65 100644 --- a/service/s3/api_op_SelectObjectContent.go +++ b/service/s3/api_op_SelectObjectContent.go @@ -205,6 +205,7 @@ type SelectObjectContentInput struct { } func (in *SelectObjectContentInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket } diff --git a/service/s3/api_op_UploadPart.go b/service/s3/api_op_UploadPart.go index c554106dd30..231da759d5c 100644 --- a/service/s3/api_op_UploadPart.go +++ b/service/s3/api_op_UploadPart.go @@ -327,6 +327,7 @@ type UploadPartInput struct { } func (in *UploadPartInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.Key = in.Key diff --git a/service/s3/api_op_UploadPartCopy.go b/service/s3/api_op_UploadPartCopy.go index dc026920060..0b2c008b289 100644 --- a/service/s3/api_op_UploadPartCopy.go +++ b/service/s3/api_op_UploadPartCopy.go @@ -403,6 +403,7 @@ type UploadPartCopyInput struct { } func (in *UploadPartCopyInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.DisableS3ExpressSessionAuth = ptr.Bool(true) } diff --git a/service/s3/endpoints.go b/service/s3/endpoints.go index a938fec7845..4bc53cb91d6 100644 --- a/service/s3/endpoints.go +++ b/service/s3/endpoints.go @@ -426,6 +426,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go b/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go index cc67908a490..1f09aff4f1c 100644 --- a/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go +++ b/service/s3control/api_op_AssociateAccessGrantsIdentityCenter.go @@ -65,6 +65,7 @@ type AssociateAccessGrantsIdentityCenterInput struct { } func (in *AssociateAccessGrantsIdentityCenterInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_CreateAccessGrant.go b/service/s3control/api_op_CreateAccessGrant.go index 836ef9a5bb1..eba4995aa4a 100644 --- a/service/s3control/api_op_CreateAccessGrant.go +++ b/service/s3control/api_op_CreateAccessGrant.go @@ -117,6 +117,7 @@ type CreateAccessGrantInput struct { } func (in *CreateAccessGrantInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_CreateAccessGrantsInstance.go b/service/s3control/api_op_CreateAccessGrantsInstance.go index 5ce14160c02..7fade7acfc8 100644 --- a/service/s3control/api_op_CreateAccessGrantsInstance.go +++ b/service/s3control/api_op_CreateAccessGrantsInstance.go @@ -70,6 +70,7 @@ type CreateAccessGrantsInstanceInput struct { } func (in *CreateAccessGrantsInstanceInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_CreateAccessGrantsLocation.go b/service/s3control/api_op_CreateAccessGrantsLocation.go index b5160cee524..02f553df0f0 100644 --- a/service/s3control/api_op_CreateAccessGrantsLocation.go +++ b/service/s3control/api_op_CreateAccessGrantsLocation.go @@ -87,6 +87,7 @@ type CreateAccessGrantsLocationInput struct { } func (in *CreateAccessGrantsLocationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_CreateAccessPoint.go b/service/s3control/api_op_CreateAccessPoint.go index bf69bb6abb8..bbbafef402a 100644 --- a/service/s3control/api_op_CreateAccessPoint.go +++ b/service/s3control/api_op_CreateAccessPoint.go @@ -113,6 +113,7 @@ type CreateAccessPointInput struct { } func (in *CreateAccessPointInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_CreateAccessPointForObjectLambda.go b/service/s3control/api_op_CreateAccessPointForObjectLambda.go index 49759c8cdc8..9b312a42ddf 100644 --- a/service/s3control/api_op_CreateAccessPointForObjectLambda.go +++ b/service/s3control/api_op_CreateAccessPointForObjectLambda.go @@ -70,6 +70,7 @@ type CreateAccessPointForObjectLambdaInput struct { } func (in *CreateAccessPointForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_CreateBucket.go b/service/s3control/api_op_CreateBucket.go index d74a9d5b7d3..396d60bf50c 100644 --- a/service/s3control/api_op_CreateBucket.go +++ b/service/s3control/api_op_CreateBucket.go @@ -130,6 +130,7 @@ type CreateBucketInput struct { } func (in *CreateBucketInput) bindEndpointParams(p *EndpointParameters) { + p.Bucket = in.Bucket p.OutpostId = in.OutpostId diff --git a/service/s3control/api_op_CreateJob.go b/service/s3control/api_op_CreateJob.go index dddc9a5645c..d4480ff8e9d 100644 --- a/service/s3control/api_op_CreateJob.go +++ b/service/s3control/api_op_CreateJob.go @@ -121,6 +121,7 @@ type CreateJobInput struct { } func (in *CreateJobInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_CreateMultiRegionAccessPoint.go b/service/s3control/api_op_CreateMultiRegionAccessPoint.go index ea501daffd1..40e7d409c97 100644 --- a/service/s3control/api_op_CreateMultiRegionAccessPoint.go +++ b/service/s3control/api_op_CreateMultiRegionAccessPoint.go @@ -86,6 +86,7 @@ type CreateMultiRegionAccessPointInput struct { } func (in *CreateMultiRegionAccessPointInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_CreateStorageLensGroup.go b/service/s3control/api_op_CreateStorageLensGroup.go index a70c68bff92..906c24b4e47 100644 --- a/service/s3control/api_op_CreateStorageLensGroup.go +++ b/service/s3control/api_op_CreateStorageLensGroup.go @@ -71,6 +71,7 @@ type CreateStorageLensGroupInput struct { } func (in *CreateStorageLensGroupInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteAccessGrant.go b/service/s3control/api_op_DeleteAccessGrant.go index 203ce489683..00887445237 100644 --- a/service/s3control/api_op_DeleteAccessGrant.go +++ b/service/s3control/api_op_DeleteAccessGrant.go @@ -52,6 +52,7 @@ type DeleteAccessGrantInput struct { } func (in *DeleteAccessGrantInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteAccessGrantsInstance.go b/service/s3control/api_op_DeleteAccessGrantsInstance.go index cdb6968525b..7642c45bcea 100644 --- a/service/s3control/api_op_DeleteAccessGrantsInstance.go +++ b/service/s3control/api_op_DeleteAccessGrantsInstance.go @@ -55,6 +55,7 @@ type DeleteAccessGrantsInstanceInput struct { } func (in *DeleteAccessGrantsInstanceInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go b/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go index e0d1de823f3..585465735b8 100644 --- a/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go +++ b/service/s3control/api_op_DeleteAccessGrantsInstanceResourcePolicy.go @@ -48,6 +48,7 @@ type DeleteAccessGrantsInstanceResourcePolicyInput struct { } func (in *DeleteAccessGrantsInstanceResourcePolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteAccessGrantsLocation.go b/service/s3control/api_op_DeleteAccessGrantsLocation.go index 060ae8d792c..047c16e76c5 100644 --- a/service/s3control/api_op_DeleteAccessGrantsLocation.go +++ b/service/s3control/api_op_DeleteAccessGrantsLocation.go @@ -59,6 +59,7 @@ type DeleteAccessGrantsLocationInput struct { } func (in *DeleteAccessGrantsLocationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteAccessPoint.go b/service/s3control/api_op_DeleteAccessPoint.go index 1960267af2a..4f2f601ae13 100644 --- a/service/s3control/api_op_DeleteAccessPoint.go +++ b/service/s3control/api_op_DeleteAccessPoint.go @@ -81,6 +81,7 @@ type DeleteAccessPointInput struct { } func (in *DeleteAccessPointInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.AccessPointName = in.Name p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_DeleteAccessPointForObjectLambda.go b/service/s3control/api_op_DeleteAccessPointForObjectLambda.go index 7d535df5257..b53b595c375 100644 --- a/service/s3control/api_op_DeleteAccessPointForObjectLambda.go +++ b/service/s3control/api_op_DeleteAccessPointForObjectLambda.go @@ -62,6 +62,7 @@ type DeleteAccessPointForObjectLambdaInput struct { } func (in *DeleteAccessPointForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteAccessPointPolicy.go b/service/s3control/api_op_DeleteAccessPointPolicy.go index d6dfc769037..3ad2b42e70f 100644 --- a/service/s3control/api_op_DeleteAccessPointPolicy.go +++ b/service/s3control/api_op_DeleteAccessPointPolicy.go @@ -77,6 +77,7 @@ type DeleteAccessPointPolicyInput struct { } func (in *DeleteAccessPointPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.AccessPointName = in.Name p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go b/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go index 0037d2c6ef8..9428dffc757 100644 --- a/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go +++ b/service/s3control/api_op_DeleteAccessPointPolicyForObjectLambda.go @@ -59,6 +59,7 @@ type DeleteAccessPointPolicyForObjectLambdaInput struct { } func (in *DeleteAccessPointPolicyForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteBucket.go b/service/s3control/api_op_DeleteBucket.go index c24c0d1e64d..97570fd2ab2 100644 --- a/service/s3control/api_op_DeleteBucket.go +++ b/service/s3control/api_op_DeleteBucket.go @@ -85,6 +85,7 @@ type DeleteBucketInput struct { } func (in *DeleteBucketInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go b/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go index 801511e46d3..b8767e378db 100644 --- a/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_DeleteBucketLifecycleConfiguration.go @@ -94,6 +94,7 @@ type DeleteBucketLifecycleConfigurationInput struct { } func (in *DeleteBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_DeleteBucketPolicy.go b/service/s3control/api_op_DeleteBucketPolicy.go index 7043b5cd641..1799ddd62ea 100644 --- a/service/s3control/api_op_DeleteBucketPolicy.go +++ b/service/s3control/api_op_DeleteBucketPolicy.go @@ -97,6 +97,7 @@ type DeleteBucketPolicyInput struct { } func (in *DeleteBucketPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_DeleteBucketReplication.go b/service/s3control/api_op_DeleteBucketReplication.go index df189518f24..64628f12f3c 100644 --- a/service/s3control/api_op_DeleteBucketReplication.go +++ b/service/s3control/api_op_DeleteBucketReplication.go @@ -99,6 +99,7 @@ type DeleteBucketReplicationInput struct { } func (in *DeleteBucketReplicationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_DeleteBucketTagging.go b/service/s3control/api_op_DeleteBucketTagging.go index 60866a0c9df..8dec62374ef 100644 --- a/service/s3control/api_op_DeleteBucketTagging.go +++ b/service/s3control/api_op_DeleteBucketTagging.go @@ -85,6 +85,7 @@ type DeleteBucketTaggingInput struct { } func (in *DeleteBucketTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_DeleteJobTagging.go b/service/s3control/api_op_DeleteJobTagging.go index 5ac621bf054..e112b0d534b 100644 --- a/service/s3control/api_op_DeleteJobTagging.go +++ b/service/s3control/api_op_DeleteJobTagging.go @@ -64,6 +64,7 @@ type DeleteJobTaggingInput struct { } func (in *DeleteJobTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteMultiRegionAccessPoint.go b/service/s3control/api_op_DeleteMultiRegionAccessPoint.go index 63df78892a5..8ffd8401aa8 100644 --- a/service/s3control/api_op_DeleteMultiRegionAccessPoint.go +++ b/service/s3control/api_op_DeleteMultiRegionAccessPoint.go @@ -84,6 +84,7 @@ type DeleteMultiRegionAccessPointInput struct { } func (in *DeleteMultiRegionAccessPointInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeletePublicAccessBlock.go b/service/s3control/api_op_DeletePublicAccessBlock.go index 6da14a9f8ae..7f2c07f382a 100644 --- a/service/s3control/api_op_DeletePublicAccessBlock.go +++ b/service/s3control/api_op_DeletePublicAccessBlock.go @@ -56,6 +56,7 @@ type DeletePublicAccessBlockInput struct { } func (in *DeletePublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteStorageLensConfiguration.go b/service/s3control/api_op_DeleteStorageLensConfiguration.go index 281450a147a..8f558778a11 100644 --- a/service/s3control/api_op_DeleteStorageLensConfiguration.go +++ b/service/s3control/api_op_DeleteStorageLensConfiguration.go @@ -57,6 +57,7 @@ type DeleteStorageLensConfigurationInput struct { } func (in *DeleteStorageLensConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go b/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go index 35e41268b4e..71b1317c633 100644 --- a/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_DeleteStorageLensConfigurationTagging.go @@ -57,6 +57,7 @@ type DeleteStorageLensConfigurationTaggingInput struct { } func (in *DeleteStorageLensConfigurationTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DeleteStorageLensGroup.go b/service/s3control/api_op_DeleteStorageLensGroup.go index fb148b575f2..772604f08c8 100644 --- a/service/s3control/api_op_DeleteStorageLensGroup.go +++ b/service/s3control/api_op_DeleteStorageLensGroup.go @@ -57,6 +57,7 @@ type DeleteStorageLensGroupInput struct { } func (in *DeleteStorageLensGroupInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DescribeJob.go b/service/s3control/api_op_DescribeJob.go index 6b1793a2018..6e7cd0119cb 100644 --- a/service/s3control/api_op_DescribeJob.go +++ b/service/s3control/api_op_DescribeJob.go @@ -68,6 +68,7 @@ type DescribeJobInput struct { } func (in *DescribeJobInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go b/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go index 7fc48d12910..8c4f59f76bb 100644 --- a/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go +++ b/service/s3control/api_op_DescribeMultiRegionAccessPointOperation.go @@ -72,6 +72,7 @@ type DescribeMultiRegionAccessPointOperationInput struct { } func (in *DescribeMultiRegionAccessPointOperationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go b/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go index e3ca5f4062c..c9f87bcca30 100644 --- a/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go +++ b/service/s3control/api_op_DissociateAccessGrantsIdentityCenter.go @@ -49,6 +49,7 @@ type DissociateAccessGrantsIdentityCenterInput struct { } func (in *DissociateAccessGrantsIdentityCenterInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessGrant.go b/service/s3control/api_op_GetAccessGrant.go index bb47faa12dd..09970c43b79 100644 --- a/service/s3control/api_op_GetAccessGrant.go +++ b/service/s3control/api_op_GetAccessGrant.go @@ -53,6 +53,7 @@ type GetAccessGrantInput struct { } func (in *GetAccessGrantInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessGrantsInstance.go b/service/s3control/api_op_GetAccessGrantsInstance.go index b616025db9a..f9b44ddaa04 100644 --- a/service/s3control/api_op_GetAccessGrantsInstance.go +++ b/service/s3control/api_op_GetAccessGrantsInstance.go @@ -46,6 +46,7 @@ type GetAccessGrantsInstanceInput struct { } func (in *GetAccessGrantsInstanceInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go b/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go index e2b35ffe30e..ad411933465 100644 --- a/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go +++ b/service/s3control/api_op_GetAccessGrantsInstanceForPrefix.go @@ -54,6 +54,7 @@ type GetAccessGrantsInstanceForPrefixInput struct { } func (in *GetAccessGrantsInstanceForPrefixInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go b/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go index a033261d512..8280756370f 100644 --- a/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go +++ b/service/s3control/api_op_GetAccessGrantsInstanceResourcePolicy.go @@ -46,6 +46,7 @@ type GetAccessGrantsInstanceResourcePolicyInput struct { } func (in *GetAccessGrantsInstanceResourcePolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessGrantsLocation.go b/service/s3control/api_op_GetAccessGrantsLocation.go index d0ce2d23858..a9639aeff84 100644 --- a/service/s3control/api_op_GetAccessGrantsLocation.go +++ b/service/s3control/api_op_GetAccessGrantsLocation.go @@ -55,6 +55,7 @@ type GetAccessGrantsLocationInput struct { } func (in *GetAccessGrantsLocationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessPoint.go b/service/s3control/api_op_GetAccessPoint.go index 2ea37cc5265..9d6332271c5 100644 --- a/service/s3control/api_op_GetAccessPoint.go +++ b/service/s3control/api_op_GetAccessPoint.go @@ -84,6 +84,7 @@ type GetAccessPointInput struct { } func (in *GetAccessPointInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.AccessPointName = in.Name p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go b/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go index 97c1eee3f05..75715c81b61 100644 --- a/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointConfigurationForObjectLambda.go @@ -58,6 +58,7 @@ type GetAccessPointConfigurationForObjectLambdaInput struct { } func (in *GetAccessPointConfigurationForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessPointForObjectLambda.go b/service/s3control/api_op_GetAccessPointForObjectLambda.go index c57dabb633d..71d91bf3e65 100644 --- a/service/s3control/api_op_GetAccessPointForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointForObjectLambda.go @@ -64,6 +64,7 @@ type GetAccessPointForObjectLambdaInput struct { } func (in *GetAccessPointForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessPointPolicy.go b/service/s3control/api_op_GetAccessPointPolicy.go index 2dff36d5c35..076dcf0b84c 100644 --- a/service/s3control/api_op_GetAccessPointPolicy.go +++ b/service/s3control/api_op_GetAccessPointPolicy.go @@ -69,6 +69,7 @@ type GetAccessPointPolicyInput struct { } func (in *GetAccessPointPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.AccessPointName = in.Name p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go b/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go index 0525b77116f..b2d9ecbf0b0 100644 --- a/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointPolicyForObjectLambda.go @@ -59,6 +59,7 @@ type GetAccessPointPolicyForObjectLambdaInput struct { } func (in *GetAccessPointPolicyForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetAccessPointPolicyStatus.go b/service/s3control/api_op_GetAccessPointPolicyStatus.go index e880fd79a7e..5ed91bbf735 100644 --- a/service/s3control/api_op_GetAccessPointPolicyStatus.go +++ b/service/s3control/api_op_GetAccessPointPolicyStatus.go @@ -54,6 +54,7 @@ type GetAccessPointPolicyStatusInput struct { } func (in *GetAccessPointPolicyStatusInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.AccessPointName = in.Name p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go b/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go index 573bdfeabda..fd584eb55d3 100644 --- a/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go +++ b/service/s3control/api_op_GetAccessPointPolicyStatusForObjectLambda.go @@ -52,6 +52,7 @@ type GetAccessPointPolicyStatusForObjectLambdaInput struct { } func (in *GetAccessPointPolicyStatusForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetBucket.go b/service/s3control/api_op_GetBucket.go index d928e843770..30c569056f2 100644 --- a/service/s3control/api_op_GetBucket.go +++ b/service/s3control/api_op_GetBucket.go @@ -92,6 +92,7 @@ type GetBucketInput struct { } func (in *GetBucketInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetBucketLifecycleConfiguration.go b/service/s3control/api_op_GetBucketLifecycleConfiguration.go index 77156ad11db..a7dd8fa8b3e 100644 --- a/service/s3control/api_op_GetBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_GetBucketLifecycleConfiguration.go @@ -101,6 +101,7 @@ type GetBucketLifecycleConfigurationInput struct { } func (in *GetBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetBucketPolicy.go b/service/s3control/api_op_GetBucketPolicy.go index 837445486ed..addda712a32 100644 --- a/service/s3control/api_op_GetBucketPolicy.go +++ b/service/s3control/api_op_GetBucketPolicy.go @@ -102,6 +102,7 @@ type GetBucketPolicyInput struct { } func (in *GetBucketPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetBucketReplication.go b/service/s3control/api_op_GetBucketReplication.go index 13b59a6397c..214e38ca775 100644 --- a/service/s3control/api_op_GetBucketReplication.go +++ b/service/s3control/api_op_GetBucketReplication.go @@ -108,6 +108,7 @@ type GetBucketReplicationInput struct { } func (in *GetBucketReplicationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetBucketTagging.go b/service/s3control/api_op_GetBucketTagging.go index a75582e1721..e515816e38e 100644 --- a/service/s3control/api_op_GetBucketTagging.go +++ b/service/s3control/api_op_GetBucketTagging.go @@ -92,6 +92,7 @@ type GetBucketTaggingInput struct { } func (in *GetBucketTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetBucketVersioning.go b/service/s3control/api_op_GetBucketVersioning.go index dcee73f7417..d58579036a7 100644 --- a/service/s3control/api_op_GetBucketVersioning.go +++ b/service/s3control/api_op_GetBucketVersioning.go @@ -82,6 +82,7 @@ type GetBucketVersioningInput struct { } func (in *GetBucketVersioningInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_GetDataAccess.go b/service/s3control/api_op_GetDataAccess.go index aa27c498875..81b863ab90a 100644 --- a/service/s3control/api_op_GetDataAccess.go +++ b/service/s3control/api_op_GetDataAccess.go @@ -97,6 +97,7 @@ type GetDataAccessInput struct { } func (in *GetDataAccessInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetJobTagging.go b/service/s3control/api_op_GetJobTagging.go index dcade27c2b4..7719ef92ed7 100644 --- a/service/s3control/api_op_GetJobTagging.go +++ b/service/s3control/api_op_GetJobTagging.go @@ -65,6 +65,7 @@ type GetJobTaggingInput struct { } func (in *GetJobTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetMultiRegionAccessPoint.go b/service/s3control/api_op_GetMultiRegionAccessPoint.go index 4ce1fb97797..4222bbe5495 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPoint.go +++ b/service/s3control/api_op_GetMultiRegionAccessPoint.go @@ -76,6 +76,7 @@ type GetMultiRegionAccessPointInput struct { } func (in *GetMultiRegionAccessPointInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go b/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go index e7a8fa6cc1b..5b2b59b98dd 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointPolicy.go @@ -70,6 +70,7 @@ type GetMultiRegionAccessPointPolicyInput struct { } func (in *GetMultiRegionAccessPointPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go b/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go index a4ddcb3e153..321dfa4e3fd 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointPolicyStatus.go @@ -71,6 +71,7 @@ type GetMultiRegionAccessPointPolicyStatusInput struct { } func (in *GetMultiRegionAccessPointPolicyStatusInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go b/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go index 4b310767031..5f155feccc0 100644 --- a/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go +++ b/service/s3control/api_op_GetMultiRegionAccessPointRoutes.go @@ -66,6 +66,7 @@ type GetMultiRegionAccessPointRoutesInput struct { } func (in *GetMultiRegionAccessPointRoutesInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetPublicAccessBlock.go b/service/s3control/api_op_GetPublicAccessBlock.go index cc65f56da91..f5e3b29ab3c 100644 --- a/service/s3control/api_op_GetPublicAccessBlock.go +++ b/service/s3control/api_op_GetPublicAccessBlock.go @@ -57,6 +57,7 @@ type GetPublicAccessBlockInput struct { } func (in *GetPublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetStorageLensConfiguration.go b/service/s3control/api_op_GetStorageLensConfiguration.go index 6d859f9774a..bdd14726fc7 100644 --- a/service/s3control/api_op_GetStorageLensConfiguration.go +++ b/service/s3control/api_op_GetStorageLensConfiguration.go @@ -60,6 +60,7 @@ type GetStorageLensConfigurationInput struct { } func (in *GetStorageLensConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetStorageLensConfigurationTagging.go b/service/s3control/api_op_GetStorageLensConfigurationTagging.go index d863755eceb..b5e8a016973 100644 --- a/service/s3control/api_op_GetStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_GetStorageLensConfigurationTagging.go @@ -58,6 +58,7 @@ type GetStorageLensConfigurationTaggingInput struct { } func (in *GetStorageLensConfigurationTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_GetStorageLensGroup.go b/service/s3control/api_op_GetStorageLensGroup.go index bfbb50e2cbb..8b07cbc9ad1 100644 --- a/service/s3control/api_op_GetStorageLensGroup.go +++ b/service/s3control/api_op_GetStorageLensGroup.go @@ -59,6 +59,7 @@ type GetStorageLensGroupInput struct { } func (in *GetStorageLensGroupInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListAccessGrants.go b/service/s3control/api_op_ListAccessGrants.go index e5960cbd516..82701fda92a 100644 --- a/service/s3control/api_op_ListAccessGrants.go +++ b/service/s3control/api_op_ListAccessGrants.go @@ -98,6 +98,7 @@ type ListAccessGrantsInput struct { } func (in *ListAccessGrantsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListAccessGrantsInstances.go b/service/s3control/api_op_ListAccessGrantsInstances.go index f66f6b499f3..ce3e5f1b382 100644 --- a/service/s3control/api_op_ListAccessGrantsInstances.go +++ b/service/s3control/api_op_ListAccessGrantsInstances.go @@ -58,6 +58,7 @@ type ListAccessGrantsInstancesInput struct { } func (in *ListAccessGrantsInstancesInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListAccessGrantsLocations.go b/service/s3control/api_op_ListAccessGrantsLocations.go index 5b0000014b6..c4b35a3a364 100644 --- a/service/s3control/api_op_ListAccessGrantsLocations.go +++ b/service/s3control/api_op_ListAccessGrantsLocations.go @@ -64,6 +64,7 @@ type ListAccessGrantsLocationsInput struct { } func (in *ListAccessGrantsLocationsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListAccessPoints.go b/service/s3control/api_op_ListAccessPoints.go index 456bfefc5b2..c1fc8284ab6 100644 --- a/service/s3control/api_op_ListAccessPoints.go +++ b/service/s3control/api_op_ListAccessPoints.go @@ -96,6 +96,7 @@ type ListAccessPointsInput struct { } func (in *ListAccessPointsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_ListAccessPointsForObjectLambda.go b/service/s3control/api_op_ListAccessPointsForObjectLambda.go index a31fe2eeb15..8791b01d5f9 100644 --- a/service/s3control/api_op_ListAccessPointsForObjectLambda.go +++ b/service/s3control/api_op_ListAccessPointsForObjectLambda.go @@ -73,6 +73,7 @@ type ListAccessPointsForObjectLambdaInput struct { } func (in *ListAccessPointsForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListJobs.go b/service/s3control/api_op_ListJobs.go index 6dec676ac96..87d7341adaa 100644 --- a/service/s3control/api_op_ListJobs.go +++ b/service/s3control/api_op_ListJobs.go @@ -79,6 +79,7 @@ type ListJobsInput struct { } func (in *ListJobsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListMultiRegionAccessPoints.go b/service/s3control/api_op_ListMultiRegionAccessPoints.go index 36ec7b91259..9c8220eafbc 100644 --- a/service/s3control/api_op_ListMultiRegionAccessPoints.go +++ b/service/s3control/api_op_ListMultiRegionAccessPoints.go @@ -75,6 +75,7 @@ type ListMultiRegionAccessPointsInput struct { } func (in *ListMultiRegionAccessPointsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListRegionalBuckets.go b/service/s3control/api_op_ListRegionalBuckets.go index 176ba839f0d..f3e5506d661 100644 --- a/service/s3control/api_op_ListRegionalBuckets.go +++ b/service/s3control/api_op_ListRegionalBuckets.go @@ -65,6 +65,7 @@ type ListRegionalBucketsInput struct { } func (in *ListRegionalBucketsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.OutpostId = in.OutpostId p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_ListStorageLensConfigurations.go b/service/s3control/api_op_ListStorageLensConfigurations.go index 06c066d1202..04d98020037 100644 --- a/service/s3control/api_op_ListStorageLensConfigurations.go +++ b/service/s3control/api_op_ListStorageLensConfigurations.go @@ -56,6 +56,7 @@ type ListStorageLensConfigurationsInput struct { } func (in *ListStorageLensConfigurationsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListStorageLensGroups.go b/service/s3control/api_op_ListStorageLensGroups.go index b6e917c8595..002008cd018 100644 --- a/service/s3control/api_op_ListStorageLensGroups.go +++ b/service/s3control/api_op_ListStorageLensGroups.go @@ -55,6 +55,7 @@ type ListStorageLensGroupsInput struct { } func (in *ListStorageLensGroupsInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_ListTagsForResource.go b/service/s3control/api_op_ListTagsForResource.go index 118ff9a741c..6e5eb80b06e 100644 --- a/service/s3control/api_op_ListTagsForResource.go +++ b/service/s3control/api_op_ListTagsForResource.go @@ -69,6 +69,7 @@ type ListTagsForResourceInput struct { } func (in *ListTagsForResourceInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go b/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go index 52d412baeec..0e69cc429b0 100644 --- a/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go +++ b/service/s3control/api_op_PutAccessGrantsInstanceResourcePolicy.go @@ -54,6 +54,7 @@ type PutAccessGrantsInstanceResourcePolicyInput struct { } func (in *PutAccessGrantsInstanceResourcePolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go b/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go index a3e9fd920d1..1848da27f4d 100644 --- a/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go +++ b/service/s3control/api_op_PutAccessPointConfigurationForObjectLambda.go @@ -62,6 +62,7 @@ type PutAccessPointConfigurationForObjectLambdaInput struct { } func (in *PutAccessPointConfigurationForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutAccessPointPolicy.go b/service/s3control/api_op_PutAccessPointPolicy.go index 7ddd69313f2..216bfbf2691 100644 --- a/service/s3control/api_op_PutAccessPointPolicy.go +++ b/service/s3control/api_op_PutAccessPointPolicy.go @@ -89,6 +89,7 @@ type PutAccessPointPolicyInput struct { } func (in *PutAccessPointPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.AccessPointName = in.Name p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go b/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go index c72b3effda7..71633caa962 100644 --- a/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go +++ b/service/s3control/api_op_PutAccessPointPolicyForObjectLambda.go @@ -66,6 +66,7 @@ type PutAccessPointPolicyForObjectLambdaInput struct { } func (in *PutAccessPointPolicyForObjectLambdaInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutBucketLifecycleConfiguration.go b/service/s3control/api_op_PutBucketLifecycleConfiguration.go index 8714be3d4fe..869aabaf42c 100644 --- a/service/s3control/api_op_PutBucketLifecycleConfiguration.go +++ b/service/s3control/api_op_PutBucketLifecycleConfiguration.go @@ -76,6 +76,7 @@ type PutBucketLifecycleConfigurationInput struct { } func (in *PutBucketLifecycleConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_PutBucketPolicy.go b/service/s3control/api_op_PutBucketPolicy.go index f2c8c814699..4d483cd35fb 100644 --- a/service/s3control/api_op_PutBucketPolicy.go +++ b/service/s3control/api_op_PutBucketPolicy.go @@ -109,6 +109,7 @@ type PutBucketPolicyInput struct { } func (in *PutBucketPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_PutBucketReplication.go b/service/s3control/api_op_PutBucketReplication.go index 9f0d85cf9bb..cada03dd71a 100644 --- a/service/s3control/api_op_PutBucketReplication.go +++ b/service/s3control/api_op_PutBucketReplication.go @@ -147,6 +147,7 @@ type PutBucketReplicationInput struct { } func (in *PutBucketReplicationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_PutBucketTagging.go b/service/s3control/api_op_PutBucketTagging.go index 22b25b5edfe..733ad6bd8eb 100644 --- a/service/s3control/api_op_PutBucketTagging.go +++ b/service/s3control/api_op_PutBucketTagging.go @@ -130,6 +130,7 @@ type PutBucketTaggingInput struct { } func (in *PutBucketTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_PutBucketVersioning.go b/service/s3control/api_op_PutBucketVersioning.go index 0900a6f295a..8af8e6e8ebd 100644 --- a/service/s3control/api_op_PutBucketVersioning.go +++ b/service/s3control/api_op_PutBucketVersioning.go @@ -108,6 +108,7 @@ type PutBucketVersioningInput struct { } func (in *PutBucketVersioningInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.Bucket = in.Bucket p.RequiresAccountId = ptr.Bool(true) diff --git a/service/s3control/api_op_PutJobTagging.go b/service/s3control/api_op_PutJobTagging.go index bca5ee6ea4f..e54774be98e 100644 --- a/service/s3control/api_op_PutJobTagging.go +++ b/service/s3control/api_op_PutJobTagging.go @@ -101,6 +101,7 @@ type PutJobTaggingInput struct { } func (in *PutJobTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go b/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go index c50bae02359..ac0179445e0 100644 --- a/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go +++ b/service/s3control/api_op_PutMultiRegionAccessPointPolicy.go @@ -75,6 +75,7 @@ type PutMultiRegionAccessPointPolicyInput struct { } func (in *PutMultiRegionAccessPointPolicyInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutPublicAccessBlock.go b/service/s3control/api_op_PutPublicAccessBlock.go index 9881c1d8312..0785fb67c76 100644 --- a/service/s3control/api_op_PutPublicAccessBlock.go +++ b/service/s3control/api_op_PutPublicAccessBlock.go @@ -64,6 +64,7 @@ type PutPublicAccessBlockInput struct { } func (in *PutPublicAccessBlockInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutStorageLensConfiguration.go b/service/s3control/api_op_PutStorageLensConfiguration.go index 63ec340178c..bfb758dd151 100644 --- a/service/s3control/api_op_PutStorageLensConfiguration.go +++ b/service/s3control/api_op_PutStorageLensConfiguration.go @@ -70,6 +70,7 @@ type PutStorageLensConfigurationInput struct { } func (in *PutStorageLensConfigurationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_PutStorageLensConfigurationTagging.go b/service/s3control/api_op_PutStorageLensConfigurationTagging.go index 08925432586..938aa5f0606 100644 --- a/service/s3control/api_op_PutStorageLensConfigurationTagging.go +++ b/service/s3control/api_op_PutStorageLensConfigurationTagging.go @@ -65,6 +65,7 @@ type PutStorageLensConfigurationTaggingInput struct { } func (in *PutStorageLensConfigurationTaggingInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go b/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go index b55fd6bc538..9befd5883aa 100644 --- a/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go +++ b/service/s3control/api_op_SubmitMultiRegionAccessPointRoutes.go @@ -84,6 +84,7 @@ type SubmitMultiRegionAccessPointRoutesInput struct { } func (in *SubmitMultiRegionAccessPointRoutesInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_TagResource.go b/service/s3control/api_op_TagResource.go index 546ad6f27e3..75e8f214520 100644 --- a/service/s3control/api_op_TagResource.go +++ b/service/s3control/api_op_TagResource.go @@ -76,6 +76,7 @@ type TagResourceInput struct { } func (in *TagResourceInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_UntagResource.go b/service/s3control/api_op_UntagResource.go index 12b2b811e1e..83b79cf5399 100644 --- a/service/s3control/api_op_UntagResource.go +++ b/service/s3control/api_op_UntagResource.go @@ -74,6 +74,7 @@ type UntagResourceInput struct { } func (in *UntagResourceInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_UpdateAccessGrantsLocation.go b/service/s3control/api_op_UpdateAccessGrantsLocation.go index c3cab0a19db..47f4dcd1816 100644 --- a/service/s3control/api_op_UpdateAccessGrantsLocation.go +++ b/service/s3control/api_op_UpdateAccessGrantsLocation.go @@ -71,6 +71,7 @@ type UpdateAccessGrantsLocationInput struct { } func (in *UpdateAccessGrantsLocationInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_UpdateJobPriority.go b/service/s3control/api_op_UpdateJobPriority.go index cb84ddba7f6..6ec1c2d3bf9 100644 --- a/service/s3control/api_op_UpdateJobPriority.go +++ b/service/s3control/api_op_UpdateJobPriority.go @@ -72,6 +72,7 @@ type UpdateJobPriorityInput struct { } func (in *UpdateJobPriorityInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_UpdateJobStatus.go b/service/s3control/api_op_UpdateJobStatus.go index 0d985188463..9e9f60e60f4 100644 --- a/service/s3control/api_op_UpdateJobStatus.go +++ b/service/s3control/api_op_UpdateJobStatus.go @@ -78,6 +78,7 @@ type UpdateJobStatusInput struct { } func (in *UpdateJobStatusInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/api_op_UpdateStorageLensGroup.go b/service/s3control/api_op_UpdateStorageLensGroup.go index a807fa5577d..bdeb52870a6 100644 --- a/service/s3control/api_op_UpdateStorageLensGroup.go +++ b/service/s3control/api_op_UpdateStorageLensGroup.go @@ -62,6 +62,7 @@ type UpdateStorageLensGroupInput struct { } func (in *UpdateStorageLensGroupInput) bindEndpointParams(p *EndpointParameters) { + p.AccountId = in.AccountId p.RequiresAccountId = ptr.Bool(true) } diff --git a/service/s3control/endpoints.go b/service/s3control/endpoints.go index ff0d4c883d0..3956303f6ea 100644 --- a/service/s3control/endpoints.go +++ b/service/s3control/endpoints.go @@ -339,6 +339,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/s3outposts/endpoints.go b/service/s3outposts/endpoints.go index be2367c1487..b33aac96c7d 100644 --- a/service/s3outposts/endpoints.go +++ b/service/s3outposts/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sagemaker/api_op_DescribeEndpoint.go b/service/sagemaker/api_op_DescribeEndpoint.go index 7b81e11c258..1da0f98a5a6 100644 --- a/service/sagemaker/api_op_DescribeEndpoint.go +++ b/service/sagemaker/api_op_DescribeEndpoint.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/sagemaker/api_op_DescribeImage.go b/service/sagemaker/api_op_DescribeImage.go index e25f73bfc6f..a8446bdfb31 100644 --- a/service/sagemaker/api_op_DescribeImage.go +++ b/service/sagemaker/api_op_DescribeImage.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/sagemaker/api_op_DescribeImageVersion.go b/service/sagemaker/api_op_DescribeImageVersion.go index fa3f6350bee..a025a47dfec 100644 --- a/service/sagemaker/api_op_DescribeImageVersion.go +++ b/service/sagemaker/api_op_DescribeImageVersion.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/sagemaker/api_op_DescribeNotebookInstance.go b/service/sagemaker/api_op_DescribeNotebookInstance.go index 3daa5fe613b..ee6914228c7 100644 --- a/service/sagemaker/api_op_DescribeNotebookInstance.go +++ b/service/sagemaker/api_op_DescribeNotebookInstance.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/sagemaker/api_op_DescribeProcessingJob.go b/service/sagemaker/api_op_DescribeProcessingJob.go index 2703dca50d7..9d72e45bab1 100644 --- a/service/sagemaker/api_op_DescribeProcessingJob.go +++ b/service/sagemaker/api_op_DescribeProcessingJob.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/sagemaker/api_op_DescribeTrainingJob.go b/service/sagemaker/api_op_DescribeTrainingJob.go index 7d6c6204651..58b1f25ce05 100644 --- a/service/sagemaker/api_op_DescribeTrainingJob.go +++ b/service/sagemaker/api_op_DescribeTrainingJob.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/sagemaker/api_op_DescribeTransformJob.go b/service/sagemaker/api_op_DescribeTransformJob.go index 7e537109e88..f44819ae709 100644 --- a/service/sagemaker/api_op_DescribeTransformJob.go +++ b/service/sagemaker/api_op_DescribeTransformJob.go @@ -13,7 +13,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/sagemaker/endpoints.go b/service/sagemaker/endpoints.go index 41387aca80c..a4fc65625c1 100644 --- a/service/sagemaker/endpoints.go +++ b/service/sagemaker/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sagemakera2iruntime/endpoints.go b/service/sagemakera2iruntime/endpoints.go index cd218ffe984..b102f955a41 100644 --- a/service/sagemakera2iruntime/endpoints.go +++ b/service/sagemakera2iruntime/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sagemakeredge/endpoints.go b/service/sagemakeredge/endpoints.go index 50a06b81ba3..509a0aa981f 100644 --- a/service/sagemakeredge/endpoints.go +++ b/service/sagemakeredge/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sagemakerfeaturestoreruntime/endpoints.go b/service/sagemakerfeaturestoreruntime/endpoints.go index 7b99f211a94..222bafbeff4 100644 --- a/service/sagemakerfeaturestoreruntime/endpoints.go +++ b/service/sagemakerfeaturestoreruntime/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sagemakergeospatial/endpoints.go b/service/sagemakergeospatial/endpoints.go index e9a8da530ec..e0e969d2422 100644 --- a/service/sagemakergeospatial/endpoints.go +++ b/service/sagemakergeospatial/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sagemakermetrics/endpoints.go b/service/sagemakermetrics/endpoints.go index 7bf40109219..7e8d64e342b 100644 --- a/service/sagemakermetrics/endpoints.go +++ b/service/sagemakermetrics/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sagemakerruntime/endpoints.go b/service/sagemakerruntime/endpoints.go index 562ad39f508..c66c8b31854 100644 --- a/service/sagemakerruntime/endpoints.go +++ b/service/sagemakerruntime/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/savingsplans/endpoints.go b/service/savingsplans/endpoints.go index 7c368affb78..334db9d19a9 100644 --- a/service/savingsplans/endpoints.go +++ b/service/savingsplans/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/scheduler/endpoints.go b/service/scheduler/endpoints.go index 2b924ffb6e9..60f49ea803d 100644 --- a/service/scheduler/endpoints.go +++ b/service/scheduler/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/schemas/api_op_DescribeCodeBinding.go b/service/schemas/api_op_DescribeCodeBinding.go index a65c1126805..1521e90b560 100644 --- a/service/schemas/api_op_DescribeCodeBinding.go +++ b/service/schemas/api_op_DescribeCodeBinding.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/schemas/endpoints.go b/service/schemas/endpoints.go index 95c6676855f..fc751b6892f 100644 --- a/service/schemas/endpoints.go +++ b/service/schemas/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/secretsmanager/endpoints.go b/service/secretsmanager/endpoints.go index 52a50d132bb..b1ab339fb02 100644 --- a/service/secretsmanager/endpoints.go +++ b/service/secretsmanager/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/securityhub/endpoints.go b/service/securityhub/endpoints.go index e349da136c6..0e007488f0d 100644 --- a/service/securityhub/endpoints.go +++ b/service/securityhub/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/securitylake/endpoints.go b/service/securitylake/endpoints.go index 63a79f36076..a0bb89a1e5e 100644 --- a/service/securitylake/endpoints.go +++ b/service/securitylake/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/serverlessapplicationrepository/endpoints.go b/service/serverlessapplicationrepository/endpoints.go index a12e2c14ad3..a2a79a0a4dc 100644 --- a/service/serverlessapplicationrepository/endpoints.go +++ b/service/serverlessapplicationrepository/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/servicecatalog/endpoints.go b/service/servicecatalog/endpoints.go index 1dd96027932..2cca0051704 100644 --- a/service/servicecatalog/endpoints.go +++ b/service/servicecatalog/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/servicecatalogappregistry/endpoints.go b/service/servicecatalogappregistry/endpoints.go index 91bc6cf1b1a..c4bb737fd28 100644 --- a/service/servicecatalogappregistry/endpoints.go +++ b/service/servicecatalogappregistry/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/servicediscovery/endpoints.go b/service/servicediscovery/endpoints.go index bbddbb3c34e..84f5afda12b 100644 --- a/service/servicediscovery/endpoints.go +++ b/service/servicediscovery/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/servicequotas/endpoints.go b/service/servicequotas/endpoints.go index 9f0ab5bb90f..401c10f1aa5 100644 --- a/service/servicequotas/endpoints.go +++ b/service/servicequotas/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ses/api_op_GetIdentityVerificationAttributes.go b/service/ses/api_op_GetIdentityVerificationAttributes.go index e29fce0bb15..57336796fea 100644 --- a/service/ses/api_op_GetIdentityVerificationAttributes.go +++ b/service/ses/api_op_GetIdentityVerificationAttributes.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ses/endpoints.go b/service/ses/endpoints.go index ee2f8dccc94..9621815aa23 100644 --- a/service/ses/endpoints.go +++ b/service/ses/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sesv2/endpoints.go b/service/sesv2/endpoints.go index 27b84832b8d..2159f1226d0 100644 --- a/service/sesv2/endpoints.go +++ b/service/sesv2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sfn/endpoints.go b/service/sfn/endpoints.go index 2a377ea23ad..4fd2bf42fb4 100644 --- a/service/sfn/endpoints.go +++ b/service/sfn/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/shield/endpoints.go b/service/shield/endpoints.go index 7c8fde21144..69dd15ffd12 100644 --- a/service/shield/endpoints.go +++ b/service/shield/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/signer/api_op_DescribeSigningJob.go b/service/signer/api_op_DescribeSigningJob.go index 4e6c3c2ed90..7785b4491dc 100644 --- a/service/signer/api_op_DescribeSigningJob.go +++ b/service/signer/api_op_DescribeSigningJob.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/signer/endpoints.go b/service/signer/endpoints.go index 983582f6a64..f6b9dba6889 100644 --- a/service/signer/endpoints.go +++ b/service/signer/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/simspaceweaver/endpoints.go b/service/simspaceweaver/endpoints.go index 42423875db4..3f1ad3fb7fd 100644 --- a/service/simspaceweaver/endpoints.go +++ b/service/simspaceweaver/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sms/endpoints.go b/service/sms/endpoints.go index 9ea1398405c..74714c407e2 100644 --- a/service/sms/endpoints.go +++ b/service/sms/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/snowball/endpoints.go b/service/snowball/endpoints.go index 178635ee9a9..55cd1e9ca8a 100644 --- a/service/snowball/endpoints.go +++ b/service/snowball/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/snowdevicemanagement/endpoints.go b/service/snowdevicemanagement/endpoints.go index 7075aed2ade..7f25e26f317 100644 --- a/service/snowdevicemanagement/endpoints.go +++ b/service/snowdevicemanagement/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sns/endpoints.go b/service/sns/endpoints.go index 860e29126a1..5fb365aa0ef 100644 --- a/service/sns/endpoints.go +++ b/service/sns/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sqs/endpoints.go b/service/sqs/endpoints.go index c3929b9218f..64e7a3fdb9c 100644 --- a/service/sqs/endpoints.go +++ b/service/sqs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ssm/api_op_GetCommandInvocation.go b/service/ssm/api_op_GetCommandInvocation.go index 185186e7d40..b24decbc445 100644 --- a/service/ssm/api_op_GetCommandInvocation.go +++ b/service/ssm/api_op_GetCommandInvocation.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ssm/endpoints.go b/service/ssm/endpoints.go index 471576c6ccb..71564d76c8d 100644 --- a/service/ssm/endpoints.go +++ b/service/ssm/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ssmcontacts/endpoints.go b/service/ssmcontacts/endpoints.go index 4eebecd6f63..281d80b6a96 100644 --- a/service/ssmcontacts/endpoints.go +++ b/service/ssmcontacts/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ssmincidents/api_op_GetReplicationSet.go b/service/ssmincidents/api_op_GetReplicationSet.go index 329f18d65e6..5865b6efecf 100644 --- a/service/ssmincidents/api_op_GetReplicationSet.go +++ b/service/ssmincidents/api_op_GetReplicationSet.go @@ -12,7 +12,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/ssmincidents/endpoints.go b/service/ssmincidents/endpoints.go index d00eafd79aa..345f4defa1d 100644 --- a/service/ssmincidents/endpoints.go +++ b/service/ssmincidents/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ssmsap/endpoints.go b/service/ssmsap/endpoints.go index 799e917cafd..ed1dc9d7232 100644 --- a/service/ssmsap/endpoints.go +++ b/service/ssmsap/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sso/endpoints.go b/service/sso/endpoints.go index 21878edcaaa..75ae283ef86 100644 --- a/service/sso/endpoints.go +++ b/service/sso/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ssoadmin/endpoints.go b/service/ssoadmin/endpoints.go index 42708d5cc37..d5e217d29ba 100644 --- a/service/ssoadmin/endpoints.go +++ b/service/ssoadmin/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/ssooidc/endpoints.go b/service/ssooidc/endpoints.go index f409f76ae85..d7099721fe8 100644 --- a/service/ssooidc/endpoints.go +++ b/service/ssooidc/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/storagegateway/endpoints.go b/service/storagegateway/endpoints.go index d619e50f764..8c99a5d7ff8 100644 --- a/service/storagegateway/endpoints.go +++ b/service/storagegateway/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/sts/endpoints.go b/service/sts/endpoints.go index c99982cb577..35305d8976f 100644 --- a/service/sts/endpoints.go +++ b/service/sts/endpoints.go @@ -306,6 +306,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/supplychain/endpoints.go b/service/supplychain/endpoints.go index 4446ac9d4ff..fcffd82fa53 100644 --- a/service/supplychain/endpoints.go +++ b/service/supplychain/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/support/endpoints.go b/service/support/endpoints.go index 3d414fdebac..da60a01490c 100644 --- a/service/support/endpoints.go +++ b/service/support/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/supportapp/endpoints.go b/service/supportapp/endpoints.go index a42142ef9e0..a320440d7ce 100644 --- a/service/supportapp/endpoints.go +++ b/service/supportapp/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/swf/endpoints.go b/service/swf/endpoints.go index 2cbcf4f0a4c..42249177b4f 100644 --- a/service/swf/endpoints.go +++ b/service/swf/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/synthetics/endpoints.go b/service/synthetics/endpoints.go index 17e3ba4e4b2..4fc2ee25391 100644 --- a/service/synthetics/endpoints.go +++ b/service/synthetics/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/taxsettings/endpoints.go b/service/taxsettings/endpoints.go index cb2d7c96e1a..7f5cd940863 100644 --- a/service/taxsettings/endpoints.go +++ b/service/taxsettings/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/textract/endpoints.go b/service/textract/endpoints.go index 081fd99dfe3..078ac30f8ca 100644 --- a/service/textract/endpoints.go +++ b/service/textract/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/timestreaminfluxdb/endpoints.go b/service/timestreaminfluxdb/endpoints.go index 2f63838ef1d..fd3eb6e6620 100644 --- a/service/timestreaminfluxdb/endpoints.go +++ b/service/timestreaminfluxdb/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/timestreamquery/endpoints.go b/service/timestreamquery/endpoints.go index 2fe0b575707..4d0265671f9 100644 --- a/service/timestreamquery/endpoints.go +++ b/service/timestreamquery/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/timestreamwrite/endpoints.go b/service/timestreamwrite/endpoints.go index 308663c6ad8..e0226920b25 100644 --- a/service/timestreamwrite/endpoints.go +++ b/service/timestreamwrite/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/tnb/endpoints.go b/service/tnb/endpoints.go index f371743b8c3..5da7bb01f9d 100644 --- a/service/tnb/endpoints.go +++ b/service/tnb/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/transcribe/endpoints.go b/service/transcribe/endpoints.go index 856e89c81a6..ad41c73d079 100644 --- a/service/transcribe/endpoints.go +++ b/service/transcribe/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/transcribestreaming/endpoints.go b/service/transcribestreaming/endpoints.go index 1a840cd9264..0beb80d42ab 100644 --- a/service/transcribestreaming/endpoints.go +++ b/service/transcribestreaming/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/transfer/api_op_DescribeServer.go b/service/transfer/api_op_DescribeServer.go index 2e5c66b6163..d485a715a46 100644 --- a/service/transfer/api_op_DescribeServer.go +++ b/service/transfer/api_op_DescribeServer.go @@ -11,7 +11,7 @@ import ( 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" + jmespath "github.com/jmespath/go-jmespath" "time" ) diff --git a/service/transfer/endpoints.go b/service/transfer/endpoints.go index b32808b1c85..32fef75448d 100644 --- a/service/transfer/endpoints.go +++ b/service/transfer/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/translate/endpoints.go b/service/translate/endpoints.go index 272984a80f0..849bb4fa98f 100644 --- a/service/translate/endpoints.go +++ b/service/translate/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/trustedadvisor/endpoints.go b/service/trustedadvisor/endpoints.go index 605dc05dd2e..da858b032d8 100644 --- a/service/trustedadvisor/endpoints.go +++ b/service/trustedadvisor/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/verifiedpermissions/endpoints.go b/service/verifiedpermissions/endpoints.go index 91d0b1b80d1..87c74a992ea 100644 --- a/service/verifiedpermissions/endpoints.go +++ b/service/verifiedpermissions/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/voiceid/endpoints.go b/service/voiceid/endpoints.go index 512ce97444d..a61c43a93ce 100644 --- a/service/voiceid/endpoints.go +++ b/service/voiceid/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/vpclattice/endpoints.go b/service/vpclattice/endpoints.go index a49c7056233..459829a76d1 100644 --- a/service/vpclattice/endpoints.go +++ b/service/vpclattice/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/waf/endpoints.go b/service/waf/endpoints.go index 944ab1c658d..2b68577ef37 100644 --- a/service/waf/endpoints.go +++ b/service/waf/endpoints.go @@ -289,6 +289,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/wafregional/endpoints.go b/service/wafregional/endpoints.go index 7c51e82a280..3b6f4dc2533 100644 --- a/service/wafregional/endpoints.go +++ b/service/wafregional/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/wafv2/endpoints.go b/service/wafv2/endpoints.go index 9de5f375e0d..2ba8b04c5ba 100644 --- a/service/wafv2/endpoints.go +++ b/service/wafv2/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/wellarchitected/endpoints.go b/service/wellarchitected/endpoints.go index 9520c6b7727..1c8e9e6bddf 100644 --- a/service/wellarchitected/endpoints.go +++ b/service/wellarchitected/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/wisdom/endpoints.go b/service/wisdom/endpoints.go index badf974d39b..34ac3741188 100644 --- a/service/wisdom/endpoints.go +++ b/service/wisdom/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/workdocs/endpoints.go b/service/workdocs/endpoints.go index f0575f36b6c..20bf38c692a 100644 --- a/service/workdocs/endpoints.go +++ b/service/workdocs/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/worklink/endpoints.go b/service/worklink/endpoints.go index e1080f39341..1a53ca722fe 100644 --- a/service/worklink/endpoints.go +++ b/service/worklink/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/workmail/endpoints.go b/service/workmail/endpoints.go index c9e8dc3779f..885e158a819 100644 --- a/service/workmail/endpoints.go +++ b/service/workmail/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/workmailmessageflow/endpoints.go b/service/workmailmessageflow/endpoints.go index 1ef7e8dc0aa..aa5ed69123e 100644 --- a/service/workmailmessageflow/endpoints.go +++ b/service/workmailmessageflow/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/workspaces/endpoints.go b/service/workspaces/endpoints.go index 5786ac19430..cd753c3a6ef 100644 --- a/service/workspaces/endpoints.go +++ b/service/workspaces/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/workspacesthinclient/endpoints.go b/service/workspacesthinclient/endpoints.go index dc3a400dfa8..72e716108cc 100644 --- a/service/workspacesthinclient/endpoints.go +++ b/service/workspacesthinclient/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/workspacesweb/endpoints.go b/service/workspacesweb/endpoints.go index 37379152215..ee12f4affb6 100644 --- a/service/workspacesweb/endpoints.go +++ b/service/workspacesweb/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options, diff --git a/service/xray/endpoints.go b/service/xray/endpoints.go index fe7a96c2fa7..1fe7bd83d12 100644 --- a/service/xray/endpoints.go +++ b/service/xray/endpoints.go @@ -288,6 +288,17 @@ func (p EndpointParameters) WithDefaults() EndpointParameters { return p } +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + // EndpointResolverV2 provides the interface for resolving service endpoints. type EndpointResolverV2 interface { // ResolveEndpoint attempts to resolve the endpoint with the provided options,