From 6c1e630ae25491e64dff4e94c5c5d8c579bc3487 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 9 Nov 2021 11:59:15 -0800 Subject: [PATCH 1/5] Updated Smithy to 1.13.1 --- codegen/protocol-test-codegen/build.gradle.kts | 2 +- codegen/sdk-codegen/build.gradle.kts | 2 +- codegen/smithy-aws-go-codegen/build.gradle.kts | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/codegen/protocol-test-codegen/build.gradle.kts b/codegen/protocol-test-codegen/build.gradle.kts index 425ed587682..2da07cf2910 100644 --- a/codegen/protocol-test-codegen/build.gradle.kts +++ b/codegen/protocol-test-codegen/build.gradle.kts @@ -20,7 +20,7 @@ plugins { } dependencies { - implementation("software.amazon.smithy:smithy-aws-protocol-tests:[1.6.0,1.10.0[") + implementation("software.amazon.smithy:smithy-aws-protocol-tests:[1.13.1,1.14.0[") implementation(project(":smithy-aws-go-codegen")) } diff --git a/codegen/sdk-codegen/build.gradle.kts b/codegen/sdk-codegen/build.gradle.kts index ffeba2fb224..41f06458e2f 100644 --- a/codegen/sdk-codegen/build.gradle.kts +++ b/codegen/sdk-codegen/build.gradle.kts @@ -22,7 +22,7 @@ import kotlin.streams.toList buildscript { dependencies { - "classpath"("software.amazon.smithy:smithy-aws-traits:[1.5.1,2.0.0[") + "classpath"("software.amazon.smithy:smithy-aws-traits:[1.13.1,2.0.0[") } } diff --git a/codegen/smithy-aws-go-codegen/build.gradle.kts b/codegen/smithy-aws-go-codegen/build.gradle.kts index 7b2c0537f16..5160921f994 100644 --- a/codegen/smithy-aws-go-codegen/build.gradle.kts +++ b/codegen/smithy-aws-go-codegen/build.gradle.kts @@ -32,9 +32,9 @@ tasks.withType { } dependencies { - api("software.amazon.smithy:smithy-aws-traits:[1.5.1,2.0.0[") - api("software.amazon.smithy:smithy-aws-iam-traits:[1.6.1,2.0.0[") - api("software.amazon.smithy:smithy-aws-cloudformation-traits:[1.8.0,2.0.0[") + api("software.amazon.smithy:smithy-aws-traits:[1.13.1,2.0.0[") + api("software.amazon.smithy:smithy-aws-iam-traits:[1.13.1,2.0.0[") + api("software.amazon.smithy:smithy-aws-cloudformation-traits:[1.13.1,2.0.0[") api("software.amazon.smithy.go:smithy-go-codegen:0.1.0") testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.0") testImplementation("org.junit.jupiter:junit-jupiter-engine:5.4.0") From ab4d403351de304d91161f7e9b0a4035aa465962 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 9 Nov 2021 21:54:47 -0600 Subject: [PATCH 2/5] Support tests for endpoints custom paths. --- .../software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 9212e3d0887..8146f1e83c0 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 @@ -56,7 +56,7 @@ static void generateHttpProtocolTests(GenerationContext context) { writer.addUseImports(AwsGoDependency.AWS_CORE); writer.openBlock("$L(func(region string, options $L) (e aws.Endpoint, err error) {", "}),", EndpointGenerator.RESOLVER_FUNC_NAME, EndpointGenerator.RESOLVER_OPTIONS, () -> { - writer.write("e.URL = url"); + writer.write("e.URL = serverURL"); writer.write("e.SigningRegion = \"us-west-2\""); writer.write("return e, err"); }); From 55f9b13b2f6c6df9c35e341aafc4ff58936644d0 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 9 Nov 2021 21:58:15 -0600 Subject: [PATCH 3/5] Improve support for delegating httpPayload trait behavior. Resolves failures in AWS Protocol Tests --- .../go/codegen/RestJsonProtocolGenerator.java | 34 ++++++++--- .../go/codegen/RestXmlProtocolGenerator.java | 56 +++++++++++-------- 2 files changed, 57 insertions(+), 33 deletions(-) diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java index ed12d616599..b43ea7748eb 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java @@ -24,11 +24,13 @@ import java.util.Optional; import java.util.Set; import java.util.TreeSet; +import java.util.function.Consumer; import java.util.function.Predicate; import java.util.stream.Collectors; import software.amazon.smithy.codegen.core.CodegenException; import software.amazon.smithy.codegen.core.Symbol; import software.amazon.smithy.go.codegen.GoStackStepMiddlewareGenerator; +import software.amazon.smithy.go.codegen.GoValueAccessUtils; import software.amazon.smithy.go.codegen.GoWriter; import software.amazon.smithy.go.codegen.SmithyGoDependency; import software.amazon.smithy.go.codegen.SyntheticClone; @@ -54,6 +56,7 @@ import software.amazon.smithy.model.traits.MediaTypeTrait; import software.amazon.smithy.model.traits.StreamingTrait; import software.amazon.smithy.model.traits.TimestampFormatTrait; +import software.amazon.smithy.model.traits.XmlNamespaceTrait; /** * Handles general components across the AWS JSON protocols that have HTTP bindings. @@ -104,7 +107,8 @@ protected void generateOperationDocumentSerializer( protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( GenerationContext context, MemberShape memberShape, - String operand + String operand, + Consumer setStream ) { GoWriter writer = context.getWriter().get(); Model model = context.getModel(); @@ -119,15 +123,27 @@ protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( payloadShape, context.getService(), context.getProtocolName()); } - writer.addUseImports(SmithyGoDependency.SMITHY_JSON); - writer.write("jsonEncoder := smithyjson.NewEncoder()"); - writer.openBlock("if err := $L($L, jsonEncoder.Value); err != nil {", "}", functionName, - operand, () -> { - writer.write("return out, metadata, &smithy.SerializationError{Err: err}"); + GoValueAccessUtils.writeIfNonZeroValueMember(context.getModel(), context.getSymbolProvider(), writer, + memberShape, operand, (s) -> { + writer.addUseImports(SmithyGoDependency.SMITHY_JSON); + writer.addUseImports(SmithyGoDependency.BYTES); + writer.write(""" + jsonEncoder := smithyjson.NewEncoder() + if err := $L($L, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes())""", functionName, s); + setStream.accept(writer); + if (payloadShape.isStructureShape()) { + writer.openBlock("} else {", "", () -> { + writer.write(""" + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes())"""); + setStream.accept(writer); + }); + } }); - - writer.addUseImports(SmithyGoDependency.BYTES); - writer.write("payload := bytes.NewReader(jsonEncoder.Bytes())"); } /** diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java index 19344f657da..3abe8c3ba8b 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java @@ -11,6 +11,7 @@ import java.util.HashSet; import java.util.Optional; import java.util.Set; +import java.util.function.Consumer; import java.util.stream.Collectors; import java.util.TreeSet; import java.util.function.Predicate; @@ -19,6 +20,7 @@ import software.amazon.smithy.codegen.core.Symbol; import software.amazon.smithy.codegen.core.SymbolProvider; import software.amazon.smithy.go.codegen.GoStackStepMiddlewareGenerator; +import software.amazon.smithy.go.codegen.GoValueAccessUtils; import software.amazon.smithy.go.codegen.GoWriter; import software.amazon.smithy.go.codegen.SmithyGoDependency; import software.amazon.smithy.go.codegen.SymbolUtils; @@ -114,7 +116,7 @@ protected void writeMiddlewareDocumentSerializerDelegator( writer.insertTrailingNewline(); writer.openBlock("if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); " - + "err != nil {", "}", () -> { + + "err != nil {", "}", () -> { writer.write("return out, metadata, &smithy.SerializationError{Err: err}"); }); } @@ -146,34 +148,40 @@ private void initalizeXmlEncoder( protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( GenerationContext context, MemberShape memberShape, - String operand + String operand, + Consumer setStream ) { GoWriter writer = context.getWriter().get(); Model model = context.getModel(); Shape payloadShape = model.expectShape(memberShape.getTarget()); - writer.addUseImports(SmithyGoDependency.SMITHY_XML); - writer.addUseImports(SmithyGoDependency.BYTES); - writer.write("xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))"); - - generatePayloadAsDocumentXMLStartElement(context, memberShape, "payloadRoot", operand); - - // check if service shape is bound by xmlNameSpace Trait - Optional xmlNamespaceTrait = context.getService().getTrait(XmlNamespaceTrait.class); - if (xmlNamespaceTrait.isPresent()) { - XmlNamespaceTrait namespace = xmlNamespaceTrait.get(); - writer.write("payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute($S, $S))", - namespace.getPrefix().isPresent() ? namespace.getPrefix().get() : "", namespace.getUri() - ); - } + GoValueAccessUtils.writeIfNonZeroValueMember(context.getModel(), context.getSymbolProvider(), writer, + memberShape, operand, (s) -> { + writer.addUseImports(SmithyGoDependency.SMITHY_XML); + writer.addUseImports(SmithyGoDependency.BYTES); + writer.write("xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))"); + + generatePayloadAsDocumentXMLStartElement(context, memberShape, "payloadRoot", s); + + // check if service shape is bound by xmlNameSpace Trait + Optional xmlNamespaceTrait = context.getService() + .getTrait(XmlNamespaceTrait.class); + if (xmlNamespaceTrait.isPresent()) { + XmlNamespaceTrait namespace = xmlNamespaceTrait.get(); + writer.write("payloadRoot.Attr = append(payloadRoot.Attr, smithyxml.NewNamespaceAttribute($S, $S))", + namespace.getPrefix().isPresent() ? namespace.getPrefix().get() : "", namespace.getUri() + ); + } - String functionName = ProtocolGenerator.getDocumentSerializerFunctionName( - payloadShape, context.getService(), getProtocolName()); - writer.openBlock("if err := $L($L, xmlEncoder.RootElement(payloadRoot)); err != nil {", "}", functionName, - operand, () -> { - writer.write("return out, metadata, &smithy.SerializationError{Err: err}"); + String functionName = ProtocolGenerator.getDocumentSerializerFunctionName( + payloadShape, context.getService(), getProtocolName()); + writer.openBlock("if err := $L($L, xmlEncoder.RootElement(payloadRoot)); err != nil {", "}", functionName, + s, () -> { + writer.write("return out, metadata, &smithy.SerializationError{Err: err}"); + }); + writer.write("payload := bytes.NewReader(xmlEncoder.Bytes())"); + setStream.accept(writer); }); - writer.write("payload := bytes.NewReader(xmlEncoder.Bytes())"); } @Override @@ -490,7 +498,7 @@ protected void generateEventStreamSerializers( var hasBindings = targetShape.members().stream() .filter(ms -> ms.getTrait(EventHeaderTrait.class).isPresent() - || ms.getTrait(EventPayloadTrait.class).isPresent()) + || ms.getTrait(EventPayloadTrait.class).isPresent()) .findAny(); if (hasBindings.isPresent()) { var payload = targetShape.members().stream() @@ -609,7 +617,7 @@ protected void generateEventStreamDeserializers( var hasBindings = targetShape.members().stream() .filter(ms -> ms.getTrait(EventHeaderTrait.class).isPresent() - || ms.getTrait(EventPayloadTrait.class).isPresent()) + || ms.getTrait(EventPayloadTrait.class).isPresent()) .findAny(); if (hasBindings.isPresent()) { var payload = targetShape.members().stream() From 06e5fdffb6d9e5cfbac66994f3d3811e48a0664f Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Tue, 9 Nov 2021 21:59:52 -0600 Subject: [PATCH 4/5] Regenerated Clients --- .../awsrestjson/api_op_AllQueryStringTypes.go | 2 +- .../api_op_AllQueryStringTypes_test.go | 26 +- ..._op_ConstantAndVariableQueryString_test.go | 16 +- .../api_op_ConstantQueryString_test.go | 16 +- .../api_op_DocumentTypeAsPayload_test.go | 20 +- .../awsrestjson/api_op_DocumentType_test.go | 20 +- .../api_op_EmptyInputAndEmptyOutput_test.go | 20 +- .../api_op_EndpointOperation_test.go | 27 +- ..._op_EndpointWithHostLabelOperation_test.go | 27 +- .../api_op_GreetingWithErrors_test.go | 16 +- .../api_op_HostWithPathOperation.go | 98 + .../api_op_HostWithPathOperation_test.go | 133 + .../api_op_HttpChecksumRequired.go | 106 + .../api_op_HttpChecksumRequired_test.go | 133 + .../api_op_HttpEnumPayload_test.go | 20 +- ..._op_HttpPayloadTraitsWithMediaType_test.go | 20 +- .../api_op_HttpPayloadTraits_test.go | 20 +- .../api_op_HttpPayloadWithStructure_test.go | 20 +- .../api_op_HttpPrefixHeadersResponse_test.go | 4 +- .../api_op_HttpPrefixHeaders_test.go | 20 +- .../api_op_HttpRequestWithFloatLabels_test.go | 16 +- ...p_HttpRequestWithGreedyLabelInPath_test.go | 16 +- ...equestWithLabelsAndTimestampFormat_test.go | 16 +- .../api_op_HttpRequestWithLabels_test.go | 16 +- .../api_op_HttpResponseCode_test.go | 4 +- .../api_op_HttpStringPayload_test.go | 20 +- ...api_op_IgnoreQueryParamsInResponse_test.go | 4 +- .../api_op_InputAndOutputWithHeaders_test.go | 20 +- .../awsrestjson/api_op_JsonBlobs_test.go | 20 +- .../awsrestjson/api_op_JsonEnums_test.go | 20 +- .../awsrestjson/api_op_JsonLists_test.go | 20 +- .../awsrestjson/api_op_JsonMaps_test.go | 20 +- .../awsrestjson/api_op_JsonTimestamps_test.go | 20 +- .../awsrestjson/api_op_JsonUnions_test.go | 20 +- .../api_op_MalformedAcceptWithBody.go | 100 + ...api_op_MalformedAcceptWithGenericString.go | 100 + .../api_op_MalformedAcceptWithPayload.go | 102 + .../awsrestjson/api_op_MalformedBlob.go | 100 + .../awsrestjson/api_op_MalformedBoolean.go | 111 + .../awsrestjson/api_op_MalformedByte.go | 111 + .../api_op_MalformedContentTypeWithBody.go | 100 + ...p_MalformedContentTypeWithGenericString.go | 100 + .../api_op_MalformedContentTypeWithPayload.go | 102 + .../api_op_MalformedContentTypeWithoutBody.go | 98 + .../awsrestjson/api_op_MalformedDouble.go | 111 + .../awsrestjson/api_op_MalformedFloat.go | 111 + .../awsrestjson/api_op_MalformedInteger.go | 111 + .../awsrestjson/api_op_MalformedList.go | 100 + .../awsrestjson/api_op_MalformedLong.go | 111 + .../awsrestjson/api_op_MalformedMap.go | 100 + .../api_op_MalformedRequestBody.go | 102 + .../awsrestjson/api_op_MalformedSet.go | 100 + .../awsrestjson/api_op_MalformedShort.go | 111 + .../awsrestjson/api_op_MalformedString.go | 102 + .../api_op_MalformedTimestampBodyDateTime.go | 106 + .../api_op_MalformedTimestampBodyDefault.go | 106 + .../api_op_MalformedTimestampBodyHttpDate.go | 106 + ...api_op_MalformedTimestampHeaderDateTime.go | 106 + .../api_op_MalformedTimestampHeaderDefault.go | 106 + .../api_op_MalformedTimestampHeaderEpoch.go | 106 + .../api_op_MalformedTimestampPathDefault.go | 106 + .../api_op_MalformedTimestampPathEpoch.go | 106 + .../api_op_MalformedTimestampPathHttpDate.go | 106 + .../api_op_MalformedTimestampQueryDefault.go | 106 + .../api_op_MalformedTimestampQueryEpoch.go | 106 + .../api_op_MalformedTimestampQueryHttpDate.go | 106 + .../awsrestjson/api_op_MalformedUnion.go | 101 + .../api_op_MediaTypeHeader_test.go | 20 +- .../api_op_NoInputAndNoOutput_test.go | 20 +- .../api_op_NoInputAndOutput_test.go | 20 +- .../api_op_NullAndEmptyHeadersClient_test.go | 16 +- ..._op_OmitsNullSerializesEmptyString_test.go | 16 +- ...i_op_QueryIdempotencyTokenAutoFill_test.go | 16 +- .../api_op_QueryParamsAsStringListMap_test.go | 16 +- .../api_op_QueryPrecedence_test.go | 16 +- .../api_op_RecursiveShapes_test.go | 20 +- .../api_op_SimpleScalarProperties_test.go | 20 +- ...pi_op_StreamingTraitsRequireLength_test.go | 20 +- ...pi_op_StreamingTraitsWithMediaType_test.go | 20 +- .../api_op_StreamingTraits_test.go | 20 +- .../awsrestjson/api_op_TestBodyStructure.go | 110 + .../api_op_TestBodyStructure_test.go | 154 + .../awsrestjson/api_op_TestNoPayload.go | 105 + .../awsrestjson/api_op_TestNoPayload_test.go | 146 + .../awsrestjson/api_op_TestPayloadBlob.go | 111 + .../api_op_TestPayloadBlob_test.go | 151 + .../api_op_TestPayloadStructure.go | 110 + .../api_op_TestPayloadStructure_test.go | 173 + .../api_op_TimestampFormatHeaders_test.go | 20 +- .../protocoltest/awsrestjson/deserializers.go | 4619 ++++++++++++++-- .../protocoltest/awsrestjson/generated.json | 45 + .../protocoltest/awsrestjson/serializers.go | 3274 +++++++++++- .../protocoltest/awsrestjson/types/types.go | 38 +- .../awsrestjson/types/types_exported_test.go | 22 + .../protocoltest/awsrestjson/validators.go | 761 ++- .../api_op_EmptyInputAndEmptyOutput_test.go | 20 +- .../ec2query/api_op_EndpointOperation_test.go | 27 +- ..._op_EndpointWithHostLabelOperation_test.go | 27 +- .../api_op_GreetingWithErrors_test.go | 12 +- .../ec2query/api_op_HostWithPathOperation.go | 98 + .../api_op_HostWithPathOperation_test.go | 133 + .../api_op_IgnoresWrappingXmlName_test.go | 4 +- .../ec2query/api_op_NestedStructures_test.go | 16 +- .../ec2query/api_op_NoInputAndOutput_test.go | 20 +- ...i_op_QueryIdempotencyTokenAutoFill_test.go | 16 +- .../ec2query/api_op_QueryLists_test.go | 16 +- .../ec2query/api_op_QueryTimestamps_test.go | 16 +- .../api_op_RecursiveXmlShapes_test.go | 4 +- .../ec2query/api_op_SimpleInputParams_test.go | 16 +- .../api_op_SimpleScalarXmlProperties_test.go | 4 +- .../ec2query/api_op_XmlBlobs_test.go | 4 +- .../ec2query/api_op_XmlEmptyBlobs_test.go | 4 +- .../ec2query/api_op_XmlEmptyLists_test.go | 4 +- .../ec2query/api_op_XmlEnums_test.go | 4 +- .../ec2query/api_op_XmlLists_test.go | 4 +- .../ec2query/api_op_XmlNamespaces_test.go | 4 +- .../ec2query/api_op_XmlTimestamps_test.go | 4 +- .../protocoltest/ec2query/deserializers.go | 68 + internal/protocoltest/ec2query/generated.json | 2 + internal/protocoltest/ec2query/serializers.go | 261 +- .../jsonrpc/api_op_EmptyOperation_test.go | 20 +- .../jsonrpc/api_op_EndpointOperation_test.go | 27 +- ..._op_EndpointWithHostLabelOperation_test.go | 27 +- .../jsonrpc/api_op_GreetingWithErrors_test.go | 12 +- .../jsonrpc/api_op_HostWithPathOperation.go | 106 + .../api_op_HostWithPathOperation_test.go | 131 + .../jsonrpc/api_op_JsonEnums_test.go | 20 +- .../jsonrpc/api_op_JsonUnions_test.go | 20 +- .../api_op_KitchenSinkOperation_test.go | 20 +- .../jsonrpc/api_op_NullOperation_test.go | 20 +- ...p_OperationWithOptionalInputOutput_test.go | 16 +- .../api_op_PutAndGetInlineDocuments_test.go | 20 +- .../api_op_SimpleScalarProperties_test.go | 20 +- .../protocoltest/jsonrpc/deserializers.go | 86 + internal/protocoltest/jsonrpc/generated.json | 2 + internal/protocoltest/jsonrpc/serializers.go | 161 +- .../api_op_EmptyInputAndEmptyOutput_test.go | 20 +- .../api_op_EndpointOperation_test.go | 27 +- ..._op_EndpointWithHostLabelOperation_test.go | 27 +- .../api_op_GreetingWithErrors_test.go | 12 +- .../jsonrpc10/api_op_HostWithPathOperation.go | 98 + .../api_op_HostWithPathOperation_test.go | 131 + .../jsonrpc10/api_op_JsonUnions_test.go | 20 +- .../api_op_NoInputAndNoOutput_test.go | 20 +- .../jsonrpc10/api_op_NoInputAndOutput_test.go | 20 +- .../api_op_SimpleScalarProperties_test.go | 20 +- .../protocoltest/jsonrpc10/deserializers.go | 86 + .../protocoltest/jsonrpc10/generated.json | 2 + .../protocoltest/jsonrpc10/serializers.go | 131 +- .../api_op_EmptyInputAndEmptyOutput_test.go | 20 +- .../query/api_op_EndpointOperation_test.go | 27 +- ..._op_EndpointWithHostLabelOperation_test.go | 27 +- .../api_op_FlattenedXmlMapWithXmlName_test.go | 4 +- ...op_FlattenedXmlMapWithXmlNamespace_test.go | 4 +- .../query/api_op_FlattenedXmlMap_test.go | 4 +- .../query/api_op_GreetingWithErrors_test.go | 17 +- .../query/api_op_HostWithPathOperation.go | 98 + .../api_op_HostWithPathOperation_test.go | 133 + .../api_op_IgnoresWrappingXmlName_test.go | 4 +- .../query/api_op_NestedStructures_test.go | 16 +- .../query/api_op_NoInputAndNoOutput_test.go | 20 +- .../query/api_op_NoInputAndOutput_test.go | 20 +- ...i_op_QueryIdempotencyTokenAutoFill_test.go | 16 +- .../query/api_op_QueryLists_test.go | 16 +- .../query/api_op_QueryMaps_test.go | 16 +- .../query/api_op_QueryTimestamps_test.go | 16 +- .../query/api_op_RecursiveXmlShapes_test.go | 4 +- .../query/api_op_SimpleInputParams_test.go | 16 +- .../api_op_SimpleScalarXmlProperties_test.go | 4 +- .../query/api_op_XmlBlobs_test.go | 4 +- .../query/api_op_XmlEmptyBlobs_test.go | 4 +- .../query/api_op_XmlEmptyLists_test.go | 4 +- .../query/api_op_XmlEmptyMaps_test.go | 4 +- .../query/api_op_XmlEnums_test.go | 4 +- .../query/api_op_XmlLists_test.go | 4 +- .../query/api_op_XmlMapsXmlName_test.go | 4 +- .../protocoltest/query/api_op_XmlMaps_test.go | 4 +- .../query/api_op_XmlNamespaces_test.go | 4 +- .../query/api_op_XmlTimestamps_test.go | 4 +- internal/protocoltest/query/deserializers.go | 70 + internal/protocoltest/query/generated.json | 2 + internal/protocoltest/query/serializers.go | 341 +- .../api_op_AllQueryStringTypes_test.go | 16 +- .../restxml/api_op_BodyWithXmlName_test.go | 20 +- ..._op_ConstantAndVariableQueryString_test.go | 16 +- .../api_op_ConstantQueryString_test.go | 16 +- .../api_op_EmptyInputAndEmptyOutput_test.go | 20 +- .../restxml/api_op_EndpointOperation_test.go | 27 +- ...dpointWithHostLabelHeaderOperation_test.go | 27 +- ..._op_EndpointWithHostLabelOperation_test.go | 27 +- .../api_op_FlattenedXmlMapWithXmlName_test.go | 20 +- ...op_FlattenedXmlMapWithXmlNamespace_test.go | 4 +- .../restxml/api_op_FlattenedXmlMap_test.go | 20 +- .../restxml/api_op_GreetingWithErrors_test.go | 12 +- ..._op_HttpPayloadTraitsWithMediaType_test.go | 20 +- .../restxml/api_op_HttpPayloadTraits_test.go | 20 +- ...pi_op_HttpPayloadWithMemberXmlName_test.go | 20 +- .../api_op_HttpPayloadWithStructure_test.go | 20 +- .../api_op_HttpPayloadWithXmlName_test.go | 20 +- ...tpPayloadWithXmlNamespaceAndPrefix_test.go | 20 +- ...api_op_HttpPayloadWithXmlNamespace_test.go | 20 +- .../restxml/api_op_HttpPrefixHeaders_test.go | 20 +- .../api_op_HttpRequestWithFloatLabels_test.go | 16 +- ...p_HttpRequestWithGreedyLabelInPath_test.go | 16 +- ...equestWithLabelsAndTimestampFormat_test.go | 16 +- .../api_op_HttpRequestWithLabels_test.go | 16 +- .../restxml/api_op_HttpResponseCode_test.go | 4 +- ...api_op_IgnoreQueryParamsInResponse_test.go | 4 +- .../api_op_InputAndOutputWithHeaders_test.go | 20 +- .../restxml/api_op_NestedXmlMaps_test.go | 20 +- .../restxml/api_op_NoInputAndNoOutput_test.go | 20 +- .../restxml/api_op_NoInputAndOutput_test.go | 20 +- .../api_op_NullAndEmptyHeadersClient_test.go | 16 +- ..._op_OmitsNullSerializesEmptyString_test.go | 16 +- ...i_op_QueryIdempotencyTokenAutoFill_test.go | 16 +- .../api_op_QueryParamsAsStringListMap_test.go | 16 +- .../restxml/api_op_QueryPrecedence_test.go | 16 +- .../restxml/api_op_RecursiveShapes_test.go | 20 +- .../api_op_SimpleScalarProperties_test.go | 67 +- .../api_op_TimestampFormatHeaders_test.go | 20 +- .../api_op_XmlAttributesOnPayload_test.go | 20 +- .../restxml/api_op_XmlAttributes_test.go | 20 +- .../restxml/api_op_XmlBlobs_test.go | 20 +- .../restxml/api_op_XmlEmptyBlobs_test.go | 4 +- .../restxml/api_op_XmlEmptyLists_test.go | 20 +- .../restxml/api_op_XmlEmptyMaps_test.go | 20 +- .../restxml/api_op_XmlEmptyStrings_test.go | 20 +- .../restxml/api_op_XmlEnums_test.go | 20 +- .../restxml/api_op_XmlLists_test.go | 20 +- .../restxml/api_op_XmlMapsXmlName_test.go | 20 +- .../restxml/api_op_XmlMaps_test.go | 20 +- .../restxml/api_op_XmlNamespaces_test.go | 20 +- .../restxml/api_op_XmlTimestamps_test.go | 20 +- .../restxml/api_op_XmlUnions_test.go | 20 +- .../api_op_SimpleScalarProperties_test.go | 20 +- service/acm/serializers.go | 151 +- service/acmpca/serializers.go | 231 +- service/alexaforbusiness/serializers.go | 931 +++- service/applicationautoscaling/serializers.go | 101 +- .../serializers.go | 251 +- service/applicationinsights/serializers.go | 271 +- service/apprunner/serializers.go | 221 +- service/appstream/serializers.go | 481 +- service/athena/serializers.go | 341 +- service/autoscaling/serializers.go | 611 ++- service/autoscalingplans/serializers.go | 61 +- service/budgets/serializers.go | 221 +- service/cloud9/serializers.go | 131 +- service/cloudcontrol/serializers.go | 81 +- service/cloudformation/serializers.go | 651 ++- service/cloudhsm/serializers.go | 201 +- service/cloudhsmv2/serializers.go | 151 +- service/cloudsearch/serializers.go | 261 +- service/cloudtrail/serializers.go | 181 +- service/cloudwatch/serializers.go | 361 +- service/cloudwatchevents/serializers.go | 511 +- service/cloudwatchlogs/serializers.go | 421 +- service/codebuild/serializers.go | 451 +- service/codecommit/serializers.go | 771 ++- service/codedeploy/serializers.go | 471 +- service/codepipeline/serializers.go | 391 +- service/codestar/serializers.go | 181 +- service/codestarconnections/serializers.go | 121 +- service/cognitoidentity/serializers.go | 231 +- .../cognitoidentityprovider/serializers.go | 1011 +++- service/comprehend/serializers.go | 631 ++- service/comprehendmedical/serializers.go | 211 +- service/computeoptimizer/serializers.go | 141 +- service/configservice/serializers.go | 861 ++- .../costandusagereportservice/serializers.go | 41 +- service/costexplorer/serializers.go | 301 +- .../databasemigrationservice/serializers.go | 551 +- service/datapipeline/serializers.go | 191 +- service/datasync/serializers.go | 381 +- service/dax/serializers.go | 211 +- service/devicefarm/serializers.go | 771 ++- service/directconnect/serializers.go | 631 ++- service/directoryservice/serializers.go | 631 ++- service/docdb/serializers.go | 531 +- service/dynamodb/serializers.go | 501 +- service/dynamodbstreams/serializers.go | 41 +- service/ec2/serializers.go | 4731 +++++++++++++++-- service/ec2instanceconnect/serializers.go | 21 +- service/ecr/serializers.go | 351 +- service/ecrpublic/serializers.go | 231 +- service/ecs/serializers.go | 521 +- service/elasticache/serializers.go | 651 ++- service/elasticbeanstalk/serializers.go | 471 +- service/elasticloadbalancing/serializers.go | 291 +- service/elasticloadbalancingv2/serializers.go | 341 +- service/emr/serializers.go | 521 +- service/eventbridge/serializers.go | 511 +- service/firehose/serializers.go | 121 +- service/fms/serializers.go | 261 +- service/forecast/serializers.go | 351 +- service/forecastquery/serializers.go | 11 +- service/frauddetector/serializers.go | 661 ++- service/fsx/serializers.go | 271 +- service/gamelift/serializers.go | 951 +++- service/glacier/serializers.go | 64 +- service/globalaccelerator/serializers.go | 471 +- service/glue/serializers.go | 1661 +++++- service/health/serializers.go | 131 +- service/healthlake/serializers.go | 131 +- service/iam/serializers.go | 1581 +++++- service/identitystore/serializers.go | 41 +- service/inspector/serializers.go | 371 +- service/iot/serializers.go | 48 +- service/iotsecuretunneling/serializers.go | 71 +- service/iotthingsgraph/serializers.go | 351 +- service/kendra/serializers.go | 431 +- service/kinesis/serializers.go | 281 +- service/kinesisanalytics/serializers.go | 201 +- service/kinesisanalyticsv2/serializers.go | 311 +- service/kms/serializers.go | 481 +- service/lakeformation/serializers.go | 231 +- service/licensemanager/serializers.go | 481 +- service/lightsail/serializers.go | 1531 +++++- service/lookoutequipment/serializers.go | 221 +- service/machinelearning/serializers.go | 281 +- service/macie/serializers.go | 71 +- .../serializers.go | 21 +- .../serializers.go | 11 +- service/marketplacemetering/serializers.go | 41 +- service/mediastore/serializers.go | 211 +- service/memorydb/serializers.go | 351 +- service/migrationhub/serializers.go | 171 +- service/migrationhubconfig/serializers.go | 31 +- service/mturk/serializers.go | 391 +- service/neptune/serializers.go | 631 ++- service/networkfirewall/serializers.go | 291 +- service/opsworks/serializers.go | 741 ++- service/opsworkscm/serializers.go | 191 +- service/organizations/serializers.go | 511 +- service/personalize/serializers.go | 471 +- service/pi/serializers.go | 31 +- service/pinpoint/serializers.go | 688 ++- service/pricing/serializers.go | 31 +- service/proton/serializers.go | 491 +- service/qldbsession/serializers.go | 11 +- service/rds/serializers.go | 1401 ++++- service/redshift/serializers.go | 1161 +++- service/redshiftdata/serializers.go | 101 +- service/rekognition/serializers.go | 581 +- .../resourcegroupstaggingapi/serializers.go | 81 +- service/route53domains/serializers.go | 281 +- service/route53recoverycluster/serializers.go | 31 +- service/route53resolver/serializers.go | 631 ++- service/sagemaker/serializers.go | 2421 ++++++++- service/secretsmanager/serializers.go | 221 +- service/servicecatalog/serializers.go | 871 ++- service/servicediscovery/serializers.go | 261 +- service/servicequotas/serializers.go | 191 +- service/ses/serializers.go | 711 ++- service/sfn/serializers.go | 231 +- service/shield/serializers.go | 331 +- service/sms/serializers.go | 351 +- service/snowball/serializers.go | 251 +- service/sns/serializers.go | 391 +- service/sqs/serializers.go | 201 +- service/ssm/serializers.go | 1351 ++++- service/ssmcontacts/serializers.go | 271 +- service/ssoadmin/serializers.go | 311 +- service/storagegateway/serializers.go | 901 +++- service/sts/serializers.go | 81 +- service/support/serializers.go | 141 +- service/swf/serializers.go | 371 +- service/textract/serializers.go | 91 +- service/timestreamquery/serializers.go | 31 +- service/timestreamwrite/serializers.go | 151 +- service/transcribe/serializers.go | 391 +- service/transfer/serializers.go | 321 +- service/translate/serializers.go | 141 +- service/voiceid/serializers.go | 211 +- service/waf/serializers.go | 771 ++- service/wafregional/serializers.go | 811 ++- service/wafv2/serializers.go | 451 +- service/workmail/serializers.go | 651 ++- service/workspaces/serializers.go | 541 +- 379 files changed, 72784 insertions(+), 7591 deletions(-) create mode 100644 internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go create mode 100644 internal/protocoltest/awsrestjson/api_op_HostWithPathOperation_test.go create mode 100644 internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired.go create mode 100644 internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired_test.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedBlob.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedByte.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedDouble.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedFloat.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedInteger.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedList.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedLong.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedMap.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedSet.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedShort.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedString.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go create mode 100644 internal/protocoltest/awsrestjson/api_op_MalformedUnion.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestBodyStructure_test.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestNoPayload.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestNoPayload_test.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestPayloadBlob.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestPayloadBlob_test.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestPayloadStructure.go create mode 100644 internal/protocoltest/awsrestjson/api_op_TestPayloadStructure_test.go create mode 100644 internal/protocoltest/ec2query/api_op_HostWithPathOperation.go create mode 100644 internal/protocoltest/ec2query/api_op_HostWithPathOperation_test.go create mode 100644 internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go create mode 100644 internal/protocoltest/jsonrpc/api_op_HostWithPathOperation_test.go create mode 100644 internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go create mode 100644 internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation_test.go create mode 100644 internal/protocoltest/query/api_op_HostWithPathOperation.go create mode 100644 internal/protocoltest/query/api_op_HostWithPathOperation_test.go diff --git a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go index 1d86dcae01a..a6de0512596 100644 --- a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go +++ b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes.go @@ -52,7 +52,7 @@ type AllQueryStringTypesInput struct { QueryLong *int64 - QueryParamsMapOfStrings map[string]string + QueryParamsMapOfStringList map[string][]string QueryShort *int16 diff --git a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go index 8906532de26..9075c09f214 100644 --- a/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go +++ b/internal/protocoltest/awsrestjson/api_op_AllQueryStringTypes_test.go @@ -18,6 +18,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" "time" @@ -34,6 +35,7 @@ func TestClient_AllQueryStringTypes_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -136,9 +138,13 @@ func TestClient_AllQueryStringTypes_awsRestjson1Serialize(t *testing.T) { // Handles query string maps "RestJsonQueryStringMap": { Params: &AllQueryStringTypesInput{ - QueryParamsMapOfStrings: map[string]string{ - "QueryParamsStringKeyA": "Foo", - "QueryParamsStringKeyB": "Bar", + QueryParamsMapOfStringList: map[string][]string{ + "QueryParamsStringKeyA": { + "Foo", + }, + "QueryParamsStringKeyB": { + "Bar", + }, }, }, ExpectMethod: "GET", @@ -234,7 +240,17 @@ func TestClient_AllQueryStringTypes_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -243,7 +259,7 @@ func TestClient_AllQueryStringTypes_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString_test.go b/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString_test.go index 93ba59d7cbe..784fe25ec2f 100644 --- a/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString_test.go +++ b/internal/protocoltest/awsrestjson/api_op_ConstantAndVariableQueryString_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_ConstantAndVariableQueryString_awsRestjson1Serialize(t *testing. ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -89,7 +91,17 @@ func TestClient_ConstantAndVariableQueryString_awsRestjson1Serialize(t *testing. w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -98,7 +110,7 @@ func TestClient_ConstantAndVariableQueryString_awsRestjson1Serialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_ConstantQueryString_test.go b/internal/protocoltest/awsrestjson/api_op_ConstantQueryString_test.go index 1ca8ceba290..e827c7b21a3 100644 --- a/internal/protocoltest/awsrestjson/api_op_ConstantQueryString_test.go +++ b/internal/protocoltest/awsrestjson/api_op_ConstantQueryString_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_ConstantQueryString_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -69,7 +71,17 @@ func TestClient_ConstantQueryString_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -78,7 +90,7 @@ func TestClient_ConstantQueryString_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go index e7c3c5d600a..ac523d26506 100644 --- a/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_DocumentTypeAsPayload_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_DocumentTypeAsPayload_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -95,7 +97,17 @@ func TestClient_DocumentTypeAsPayload_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -104,7 +116,7 @@ func TestClient_DocumentTypeAsPayload_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -180,7 +192,7 @@ func TestClient_DocumentTypeAsPayload_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -213,7 +225,7 @@ func TestClient_DocumentTypeAsPayload_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go b/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go index 4d53f8a47af..c8fbcbc48d0 100644 --- a/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go +++ b/internal/protocoltest/awsrestjson/api_op_DocumentType_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_DocumentType_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -194,7 +196,17 @@ func TestClient_DocumentType_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -203,7 +215,7 @@ func TestClient_DocumentType_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -341,7 +353,7 @@ func TestClient_DocumentType_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -374,7 +386,7 @@ func TestClient_DocumentType_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go index 05ed988108e..999b5242689 100644 --- a/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/awsrestjson/api_op_EmptyInputAndEmptyOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -74,7 +76,17 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -83,7 +95,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -149,7 +161,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -182,7 +194,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_EndpointOperation_test.go b/internal/protocoltest/awsrestjson/api_op_EndpointOperation_test.go index 84d857b1c48..24289321604 100644 --- a/internal/protocoltest/awsrestjson/api_op_EndpointOperation_test.go +++ b/internal/protocoltest/awsrestjson/api_op_EndpointOperation_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -29,6 +30,7 @@ func TestClient_EndpointOperation_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -38,6 +40,17 @@ func TestClient_EndpointOperation_awsRestjson1Serialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/EndpointOperation", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderEmpty(actual) }, @@ -67,7 +80,17 @@ func TestClient_EndpointOperation_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -76,7 +99,7 @@ func TestClient_EndpointOperation_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation_test.go b/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation_test.go index 5274d201e62..fcb98b2df5f 100644 --- a/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation_test.go +++ b/internal/protocoltest/awsrestjson/api_op_EndpointWithHostLabelOperation_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_EndpointWithHostLabelOperation_awsRestjson1Serialize(t *testing. ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -43,6 +45,17 @@ func TestClient_EndpointWithHostLabelOperation_awsRestjson1Serialize(t *testing. ExpectMethod: "POST", ExpectURIPath: "/EndpointWithHostLabelOperation", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/json", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareJSONReaderBytes(actual, []byte(`{"label": "bar"}`)) @@ -73,7 +86,17 @@ func TestClient_EndpointWithHostLabelOperation_awsRestjson1Serialize(t *testing. w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -82,7 +105,7 @@ func TestClient_EndpointWithHostLabelOperation_awsRestjson1Serialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go b/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go index d405ea7199b..7a8cde7a0e6 100644 --- a/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/awsrestjson/api_op_GreetingWithErrors_test.go @@ -59,7 +59,7 @@ func TestClient_GreetingWithErrors_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -92,7 +92,7 @@ func TestClient_GreetingWithErrors_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -251,7 +251,7 @@ func TestClient_GreetingWithErrors_FooError_awsRestjson1Deserialize(t *testing.T } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -284,7 +284,7 @@ func TestClient_GreetingWithErrors_FooError_awsRestjson1Deserialize(t *testing.T }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -379,7 +379,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsRestjson1Deserialize(t *testi } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -412,7 +412,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsRestjson1Deserialize(t *testi }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -489,7 +489,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsRestjson1Deserialize(t *te } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -522,7 +522,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsRestjson1Deserialize(t *te }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go b/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go new file mode 100644 index 00000000000..2c3adde96b7 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation.go @@ -0,0 +1,98 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) HostWithPathOperation(ctx context.Context, params *HostWithPathOperationInput, optFns ...func(*Options)) (*HostWithPathOperationOutput, error) { + if params == nil { + params = &HostWithPathOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "HostWithPathOperation", params, optFns, c.addOperationHostWithPathOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*HostWithPathOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type HostWithPathOperationInput struct { + noSmithyDocumentSerde +} + +type HostWithPathOperationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opHostWithPathOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "HostWithPathOperation", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation_test.go b/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation_test.go new file mode 100644 index 00000000000..3e892117f14 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_HostWithPathOperation_test.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_HostWithPathOperation_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *HostWithPathOperationInput + 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 + }{ + // Custom endpoints supplied by users can have paths + "RestJsonHostWithPath": { + Params: &HostWithPathOperationInput{}, + ExpectMethod: "GET", + ExpectURIPath: "/custom/HostWithPathOperation", + ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com/custom" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderEmpty(actual) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.HostWithPathOperation(context.Background(), c.Params) + 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_HttpChecksumRequired.go b/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired.go new file mode 100644 index 00000000000..49fe907b658 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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 tests httpChecksumRequired trait +func (c *Client) HttpChecksumRequired(ctx context.Context, params *HttpChecksumRequiredInput, optFns ...func(*Options)) (*HttpChecksumRequiredOutput, error) { + if params == nil { + params = &HttpChecksumRequiredInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "HttpChecksumRequired", params, optFns, c.addOperationHttpChecksumRequiredMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*HttpChecksumRequiredOutput) + out.ResultMetadata = metadata + return out, nil +} + +type HttpChecksumRequiredInput struct { + Foo *string + + noSmithyDocumentSerde +} + +type HttpChecksumRequiredOutput struct { + Foo *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationHttpChecksumRequiredMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpHttpChecksumRequired{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpHttpChecksumRequired{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddContentChecksumMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHttpChecksumRequired(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opHttpChecksumRequired(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "HttpChecksumRequired", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired_test.go b/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired_test.go new file mode 100644 index 00000000000..83b49280922 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_HttpChecksumRequired_test.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_HttpChecksumRequired_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *HttpChecksumRequiredInput + 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 + }{ + // Adds Content-MD5 header + "RestJsonHttpChecksumRequired": { + Params: &HttpChecksumRequiredInput{ + Foo: ptr.String("base64 encoded md5 checksum"), + }, + ExpectMethod: "POST", + ExpectURIPath: "/HttpChecksumRequired", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-MD5": []string{"iB0/3YSo7maijL0IGOgA9g=="}, + "Content-Type": []string{"application/json"}, + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{ + "foo":"base64 encoded md5 checksum" + } + `)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.HttpChecksumRequired(context.Background(), c.Params) + 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 c8a129bc3cd..1c2da857c5b 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpEnumPayload_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpEnumPayload_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -70,7 +72,17 @@ func TestClient_HttpEnumPayload_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -79,7 +91,7 @@ func TestClient_HttpEnumPayload_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -134,7 +146,7 @@ func TestClient_HttpEnumPayload_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -167,7 +179,7 @@ func TestClient_HttpEnumPayload_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go index a88245107df..4f9f950d444 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraitsWithMediaType_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestjson1Serialize(t *testing. ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -80,7 +82,17 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestjson1Serialize(t *testing. w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -89,7 +101,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestjson1Serialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -151,7 +163,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestjson1Deserialize(t *testin } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -184,7 +196,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestjson1Deserialize(t *testin }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go index f3e44cfb696..cb7dad8c586 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadTraits_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpPayloadTraits_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -96,7 +98,17 @@ func TestClient_HttpPayloadTraits_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -105,7 +117,7 @@ func TestClient_HttpPayloadTraits_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -178,7 +190,7 @@ func TestClient_HttpPayloadTraits_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -211,7 +223,7 @@ func TestClient_HttpPayloadTraits_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go index fa81b0e796e..8094f620010 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPayloadWithStructure_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_HttpPayloadWithStructure_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -85,7 +87,17 @@ func TestClient_HttpPayloadWithStructure_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -94,7 +106,7 @@ func TestClient_HttpPayloadWithStructure_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -160,7 +172,7 @@ func TestClient_HttpPayloadWithStructure_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -193,7 +205,7 @@ func TestClient_HttpPayloadWithStructure_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersResponse_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersResponse_test.go index 986758b4c74..8596ea6f007 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersResponse_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeadersResponse_test.go @@ -44,7 +44,7 @@ func TestClient_HttpPrefixHeadersResponse_awsRestjson1Deserialize(t *testing.T) } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -77,7 +77,7 @@ func TestClient_HttpPrefixHeadersResponse_awsRestjson1Deserialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go index 89825c5e407..b63e6671f73 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpPrefixHeaders_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpPrefixHeaders_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -96,7 +98,17 @@ func TestClient_HttpPrefixHeaders_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -105,7 +117,7 @@ func TestClient_HttpPrefixHeaders_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -169,7 +181,7 @@ func TestClient_HttpPrefixHeaders_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -202,7 +214,7 @@ func TestClient_HttpPrefixHeaders_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels_test.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels_test.go index 3d746071b4a..4ca64bb41a2 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithFloatLabels_test.go @@ -16,6 +16,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_HttpRequestWithFloatLabels_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -94,7 +96,17 @@ func TestClient_HttpRequestWithFloatLabels_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -103,7 +115,7 @@ func TestClient_HttpRequestWithFloatLabels_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath_test.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath_test.go index ffe31007413..799edbb2936 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithGreedyLabelInPath_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_HttpRequestWithGreedyLabelInPath_awsRestjson1Serialize(t *testin ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -67,7 +69,17 @@ func TestClient_HttpRequestWithGreedyLabelInPath_awsRestjson1Serialize(t *testin w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -76,7 +88,7 @@ func TestClient_HttpRequestWithGreedyLabelInPath_awsRestjson1Serialize(t *testin }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go index 26cd735b978..dff8537b93e 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_HttpRequestWithLabelsAndTimestampFormat_awsRestjson1Serialize(t ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -73,7 +75,17 @@ func TestClient_HttpRequestWithLabelsAndTimestampFormat_awsRestjson1Serialize(t w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -82,7 +94,7 @@ func TestClient_HttpRequestWithLabelsAndTimestampFormat_awsRestjson1Serialize(t }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go index 64216e80621..480552e20a8 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpRequestWithLabels_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_HttpRequestWithLabels_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -93,7 +95,17 @@ func TestClient_HttpRequestWithLabels_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -102,7 +114,7 @@ func TestClient_HttpRequestWithLabels_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go b/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go index a3e125ed064..f5720a0dc1b 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpResponseCode_test.go @@ -55,7 +55,7 @@ func TestClient_HttpResponseCode_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -88,7 +88,7 @@ func TestClient_HttpResponseCode_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go index 565aef31916..a00b3ab772d 100644 --- a/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go +++ b/internal/protocoltest/awsrestjson/api_op_HttpStringPayload_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpStringPayload_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -70,7 +72,17 @@ func TestClient_HttpStringPayload_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -79,7 +91,7 @@ func TestClient_HttpStringPayload_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -134,7 +146,7 @@ func TestClient_HttpStringPayload_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -167,7 +179,7 @@ func TestClient_HttpStringPayload_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go b/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go index df206bac69d..a4b1a02c01a 100644 --- a/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go +++ b/internal/protocoltest/awsrestjson/api_op_IgnoreQueryParamsInResponse_test.go @@ -50,7 +50,7 @@ func TestClient_IgnoreQueryParamsInResponse_awsRestjson1Deserialize(t *testing.T } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -83,7 +83,7 @@ func TestClient_IgnoreQueryParamsInResponse_awsRestjson1Deserialize(t *testing.T }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go b/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go index 213a543af91..14206b5e373 100644 --- a/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go +++ b/internal/protocoltest/awsrestjson/api_op_InputAndOutputWithHeaders_test.go @@ -22,6 +22,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" "time" @@ -38,6 +39,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -233,7 +235,17 @@ func TestClient_InputAndOutputWithHeaders_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -242,7 +254,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -421,7 +433,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestjson1Deserialize(t *testing.T) } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -454,7 +466,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestjson1Deserialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go b/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go index 549d4a36dca..67f478b2055 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonBlobs_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_JsonBlobs_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -76,7 +78,17 @@ func TestClient_JsonBlobs_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +97,7 @@ func TestClient_JsonBlobs_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -147,7 +159,7 @@ func TestClient_JsonBlobs_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -180,7 +192,7 @@ func TestClient_JsonBlobs_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go b/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go index 0b218777fd7..a425fd971d2 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonEnums_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_JsonEnums_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -105,7 +107,17 @@ func TestClient_JsonEnums_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -114,7 +126,7 @@ func TestClient_JsonEnums_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -204,7 +216,7 @@ func TestClient_JsonEnums_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -237,7 +249,7 @@ func TestClient_JsonEnums_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go b/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go index 895be824adf..c0521a766ea 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonLists_test.go @@ -22,6 +22,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" "time" @@ -38,6 +39,7 @@ func TestClient_JsonLists_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -212,7 +214,17 @@ func TestClient_JsonLists_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -221,7 +233,7 @@ func TestClient_JsonLists_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -403,7 +415,7 @@ func TestClient_JsonLists_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -436,7 +448,7 @@ func TestClient_JsonLists_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go b/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go index e8c8f9c0dac..bab145d7a66 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonMaps_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_JsonMaps_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -275,7 +277,17 @@ func TestClient_JsonMaps_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -284,7 +296,7 @@ func TestClient_JsonMaps_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -548,7 +560,7 @@ func TestClient_JsonMaps_awsRestjson1Deserialize(t *testing.T) { t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#JsonMaps") } - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -581,7 +593,7 @@ func TestClient_JsonMaps_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go b/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go index fd165e36174..f0dc9c27345 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonTimestamps_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_JsonTimestamps_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -132,7 +134,17 @@ func TestClient_JsonTimestamps_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -141,7 +153,7 @@ func TestClient_JsonTimestamps_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -245,7 +257,7 @@ func TestClient_JsonTimestamps_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -278,7 +290,7 @@ func TestClient_JsonTimestamps_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go b/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go index d566ec5a261..a19d62f3814 100644 --- a/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go +++ b/internal/protocoltest/awsrestjson/api_op_JsonUnions_test.go @@ -22,6 +22,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -37,6 +38,7 @@ func TestClient_JsonUnions_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -278,7 +280,17 @@ func TestClient_JsonUnions_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -287,7 +299,7 @@ func TestClient_JsonUnions_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -492,7 +504,7 @@ func TestClient_JsonUnions_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -525,7 +537,7 @@ func TestClient_JsonUnions_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go new file mode 100644 index 00000000000..860334716fa --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithBody.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedAcceptWithBody(ctx context.Context, params *MalformedAcceptWithBodyInput, optFns ...func(*Options)) (*MalformedAcceptWithBodyOutput, error) { + if params == nil { + params = &MalformedAcceptWithBodyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedAcceptWithBody", params, optFns, c.addOperationMalformedAcceptWithBodyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedAcceptWithBodyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedAcceptWithBodyInput struct { + noSmithyDocumentSerde +} + +type MalformedAcceptWithBodyOutput struct { + Hi *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedAcceptWithBodyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedAcceptWithBody{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedAcceptWithBody{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedAcceptWithBody(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedAcceptWithBody(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedAcceptWithBody", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go new file mode 100644 index 00000000000..aec31720fa7 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithGenericString.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedAcceptWithGenericString(ctx context.Context, params *MalformedAcceptWithGenericStringInput, optFns ...func(*Options)) (*MalformedAcceptWithGenericStringOutput, error) { + if params == nil { + params = &MalformedAcceptWithGenericStringInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedAcceptWithGenericString", params, optFns, c.addOperationMalformedAcceptWithGenericStringMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedAcceptWithGenericStringOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedAcceptWithGenericStringInput struct { + Payload []byte + + noSmithyDocumentSerde +} + +type MalformedAcceptWithGenericStringOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedAcceptWithGenericStringMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedAcceptWithGenericString{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedAcceptWithGenericString{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedAcceptWithGenericString(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedAcceptWithGenericString(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedAcceptWithGenericString", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go new file mode 100644 index 00000000000..f1a8d7bda86 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedAcceptWithPayload.go @@ -0,0 +1,102 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedAcceptWithPayload(ctx context.Context, params *MalformedAcceptWithPayloadInput, optFns ...func(*Options)) (*MalformedAcceptWithPayloadOutput, error) { + if params == nil { + params = &MalformedAcceptWithPayloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedAcceptWithPayload", params, optFns, c.addOperationMalformedAcceptWithPayloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedAcceptWithPayloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedAcceptWithPayloadInput struct { + noSmithyDocumentSerde +} + +type MalformedAcceptWithPayloadOutput struct { + + // This value conforms to the media type: image/jpeg + Payload []byte + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedAcceptWithPayloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedAcceptWithPayload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedAcceptWithPayload{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedAcceptWithPayload(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedAcceptWithPayload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedAcceptWithPayload", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedBlob.go b/internal/protocoltest/awsrestjson/api_op_MalformedBlob.go new file mode 100644 index 00000000000..e00d590175c --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedBlob.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedBlob(ctx context.Context, params *MalformedBlobInput, optFns ...func(*Options)) (*MalformedBlobOutput, error) { + if params == nil { + params = &MalformedBlobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedBlob", params, optFns, c.addOperationMalformedBlobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedBlobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedBlobInput struct { + Blob []byte + + noSmithyDocumentSerde +} + +type MalformedBlobOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedBlobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedBlob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedBlob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedBlob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedBlob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedBlob", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go b/internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go new file mode 100644 index 00000000000..c3c57d52fc1 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedBoolean.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedBoolean(ctx context.Context, params *MalformedBooleanInput, optFns ...func(*Options)) (*MalformedBooleanOutput, error) { + if params == nil { + params = &MalformedBooleanInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedBoolean", params, optFns, c.addOperationMalformedBooleanMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedBooleanOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedBooleanInput struct { + + // This member is required. + BooleanInPath *bool + + BooleanInBody *bool + + BooleanInHeader *bool + + BooleanInQuery *bool + + noSmithyDocumentSerde +} + +type MalformedBooleanOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedBooleanMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedBoolean{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedBoolean{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedBooleanValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedBoolean(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedBoolean(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedBoolean", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedByte.go b/internal/protocoltest/awsrestjson/api_op_MalformedByte.go new file mode 100644 index 00000000000..d318ad0ddeb --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedByte.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedByte(ctx context.Context, params *MalformedByteInput, optFns ...func(*Options)) (*MalformedByteOutput, error) { + if params == nil { + params = &MalformedByteInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedByte", params, optFns, c.addOperationMalformedByteMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedByteOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedByteInput struct { + + // This member is required. + ByteInPath *int8 + + ByteInBody *int8 + + ByteInHeader *int8 + + ByteInQuery *int8 + + noSmithyDocumentSerde +} + +type MalformedByteOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedByteMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedByte{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedByte{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedByteValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedByte(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedByte(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedByte", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go new file mode 100644 index 00000000000..16103f5bd77 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithBody.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedContentTypeWithBody(ctx context.Context, params *MalformedContentTypeWithBodyInput, optFns ...func(*Options)) (*MalformedContentTypeWithBodyOutput, error) { + if params == nil { + params = &MalformedContentTypeWithBodyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedContentTypeWithBody", params, optFns, c.addOperationMalformedContentTypeWithBodyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedContentTypeWithBodyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedContentTypeWithBodyInput struct { + Hi *string + + noSmithyDocumentSerde +} + +type MalformedContentTypeWithBodyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedContentTypeWithBodyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedContentTypeWithBody{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedContentTypeWithBody{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithBody(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedContentTypeWithBody(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedContentTypeWithBody", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go new file mode 100644 index 00000000000..b52cb44d399 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithGenericString.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedContentTypeWithGenericString(ctx context.Context, params *MalformedContentTypeWithGenericStringInput, optFns ...func(*Options)) (*MalformedContentTypeWithGenericStringOutput, error) { + if params == nil { + params = &MalformedContentTypeWithGenericStringInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedContentTypeWithGenericString", params, optFns, c.addOperationMalformedContentTypeWithGenericStringMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedContentTypeWithGenericStringOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedContentTypeWithGenericStringInput struct { + Payload *string + + noSmithyDocumentSerde +} + +type MalformedContentTypeWithGenericStringOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedContentTypeWithGenericStringMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedContentTypeWithGenericString{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedContentTypeWithGenericString{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithGenericString(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedContentTypeWithGenericString(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedContentTypeWithGenericString", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go new file mode 100644 index 00000000000..1a74f9db55e --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithPayload.go @@ -0,0 +1,102 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedContentTypeWithPayload(ctx context.Context, params *MalformedContentTypeWithPayloadInput, optFns ...func(*Options)) (*MalformedContentTypeWithPayloadOutput, error) { + if params == nil { + params = &MalformedContentTypeWithPayloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedContentTypeWithPayload", params, optFns, c.addOperationMalformedContentTypeWithPayloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedContentTypeWithPayloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedContentTypeWithPayloadInput struct { + + // This value conforms to the media type: image/jpeg + Payload []byte + + noSmithyDocumentSerde +} + +type MalformedContentTypeWithPayloadOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedContentTypeWithPayloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedContentTypeWithPayload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedContentTypeWithPayload{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithPayload(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedContentTypeWithPayload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedContentTypeWithPayload", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go new file mode 100644 index 00000000000..e51aa0aa267 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedContentTypeWithoutBody.go @@ -0,0 +1,98 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedContentTypeWithoutBody(ctx context.Context, params *MalformedContentTypeWithoutBodyInput, optFns ...func(*Options)) (*MalformedContentTypeWithoutBodyOutput, error) { + if params == nil { + params = &MalformedContentTypeWithoutBodyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedContentTypeWithoutBody", params, optFns, c.addOperationMalformedContentTypeWithoutBodyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedContentTypeWithoutBodyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedContentTypeWithoutBodyInput struct { + noSmithyDocumentSerde +} + +type MalformedContentTypeWithoutBodyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedContentTypeWithoutBodyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedContentTypeWithoutBody{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedContentTypeWithoutBody{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedContentTypeWithoutBody(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedContentTypeWithoutBody(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedContentTypeWithoutBody", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedDouble.go b/internal/protocoltest/awsrestjson/api_op_MalformedDouble.go new file mode 100644 index 00000000000..0a90eb07639 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedDouble.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedDouble(ctx context.Context, params *MalformedDoubleInput, optFns ...func(*Options)) (*MalformedDoubleOutput, error) { + if params == nil { + params = &MalformedDoubleInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedDouble", params, optFns, c.addOperationMalformedDoubleMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedDoubleOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedDoubleInput struct { + + // This member is required. + DoubleInPath *float64 + + DoubleInBody *float64 + + DoubleInHeader *float64 + + DoubleInQuery *float64 + + noSmithyDocumentSerde +} + +type MalformedDoubleOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedDoubleMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedDouble{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedDouble{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedDoubleValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedDouble(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedDouble(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedDouble", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedFloat.go b/internal/protocoltest/awsrestjson/api_op_MalformedFloat.go new file mode 100644 index 00000000000..22aa22a9fa5 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedFloat.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedFloat(ctx context.Context, params *MalformedFloatInput, optFns ...func(*Options)) (*MalformedFloatOutput, error) { + if params == nil { + params = &MalformedFloatInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedFloat", params, optFns, c.addOperationMalformedFloatMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedFloatOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedFloatInput struct { + + // This member is required. + FloatInPath *float32 + + FloatInBody *float32 + + FloatInHeader *float32 + + FloatInQuery *float32 + + noSmithyDocumentSerde +} + +type MalformedFloatOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedFloatMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedFloat{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedFloat{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedFloatValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedFloat(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedFloat(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedFloat", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedInteger.go b/internal/protocoltest/awsrestjson/api_op_MalformedInteger.go new file mode 100644 index 00000000000..de2ec6df917 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedInteger.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedInteger(ctx context.Context, params *MalformedIntegerInput, optFns ...func(*Options)) (*MalformedIntegerOutput, error) { + if params == nil { + params = &MalformedIntegerInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedInteger", params, optFns, c.addOperationMalformedIntegerMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedIntegerOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedIntegerInput struct { + + // This member is required. + IntegerInPath *int32 + + IntegerInBody *int32 + + IntegerInHeader *int32 + + IntegerInQuery *int32 + + noSmithyDocumentSerde +} + +type MalformedIntegerOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedIntegerMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedInteger{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedInteger{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedIntegerValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedInteger(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedInteger(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedInteger", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedList.go b/internal/protocoltest/awsrestjson/api_op_MalformedList.go new file mode 100644 index 00000000000..ba9e6507270 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedList.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedList(ctx context.Context, params *MalformedListInput, optFns ...func(*Options)) (*MalformedListOutput, error) { + if params == nil { + params = &MalformedListInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedList", params, optFns, c.addOperationMalformedListMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedListOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedListInput struct { + BodyList []string + + noSmithyDocumentSerde +} + +type MalformedListOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedListMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedList{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedList{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedList(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedList(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedList", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedLong.go b/internal/protocoltest/awsrestjson/api_op_MalformedLong.go new file mode 100644 index 00000000000..f7ad0f99584 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedLong.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedLong(ctx context.Context, params *MalformedLongInput, optFns ...func(*Options)) (*MalformedLongOutput, error) { + if params == nil { + params = &MalformedLongInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedLong", params, optFns, c.addOperationMalformedLongMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedLongOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedLongInput struct { + + // This member is required. + LongInPath *int64 + + LongInBody *int64 + + LongInHeader *int64 + + LongInQuery *int64 + + noSmithyDocumentSerde +} + +type MalformedLongOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedLongMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedLong{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedLong{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedLongValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedLong(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedLong(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedLong", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedMap.go b/internal/protocoltest/awsrestjson/api_op_MalformedMap.go new file mode 100644 index 00000000000..0aef5b549a3 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedMap.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedMap(ctx context.Context, params *MalformedMapInput, optFns ...func(*Options)) (*MalformedMapOutput, error) { + if params == nil { + params = &MalformedMapInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedMap", params, optFns, c.addOperationMalformedMapMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedMapOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedMapInput struct { + BodyMap map[string]string + + noSmithyDocumentSerde +} + +type MalformedMapOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedMapMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedMap{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedMap{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedMap(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedMap(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedMap", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go b/internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go new file mode 100644 index 00000000000..b3251bc1338 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedRequestBody.go @@ -0,0 +1,102 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedRequestBody(ctx context.Context, params *MalformedRequestBodyInput, optFns ...func(*Options)) (*MalformedRequestBodyOutput, error) { + if params == nil { + params = &MalformedRequestBodyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedRequestBody", params, optFns, c.addOperationMalformedRequestBodyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedRequestBodyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedRequestBodyInput struct { + Float *float32 + + Int *int32 + + noSmithyDocumentSerde +} + +type MalformedRequestBodyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedRequestBodyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedRequestBody{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedRequestBody{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedRequestBody(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedRequestBody(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedRequestBody", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedSet.go b/internal/protocoltest/awsrestjson/api_op_MalformedSet.go new file mode 100644 index 00000000000..aa71b061234 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedSet.go @@ -0,0 +1,100 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedSet(ctx context.Context, params *MalformedSetInput, optFns ...func(*Options)) (*MalformedSetOutput, error) { + if params == nil { + params = &MalformedSetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedSet", params, optFns, c.addOperationMalformedSetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedSetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedSetInput struct { + Set []string + + noSmithyDocumentSerde +} + +type MalformedSetOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedSetMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedSet{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedSet{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedSet(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedSet(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedSet", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedShort.go b/internal/protocoltest/awsrestjson/api_op_MalformedShort.go new file mode 100644 index 00000000000..241f79a560f --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedShort.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedShort(ctx context.Context, params *MalformedShortInput, optFns ...func(*Options)) (*MalformedShortOutput, error) { + if params == nil { + params = &MalformedShortInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedShort", params, optFns, c.addOperationMalformedShortMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedShortOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedShortInput struct { + + // This member is required. + ShortInPath *int16 + + ShortInBody *int16 + + ShortInHeader *int16 + + ShortInQuery *int16 + + noSmithyDocumentSerde +} + +type MalformedShortOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedShortMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedShort{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedShort{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedShortValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedShort(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedShort(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedShort", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedString.go b/internal/protocoltest/awsrestjson/api_op_MalformedString.go new file mode 100644 index 00000000000..57b7a303cfc --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedString.go @@ -0,0 +1,102 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedString(ctx context.Context, params *MalformedStringInput, optFns ...func(*Options)) (*MalformedStringOutput, error) { + if params == nil { + params = &MalformedStringInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedString", params, optFns, c.addOperationMalformedStringMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedStringOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedStringInput struct { + + // This value conforms to the media type: application/json + Blob *string + + noSmithyDocumentSerde +} + +type MalformedStringOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedStringMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedString{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedString{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedString(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedString(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedString", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go new file mode 100644 index 00000000000..a484c05d3d1 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDateTime.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampBodyDateTime(ctx context.Context, params *MalformedTimestampBodyDateTimeInput, optFns ...func(*Options)) (*MalformedTimestampBodyDateTimeOutput, error) { + if params == nil { + params = &MalformedTimestampBodyDateTimeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampBodyDateTime", params, optFns, c.addOperationMalformedTimestampBodyDateTimeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampBodyDateTimeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampBodyDateTimeInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampBodyDateTimeOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampBodyDateTimeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampBodyDateTime{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampBodyDateTime{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampBodyDateTimeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampBodyDateTime(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampBodyDateTime(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampBodyDateTime", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go new file mode 100644 index 00000000000..6ea4126a8ab --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyDefault.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampBodyDefault(ctx context.Context, params *MalformedTimestampBodyDefaultInput, optFns ...func(*Options)) (*MalformedTimestampBodyDefaultOutput, error) { + if params == nil { + params = &MalformedTimestampBodyDefaultInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampBodyDefault", params, optFns, c.addOperationMalformedTimestampBodyDefaultMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampBodyDefaultOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampBodyDefaultInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampBodyDefaultOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampBodyDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampBodyDefault{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampBodyDefault{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampBodyDefaultValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampBodyDefault(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampBodyDefault(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampBodyDefault", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go new file mode 100644 index 00000000000..fc58bf83c6e --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampBodyHttpDate.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampBodyHttpDate(ctx context.Context, params *MalformedTimestampBodyHttpDateInput, optFns ...func(*Options)) (*MalformedTimestampBodyHttpDateOutput, error) { + if params == nil { + params = &MalformedTimestampBodyHttpDateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampBodyHttpDate", params, optFns, c.addOperationMalformedTimestampBodyHttpDateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampBodyHttpDateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampBodyHttpDateInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampBodyHttpDateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampBodyHttpDateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampBodyHttpDate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampBodyHttpDate{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampBodyHttpDateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampBodyHttpDate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampBodyHttpDate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampBodyHttpDate", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go new file mode 100644 index 00000000000..7e340f0047e --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDateTime.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampHeaderDateTime(ctx context.Context, params *MalformedTimestampHeaderDateTimeInput, optFns ...func(*Options)) (*MalformedTimestampHeaderDateTimeOutput, error) { + if params == nil { + params = &MalformedTimestampHeaderDateTimeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampHeaderDateTime", params, optFns, c.addOperationMalformedTimestampHeaderDateTimeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampHeaderDateTimeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampHeaderDateTimeInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampHeaderDateTimeOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampHeaderDateTimeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampHeaderDateTime{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampHeaderDateTime{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampHeaderDateTimeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampHeaderDateTime(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampHeaderDateTime(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampHeaderDateTime", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go new file mode 100644 index 00000000000..1d8e20af6a2 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderDefault.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampHeaderDefault(ctx context.Context, params *MalformedTimestampHeaderDefaultInput, optFns ...func(*Options)) (*MalformedTimestampHeaderDefaultOutput, error) { + if params == nil { + params = &MalformedTimestampHeaderDefaultInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampHeaderDefault", params, optFns, c.addOperationMalformedTimestampHeaderDefaultMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampHeaderDefaultOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampHeaderDefaultInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampHeaderDefaultOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampHeaderDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampHeaderDefault{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampHeaderDefault{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampHeaderDefaultValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampHeaderDefault(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampHeaderDefault(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampHeaderDefault", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go new file mode 100644 index 00000000000..32fde0ff3c1 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampHeaderEpoch.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampHeaderEpoch(ctx context.Context, params *MalformedTimestampHeaderEpochInput, optFns ...func(*Options)) (*MalformedTimestampHeaderEpochOutput, error) { + if params == nil { + params = &MalformedTimestampHeaderEpochInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampHeaderEpoch", params, optFns, c.addOperationMalformedTimestampHeaderEpochMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampHeaderEpochOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampHeaderEpochInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampHeaderEpochOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampHeaderEpochMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampHeaderEpoch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampHeaderEpoch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampHeaderEpochValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampHeaderEpoch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampHeaderEpoch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampHeaderEpoch", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go new file mode 100644 index 00000000000..6becf94b1ad --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathDefault.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampPathDefault(ctx context.Context, params *MalformedTimestampPathDefaultInput, optFns ...func(*Options)) (*MalformedTimestampPathDefaultOutput, error) { + if params == nil { + params = &MalformedTimestampPathDefaultInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampPathDefault", params, optFns, c.addOperationMalformedTimestampPathDefaultMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampPathDefaultOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampPathDefaultInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampPathDefaultOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampPathDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampPathDefault{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampPathDefault{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampPathDefaultValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampPathDefault(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampPathDefault(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampPathDefault", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go new file mode 100644 index 00000000000..a18bff2ca34 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathEpoch.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampPathEpoch(ctx context.Context, params *MalformedTimestampPathEpochInput, optFns ...func(*Options)) (*MalformedTimestampPathEpochOutput, error) { + if params == nil { + params = &MalformedTimestampPathEpochInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampPathEpoch", params, optFns, c.addOperationMalformedTimestampPathEpochMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampPathEpochOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampPathEpochInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampPathEpochOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampPathEpochMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampPathEpoch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampPathEpoch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampPathEpochValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampPathEpoch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampPathEpoch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampPathEpoch", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go new file mode 100644 index 00000000000..ed7575a7685 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampPathHttpDate.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampPathHttpDate(ctx context.Context, params *MalformedTimestampPathHttpDateInput, optFns ...func(*Options)) (*MalformedTimestampPathHttpDateOutput, error) { + if params == nil { + params = &MalformedTimestampPathHttpDateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampPathHttpDate", params, optFns, c.addOperationMalformedTimestampPathHttpDateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampPathHttpDateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampPathHttpDateInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampPathHttpDateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampPathHttpDateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampPathHttpDate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampPathHttpDate{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampPathHttpDateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampPathHttpDate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampPathHttpDate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampPathHttpDate", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go new file mode 100644 index 00000000000..03909e21c27 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryDefault.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampQueryDefault(ctx context.Context, params *MalformedTimestampQueryDefaultInput, optFns ...func(*Options)) (*MalformedTimestampQueryDefaultOutput, error) { + if params == nil { + params = &MalformedTimestampQueryDefaultInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampQueryDefault", params, optFns, c.addOperationMalformedTimestampQueryDefaultMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampQueryDefaultOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampQueryDefaultInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampQueryDefaultOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampQueryDefaultMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampQueryDefault{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampQueryDefault{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampQueryDefaultValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampQueryDefault(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampQueryDefault(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampQueryDefault", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go new file mode 100644 index 00000000000..66c52a52a9b --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryEpoch.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampQueryEpoch(ctx context.Context, params *MalformedTimestampQueryEpochInput, optFns ...func(*Options)) (*MalformedTimestampQueryEpochOutput, error) { + if params == nil { + params = &MalformedTimestampQueryEpochInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampQueryEpoch", params, optFns, c.addOperationMalformedTimestampQueryEpochMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampQueryEpochOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampQueryEpochInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampQueryEpochOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampQueryEpochMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampQueryEpoch{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampQueryEpoch{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampQueryEpochValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampQueryEpoch(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampQueryEpoch(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampQueryEpoch", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go new file mode 100644 index 00000000000..762f88197b6 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedTimestampQueryHttpDate.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +func (c *Client) MalformedTimestampQueryHttpDate(ctx context.Context, params *MalformedTimestampQueryHttpDateInput, optFns ...func(*Options)) (*MalformedTimestampQueryHttpDateOutput, error) { + if params == nil { + params = &MalformedTimestampQueryHttpDateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedTimestampQueryHttpDate", params, optFns, c.addOperationMalformedTimestampQueryHttpDateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedTimestampQueryHttpDateOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedTimestampQueryHttpDateInput struct { + + // This member is required. + Timestamp *time.Time + + noSmithyDocumentSerde +} + +type MalformedTimestampQueryHttpDateOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedTimestampQueryHttpDateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedTimestampQueryHttpDate{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedTimestampQueryHttpDate{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpMalformedTimestampQueryHttpDateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedTimestampQueryHttpDate(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedTimestampQueryHttpDate(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedTimestampQueryHttpDate", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MalformedUnion.go b/internal/protocoltest/awsrestjson/api_op_MalformedUnion.go new file mode 100644 index 00000000000..0ce3d73b9cb --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_MalformedUnion.go @@ -0,0 +1,101 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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) MalformedUnion(ctx context.Context, params *MalformedUnionInput, optFns ...func(*Options)) (*MalformedUnionOutput, error) { + if params == nil { + params = &MalformedUnionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "MalformedUnion", params, optFns, c.addOperationMalformedUnionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*MalformedUnionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type MalformedUnionInput struct { + Union types.SimpleUnion + + noSmithyDocumentSerde +} + +type MalformedUnionOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationMalformedUnionMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpMalformedUnion{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpMalformedUnion{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opMalformedUnion(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opMalformedUnion(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "MalformedUnion", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go b/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go index 575669e0eaf..4d58a8b03e9 100644 --- a/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go +++ b/internal/protocoltest/awsrestjson/api_op_MediaTypeHeader_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_MediaTypeHeader_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -74,7 +76,17 @@ func TestClient_MediaTypeHeader_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -83,7 +95,7 @@ func TestClient_MediaTypeHeader_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -141,7 +153,7 @@ func TestClient_MediaTypeHeader_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -174,7 +186,7 @@ func TestClient_MediaTypeHeader_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go index f6c79a7afb1..4d3f333465b 100644 --- a/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/awsrestjson/api_op_NoInputAndNoOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_NoInputAndNoOutput_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -69,7 +71,17 @@ func TestClient_NoInputAndNoOutput_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -78,7 +90,7 @@ func TestClient_NoInputAndNoOutput_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -133,7 +145,7 @@ func TestClient_NoInputAndNoOutput_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -166,7 +178,7 @@ func TestClient_NoInputAndNoOutput_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go b/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go index aa08d974238..ea421641e48 100644 --- a/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/awsrestjson/api_op_NoInputAndOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_NoInputAndOutput_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -69,7 +71,17 @@ func TestClient_NoInputAndOutput_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -78,7 +90,7 @@ func TestClient_NoInputAndOutput_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -144,7 +156,7 @@ func TestClient_NoInputAndOutput_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -177,7 +189,7 @@ func TestClient_NoInputAndOutput_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient_test.go b/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient_test.go index fbcacb2120c..d77fab7cd48 100644 --- a/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient_test.go +++ b/internal/protocoltest/awsrestjson/api_op_NullAndEmptyHeadersClient_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_NullAndEmptyHeadersClient_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -73,7 +75,17 @@ func TestClient_NullAndEmptyHeadersClient_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -82,7 +94,7 @@ func TestClient_NullAndEmptyHeadersClient_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString_test.go b/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString_test.go index aba0268b2f0..ce588a8d2f2 100644 --- a/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString_test.go +++ b/internal/protocoltest/awsrestjson/api_op_OmitsNullSerializesEmptyString_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_OmitsNullSerializesEmptyString_awsRestjson1Serialize(t *testing. ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -80,7 +82,17 @@ func TestClient_OmitsNullSerializesEmptyString_awsRestjson1Serialize(t *testing. w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -89,7 +101,7 @@ func TestClient_OmitsNullSerializesEmptyString_awsRestjson1Serialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill_test.go b/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill_test.go index b6f8fa6d8dd..292b48b7b2b 100644 --- a/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill_test.go +++ b/internal/protocoltest/awsrestjson/api_op_QueryIdempotencyTokenAutoFill_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsRestjson1Serialize(t *testing.T ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -80,7 +82,17 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsRestjson1Serialize(t *testing.T w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -89,7 +101,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsRestjson1Serialize(t *testing.T }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap_test.go b/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap_test.go index 239d025b545..61c53564858 100644 --- a/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap_test.go +++ b/internal/protocoltest/awsrestjson/api_op_QueryParamsAsStringListMap_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryParamsAsStringListMap_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -76,7 +78,17 @@ func TestClient_QueryParamsAsStringListMap_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +97,7 @@ func TestClient_QueryParamsAsStringListMap_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_QueryPrecedence_test.go b/internal/protocoltest/awsrestjson/api_op_QueryPrecedence_test.go index c004881911d..c1ce8bb584b 100644 --- a/internal/protocoltest/awsrestjson/api_op_QueryPrecedence_test.go +++ b/internal/protocoltest/awsrestjson/api_op_QueryPrecedence_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryPrecedence_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -73,7 +75,17 @@ func TestClient_QueryPrecedence_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -82,7 +94,7 @@ func TestClient_QueryPrecedence_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go b/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go index 7d6c820cfa4..b38b1c8a0a3 100644 --- a/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go +++ b/internal/protocoltest/awsrestjson/api_op_RecursiveShapes_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_RecursiveShapes_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -100,7 +102,17 @@ func TestClient_RecursiveShapes_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -109,7 +121,7 @@ func TestClient_RecursiveShapes_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -193,7 +205,7 @@ func TestClient_RecursiveShapes_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -226,7 +238,7 @@ func TestClient_RecursiveShapes_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go index b5401d6f96b..be3c8d30483 100644 --- a/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/awsrestjson/api_op_SimpleScalarProperties_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_SimpleScalarProperties_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -171,7 +173,17 @@ func TestClient_SimpleScalarProperties_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -180,7 +192,7 @@ func TestClient_SimpleScalarProperties_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -320,7 +332,7 @@ func TestClient_SimpleScalarProperties_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -353,7 +365,7 @@ func TestClient_SimpleScalarProperties_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength_test.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength_test.go index c42c1ba9217..f1431d50573 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength_test.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsRequireLength_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_StreamingTraitsRequireLength_awsRestjson1Serialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -97,7 +99,17 @@ func TestClient_StreamingTraitsRequireLength_awsRestjson1Serialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -106,7 +118,7 @@ func TestClient_StreamingTraitsRequireLength_awsRestjson1Serialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -180,7 +192,7 @@ func TestClient_StreamingTraitsRequireLength_awsRestjson1Deserialize(t *testing. } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -213,7 +225,7 @@ func TestClient_StreamingTraitsRequireLength_awsRestjson1Deserialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go index 55d66c2dc14..6d573be549d 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraitsWithMediaType_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_StreamingTraitsWithMediaType_awsRestjson1Serialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -78,7 +80,17 @@ func TestClient_StreamingTraitsWithMediaType_awsRestjson1Serialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -87,7 +99,7 @@ func TestClient_StreamingTraitsWithMediaType_awsRestjson1Serialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -149,7 +161,7 @@ func TestClient_StreamingTraitsWithMediaType_awsRestjson1Deserialize(t *testing. } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -182,7 +194,7 @@ func TestClient_StreamingTraitsWithMediaType_awsRestjson1Deserialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go b/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go index c715689f28b..2291faca433 100644 --- a/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go +++ b/internal/protocoltest/awsrestjson/api_op_StreamingTraits_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_StreamingTraits_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -94,7 +96,17 @@ func TestClient_StreamingTraits_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -103,7 +115,7 @@ func TestClient_StreamingTraits_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -177,7 +189,7 @@ func TestClient_StreamingTraits_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -210,7 +222,7 @@ func TestClient_StreamingTraits_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go b/internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go new file mode 100644 index 00000000000..34719de714f --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestBodyStructure.go @@ -0,0 +1,110 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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" +) + +// This example operation serializes a structure in the HTTP body. It should ensure +// Content-Type: application/json is used in all requests and that an "empty" body +// is an empty JSON document ({}). +func (c *Client) TestBodyStructure(ctx context.Context, params *TestBodyStructureInput, optFns ...func(*Options)) (*TestBodyStructureOutput, error) { + if params == nil { + params = &TestBodyStructureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestBodyStructure", params, optFns, c.addOperationTestBodyStructureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestBodyStructureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestBodyStructureInput struct { + TestConfig *types.TestConfig + + TestId *string + + noSmithyDocumentSerde +} + +type TestBodyStructureOutput struct { + TestConfig *types.TestConfig + + TestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestBodyStructureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTestBodyStructure{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTestBodyStructure{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestBodyStructure(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestBodyStructure(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestBodyStructure", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_TestBodyStructure_test.go b/internal/protocoltest/awsrestjson/api_op_TestBodyStructure_test.go new file mode 100644 index 00000000000..d58e84d8494 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestBodyStructure_test.go @@ -0,0 +1,154 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_TestBodyStructure_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *TestBodyStructureInput + 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 structure + "RestJsonTestBodyStructure": { + Params: &TestBodyStructureInput{ + TestConfig: &types.TestConfig{ + Timeout: ptr.Int32(10), + }, + }, + ExpectMethod: "POST", + ExpectURIPath: "/body", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + RequireHeader: []string{ + "Content-Length", + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{"testConfig": + {"timeout": 10} + }`)) + }, + }, + // Serializes an empty structure in the body + "RestJsonHttpWithEmptyBody": { + Params: &TestBodyStructureInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/body", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + RequireHeader: []string{ + "Content-Length", + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{}`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.TestBodyStructure(context.Background(), c.Params) + 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_TestNoPayload.go b/internal/protocoltest/awsrestjson/api_op_TestNoPayload.go new file mode 100644 index 00000000000..32213618ce6 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestNoPayload.go @@ -0,0 +1,105 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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 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) TestNoPayload(ctx context.Context, params *TestNoPayloadInput, optFns ...func(*Options)) (*TestNoPayloadOutput, error) { + if params == nil { + params = &TestNoPayloadInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestNoPayload", params, optFns, c.addOperationTestNoPayloadMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestNoPayloadOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestNoPayloadInput struct { + TestId *string + + noSmithyDocumentSerde +} + +type TestNoPayloadOutput struct { + TestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestNoPayloadMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTestNoPayload{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTestNoPayload{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestNoPayload(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestNoPayload(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestNoPayload", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_TestNoPayload_test.go b/internal/protocoltest/awsrestjson/api_op_TestNoPayload_test.go new file mode 100644 index 00000000000..1ef3cbb662c --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestNoPayload_test.go @@ -0,0 +1,146 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_TestNoPayload_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *TestNoPayloadInput + 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 with no modeled body + "RestJsonHttpWithNoModeledBody": { + Params: &TestNoPayloadInput{}, + ExpectMethod: "GET", + ExpectURIPath: "/no_payload", + ExpectQuery: []smithytesting.QueryItem{}, + ForbidHeader: []string{ + "Content-Length", + "Content-Type", + }, + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderEmpty(actual) + }, + }, + // Serializes a GET request with header member but no modeled body + "RestJsonHttpWithHeaderMemberNoModeledBody": { + Params: &TestNoPayloadInput{ + TestId: ptr.String("t-12345"), + }, + ExpectMethod: "GET", + ExpectURIPath: "/no_payload", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "X-Amz-Test-Id": []string{"t-12345"}, + }, + 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) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.TestNoPayload(context.Background(), c.Params) + 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_TestPayloadBlob.go b/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob.go new file mode 100644 index 00000000000..b0bf07571a9 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob.go @@ -0,0 +1,111 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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 serializes a payload targeting a blob. The Blob shape is +// not structured content and we cannot make assumptions about what data will be +// sent. This test ensures only a generic "Content-Type: application/octet-stream" +// header is used, and that we are not treating an empty body as an empty JSON +// document. +func (c *Client) TestPayloadBlob(ctx context.Context, params *TestPayloadBlobInput, optFns ...func(*Options)) (*TestPayloadBlobOutput, error) { + if params == nil { + params = &TestPayloadBlobInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestPayloadBlob", params, optFns, c.addOperationTestPayloadBlobMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestPayloadBlobOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestPayloadBlobInput struct { + ContentType *string + + Data []byte + + noSmithyDocumentSerde +} + +type TestPayloadBlobOutput struct { + ContentType *string + + Data []byte + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestPayloadBlobMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTestPayloadBlob{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTestPayloadBlob{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestPayloadBlob(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestPayloadBlob(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestPayloadBlob", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob_test.go b/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob_test.go new file mode 100644 index 00000000000..1af3c4b2648 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestPayloadBlob_test.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_TestPayloadBlob_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *TestPayloadBlobInput + 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 payload targeting an empty blob + "RestJsonHttpWithEmptyBlobPayload": { + Params: &TestPayloadBlobInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/blob_payload", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/octet-stream"}, + }, + BodyMediaType: "application/octet-stream", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderEmpty(actual) + }, + }, + // Serializes a payload targeting a blob + "RestJsonTestPayloadBlob": { + Params: &TestPayloadBlobInput{ + ContentType: ptr.String("image/jpg"), + Data: []byte("1234"), + }, + ExpectMethod: "POST", + ExpectURIPath: "/blob_payload", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"image/jpg"}, + }, + RequireHeader: []string{ + "Content-Length", + }, + BodyMediaType: "image/jpg", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderBytes(actual, []byte(`1234`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + if name == "RestJsonHttpWithEmptyBlobPayload" { + t.Skip("disabled test aws.protocoltests.restjson#RestJson aws.protocoltests.restjson#TestPayloadBlob") + } + + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.TestPayloadBlob(context.Background(), c.Params) + 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_TestPayloadStructure.go b/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure.go new file mode 100644 index 00000000000..1eb34a51f0a --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure.go @@ -0,0 +1,110 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "context" + 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" +) + +// This example operation serializes a payload targeting a structure. This enforces +// the same requirements as TestBodyStructure but with the body specified by the +// @httpPayload trait. +func (c *Client) TestPayloadStructure(ctx context.Context, params *TestPayloadStructureInput, optFns ...func(*Options)) (*TestPayloadStructureOutput, error) { + if params == nil { + params = &TestPayloadStructureInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TestPayloadStructure", params, optFns, c.addOperationTestPayloadStructureMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TestPayloadStructureOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TestPayloadStructureInput struct { + PayloadConfig *types.PayloadConfig + + TestId *string + + noSmithyDocumentSerde +} + +type TestPayloadStructureOutput struct { + PayloadConfig *types.PayloadConfig + + TestId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTestPayloadStructureMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTestPayloadStructure{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTestPayloadStructure{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestPayloadStructure(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTestPayloadStructure(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TestPayloadStructure", + } +} diff --git a/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure_test.go b/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure_test.go new file mode 100644 index 00000000000..68ca1c3f9f0 --- /dev/null +++ b/internal/protocoltest/awsrestjson/api_op_TestPayloadStructure_test.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package awsrestjson + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/aws-sdk-go-v2/internal/protocoltest/awsrestjson/types" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_TestPayloadStructure_awsRestjson1Serialize(t *testing.T) { + cases := map[string]struct { + Params *TestPayloadStructureInput + 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 payload targeting an empty structure + "RestJsonHttpWithEmptyStructurePayload": { + Params: &TestPayloadStructureInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/payload", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + RequireHeader: []string{ + "Content-Length", + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{}`)) + }, + }, + // Serializes a payload targeting a structure + "RestJsonTestPayloadStructure": { + Params: &TestPayloadStructureInput{ + TestId: ptr.String("t-12345"), + PayloadConfig: &types.PayloadConfig{ + Data: ptr.Int32(25), + }, + }, + ExpectMethod: "POST", + ExpectURIPath: "/payload", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + RequireHeader: []string{ + "Content-Length", + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{"data": 25 + }`)) + }, + }, + // Serializes an request with header members but no payload + "RestJsonHttpWithHeadersButNoPayload": { + Params: &TestPayloadStructureInput{ + TestId: ptr.String("t-12345"), + }, + ExpectMethod: "POST", + ExpectURIPath: "/payload", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/json"}, + }, + RequireHeader: []string{ + "Content-Length", + }, + BodyMediaType: "application/json", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareJSONReaderBytes(actual, []byte(`{}`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.TestPayloadStructure(context.Background(), c.Params) + 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_TimestampFormatHeaders_test.go b/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders_test.go index 50fab2a66db..6b99282fbd8 100644 --- a/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders_test.go +++ b/internal/protocoltest/awsrestjson/api_op_TimestampFormatHeaders_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_TimestampFormatHeaders_awsRestjson1Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -87,7 +89,17 @@ func TestClient_TimestampFormatHeaders_awsRestjson1Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -96,7 +108,7 @@ func TestClient_TimestampFormatHeaders_awsRestjson1Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -166,7 +178,7 @@ func TestClient_TimestampFormatHeaders_awsRestjson1Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -199,7 +211,7 @@ func TestClient_TimestampFormatHeaders_awsRestjson1Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/awsrestjson/deserializers.go b/internal/protocoltest/awsrestjson/deserializers.go index df0059cfe1d..aefb5a4258c 100644 --- a/internal/protocoltest/awsrestjson/deserializers.go +++ b/internal/protocoltest/awsrestjson/deserializers.go @@ -940,6 +940,240 @@ func awsRestjson1_deserializeOpHttpBindingsGreetingWithErrorsOutput(v *GreetingW return nil } +type awsRestjson1_deserializeOpHostWithPathOperation struct { +} + +func (*awsRestjson1_deserializeOpHostWithPathOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpHostWithPathOperation) 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_deserializeOpErrorHostWithPathOperation(response, &metadata) + } + output := &HostWithPathOperationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorHostWithPathOperation(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpHttpChecksumRequired struct { +} + +func (*awsRestjson1_deserializeOpHttpChecksumRequired) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpHttpChecksumRequired) 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_deserializeOpErrorHttpChecksumRequired(response, &metadata) + } + output := &HttpChecksumRequiredOutput{} + 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_deserializeOpDocumentHttpChecksumRequiredOutput(&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_deserializeOpErrorHttpChecksumRequired(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentHttpChecksumRequiredOutput(v **HttpChecksumRequiredOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *HttpChecksumRequiredOutput + if *v == nil { + sv = &HttpChecksumRequiredOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "foo": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Foo = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpHttpEnumPayload struct { } @@ -3646,14 +3880,14 @@ func awsRestjson1_deserializeOpDocumentJsonUnionsOutput(v **JsonUnionsOutput, va return nil } -type awsRestjson1_deserializeOpMediaTypeHeader struct { +type awsRestjson1_deserializeOpMalformedAcceptWithBody struct { } -func (*awsRestjson1_deserializeOpMediaTypeHeader) ID() string { +func (*awsRestjson1_deserializeOpMalformedAcceptWithBody) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpMediaTypeHeader) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedAcceptWithBody) 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) @@ -3667,20 +3901,43 @@ func (m *awsRestjson1_deserializeOpMediaTypeHeader) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorMediaTypeHeader(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedAcceptWithBody(response, &metadata) } - output := &MediaTypeHeaderOutput{} + output := &MalformedAcceptWithBodyOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsMediaTypeHeaderOutput(output, response) + 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_deserializeOpDocumentMalformedAcceptWithBodyOutput(&output, shape) if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorMediaTypeHeader(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedAcceptWithBody(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)} @@ -3731,31 +3988,54 @@ func awsRestjson1_deserializeOpErrorMediaTypeHeader(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsMediaTypeHeaderOutput(v *MediaTypeHeaderOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpDocumentMalformedAcceptWithBodyOutput(v **MalformedAcceptWithBodyOutput, value interface{}) error { if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - if headerValues := response.Header.Values("X-Json"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - b, err := base64.StdEncoding.DecodeString(headerValues[0]) - if err != nil { - return err - } - v.Json = ptr.String(string(b)) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *MalformedAcceptWithBodyOutput + if *v == nil { + sv = &MalformedAcceptWithBodyOutput{} + } else { + sv = *v } + for key, value := range shape { + switch key { + case "hi": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Hi = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv return nil } -type awsRestjson1_deserializeOpNoInputAndNoOutput struct { +type awsRestjson1_deserializeOpMalformedAcceptWithGenericString struct { } -func (*awsRestjson1_deserializeOpNoInputAndNoOutput) ID() string { +func (*awsRestjson1_deserializeOpMalformedAcceptWithGenericString) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpNoInputAndNoOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedAcceptWithGenericString) 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) @@ -3769,9 +4049,9 @@ func (m *awsRestjson1_deserializeOpNoInputAndNoOutput) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorNoInputAndNoOutput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedAcceptWithGenericString(response, &metadata) } - output := &NoInputAndNoOutputOutput{} + output := &MalformedAcceptWithGenericStringOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -3783,7 +4063,7 @@ func (m *awsRestjson1_deserializeOpNoInputAndNoOutput) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorNoInputAndNoOutput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedAcceptWithGenericString(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)} @@ -3834,14 +4114,14 @@ func awsRestjson1_deserializeOpErrorNoInputAndNoOutput(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpNoInputAndOutput struct { +type awsRestjson1_deserializeOpMalformedAcceptWithPayload struct { } -func (*awsRestjson1_deserializeOpNoInputAndOutput) ID() string { +func (*awsRestjson1_deserializeOpMalformedAcceptWithPayload) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpNoInputAndOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedAcceptWithPayload) 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) @@ -3855,15 +4135,20 @@ func (m *awsRestjson1_deserializeOpNoInputAndOutput) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorNoInputAndOutput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedAcceptWithPayload(response, &metadata) } - output := &NoInputAndOutputOutput{} + output := &MalformedAcceptWithPayloadOutput{} out.Result = output + err = awsRestjson1_deserializeOpDocumentMalformedAcceptWithPayloadOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + return out, metadata, err } -func awsRestjson1_deserializeOpErrorNoInputAndOutput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedAcceptWithPayload(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)} @@ -3914,14 +4199,29 @@ func awsRestjson1_deserializeOpErrorNoInputAndOutput(response *smithyhttp.Respon } } -type awsRestjson1_deserializeOpNullAndEmptyHeadersClient struct { +func awsRestjson1_deserializeOpDocumentMalformedAcceptWithPayloadOutput(v *MalformedAcceptWithPayloadOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + bs, err := ioutil.ReadAll(body) + if err != nil { + return err + } + if len(bs) > 0 { + v.Payload = bs + } + return nil } -func (*awsRestjson1_deserializeOpNullAndEmptyHeadersClient) ID() string { +type awsRestjson1_deserializeOpMalformedBlob struct { +} + +func (*awsRestjson1_deserializeOpMalformedBlob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpNullAndEmptyHeadersClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedBlob) 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) @@ -3935,20 +4235,21 @@ func (m *awsRestjson1_deserializeOpNullAndEmptyHeadersClient) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorNullAndEmptyHeadersClient(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedBlob(response, &metadata) } - output := &NullAndEmptyHeadersClientOutput{} + output := &MalformedBlobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersClientOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorNullAndEmptyHeadersClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedBlob(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)} @@ -3999,48 +4300,14 @@ func awsRestjson1_deserializeOpErrorNullAndEmptyHeadersClient(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersClientOutput(v *NullAndEmptyHeadersClientOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("X-A"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.A = ptr.String(headerValues[0]) - } - - if headerValues := response.Header.Values("X-B"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.B = ptr.String(headerValues[0]) - } - - if headerValues := response.Header.Values("X-C"); len(headerValues) != 0 { - { - var err error - headerValues, err = smithyhttp.SplitHeaderListValues(headerValues) - if err != nil { - return err - } - } - var list []string - for _, headerValuesVal := range headerValues { - headerValuesVal = strings.TrimSpace(headerValuesVal) - list = append(list, headerValuesVal) - } - v.C = list - } - - return nil -} - -type awsRestjson1_deserializeOpNullAndEmptyHeadersServer struct { +type awsRestjson1_deserializeOpMalformedBoolean struct { } -func (*awsRestjson1_deserializeOpNullAndEmptyHeadersServer) ID() string { +func (*awsRestjson1_deserializeOpMalformedBoolean) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpNullAndEmptyHeadersServer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedBoolean) 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) @@ -4054,20 +4321,21 @@ func (m *awsRestjson1_deserializeOpNullAndEmptyHeadersServer) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorNullAndEmptyHeadersServer(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedBoolean(response, &metadata) } - output := &NullAndEmptyHeadersServerOutput{} + output := &MalformedBooleanOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersServerOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorNullAndEmptyHeadersServer(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedBoolean(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)} @@ -4118,48 +4386,14 @@ func awsRestjson1_deserializeOpErrorNullAndEmptyHeadersServer(response *smithyht } } -func awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersServerOutput(v *NullAndEmptyHeadersServerOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("X-A"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.A = ptr.String(headerValues[0]) - } - - if headerValues := response.Header.Values("X-B"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.B = ptr.String(headerValues[0]) - } - - if headerValues := response.Header.Values("X-C"); len(headerValues) != 0 { - { - var err error - headerValues, err = smithyhttp.SplitHeaderListValues(headerValues) - if err != nil { - return err - } - } - var list []string - for _, headerValuesVal := range headerValues { - headerValuesVal = strings.TrimSpace(headerValuesVal) - list = append(list, headerValuesVal) - } - v.C = list - } - - return nil -} - -type awsRestjson1_deserializeOpOmitsNullSerializesEmptyString struct { +type awsRestjson1_deserializeOpMalformedByte struct { } -func (*awsRestjson1_deserializeOpOmitsNullSerializesEmptyString) ID() string { +func (*awsRestjson1_deserializeOpMalformedByte) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpOmitsNullSerializesEmptyString) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedByte) 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) @@ -4173,9 +4407,9 @@ func (m *awsRestjson1_deserializeOpOmitsNullSerializesEmptyString) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorOmitsNullSerializesEmptyString(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedByte(response, &metadata) } - output := &OmitsNullSerializesEmptyStringOutput{} + output := &MalformedByteOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4187,7 +4421,7 @@ func (m *awsRestjson1_deserializeOpOmitsNullSerializesEmptyString) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorOmitsNullSerializesEmptyString(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedByte(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)} @@ -4238,14 +4472,14 @@ func awsRestjson1_deserializeOpErrorOmitsNullSerializesEmptyString(response *smi } } -type awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill struct { +type awsRestjson1_deserializeOpMalformedContentTypeWithBody struct { } -func (*awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill) ID() string { +func (*awsRestjson1_deserializeOpMalformedContentTypeWithBody) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedContentTypeWithBody) 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) @@ -4259,9 +4493,9 @@ func (m *awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorQueryIdempotencyTokenAutoFill(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedContentTypeWithBody(response, &metadata) } - output := &QueryIdempotencyTokenAutoFillOutput{} + output := &MalformedContentTypeWithBodyOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4273,7 +4507,7 @@ func (m *awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorQueryIdempotencyTokenAutoFill(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedContentTypeWithBody(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)} @@ -4324,14 +4558,14 @@ func awsRestjson1_deserializeOpErrorQueryIdempotencyTokenAutoFill(response *smit } } -type awsRestjson1_deserializeOpQueryParamsAsStringListMap struct { +type awsRestjson1_deserializeOpMalformedContentTypeWithGenericString struct { } -func (*awsRestjson1_deserializeOpQueryParamsAsStringListMap) ID() string { +func (*awsRestjson1_deserializeOpMalformedContentTypeWithGenericString) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpQueryParamsAsStringListMap) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedContentTypeWithGenericString) 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) @@ -4345,9 +4579,9 @@ func (m *awsRestjson1_deserializeOpQueryParamsAsStringListMap) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorQueryParamsAsStringListMap(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedContentTypeWithGenericString(response, &metadata) } - output := &QueryParamsAsStringListMapOutput{} + output := &MalformedContentTypeWithGenericStringOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4359,7 +4593,7 @@ func (m *awsRestjson1_deserializeOpQueryParamsAsStringListMap) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorQueryParamsAsStringListMap(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedContentTypeWithGenericString(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)} @@ -4410,14 +4644,14 @@ func awsRestjson1_deserializeOpErrorQueryParamsAsStringListMap(response *smithyh } } -type awsRestjson1_deserializeOpQueryPrecedence struct { +type awsRestjson1_deserializeOpMalformedContentTypeWithoutBody struct { } -func (*awsRestjson1_deserializeOpQueryPrecedence) ID() string { +func (*awsRestjson1_deserializeOpMalformedContentTypeWithoutBody) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpQueryPrecedence) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedContentTypeWithoutBody) 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) @@ -4431,9 +4665,9 @@ func (m *awsRestjson1_deserializeOpQueryPrecedence) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorQueryPrecedence(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedContentTypeWithoutBody(response, &metadata) } - output := &QueryPrecedenceOutput{} + output := &MalformedContentTypeWithoutBodyOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -4445,7 +4679,7 @@ func (m *awsRestjson1_deserializeOpQueryPrecedence) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorQueryPrecedence(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedContentTypeWithoutBody(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)} @@ -4496,14 +4730,14 @@ func awsRestjson1_deserializeOpErrorQueryPrecedence(response *smithyhttp.Respons } } -type awsRestjson1_deserializeOpRecursiveShapes struct { +type awsRestjson1_deserializeOpMalformedContentTypeWithPayload struct { } -func (*awsRestjson1_deserializeOpRecursiveShapes) ID() string { +func (*awsRestjson1_deserializeOpMalformedContentTypeWithPayload) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRecursiveShapes) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedContentTypeWithPayload) 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) @@ -4517,43 +4751,21 @@ func (m *awsRestjson1_deserializeOpRecursiveShapes) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRecursiveShapes(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedContentTypeWithPayload(response, &metadata) } - output := &RecursiveShapesOutput{} + output := &MalformedContentTypeWithPayloadOutput{} 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_deserializeOpDocumentRecursiveShapesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorRecursiveShapes(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedContentTypeWithPayload(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)} @@ -4604,50 +4816,14 @@ func awsRestjson1_deserializeOpErrorRecursiveShapes(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentRecursiveShapesOutput(v **RecursiveShapesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RecursiveShapesOutput - if *v == nil { - sv = &RecursiveShapesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nested": - if err := awsRestjson1_deserializeDocumentRecursiveShapesInputOutputNested1(&sv.Nested, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpSimpleScalarProperties struct { +type awsRestjson1_deserializeOpMalformedDouble struct { } -func (*awsRestjson1_deserializeOpSimpleScalarProperties) ID() string { +func (*awsRestjson1_deserializeOpMalformedDouble) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpSimpleScalarProperties) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMalformedDouble) 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) @@ -4661,48 +4837,107 @@ func (m *awsRestjson1_deserializeOpSimpleScalarProperties) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSimpleScalarProperties(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMalformedDouble(response, &metadata) } - output := &SimpleScalarPropertiesOutput{} + output := &MalformedDoubleOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsSimpleScalarPropertiesOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedDouble(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + code, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err + return err } - err = awsRestjson1_deserializeOpDocumentSimpleScalarPropertiesOutput(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedFloat struct { +} + +func (*awsRestjson1_deserializeOpMalformedFloat) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedFloat) 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 { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + 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_deserializeOpErrorMalformedFloat(response, &metadata) + } + output := &MalformedFloatOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorSimpleScalarProperties(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMalformedFloat(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)} @@ -4753,185 +4988,3592 @@ func awsRestjson1_deserializeOpErrorSimpleScalarProperties(response *smithyhttp. } } -func awsRestjson1_deserializeOpHttpBindingsSimpleScalarPropertiesOutput(v *SimpleScalarPropertiesOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Foo = ptr.String(headerValues[0]) - } +type awsRestjson1_deserializeOpMalformedInteger struct { +} - return nil +func (*awsRestjson1_deserializeOpMalformedInteger) ID() string { + return "OperationDeserializer" } -func awsRestjson1_deserializeOpDocumentSimpleScalarPropertiesOutput(v **SimpleScalarPropertiesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil + +func (m *awsRestjson1_deserializeOpMalformedInteger) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err } - shape, ok := value.(map[string]interface{}) + response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *SimpleScalarPropertiesOutput - if *v == nil { - sv = &SimpleScalarPropertiesOutput{} - } else { - sv = *v + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorMalformedInteger(response, &metadata) } + output := &MalformedIntegerOutput{} + out.Result = output - for key, value := range shape { - switch key { - case "byteValue": - 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.ByteValue = ptr.Int8(int8(i64)) - } - - case "DoubleDribble": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DoubleValue = ptr.Float64(f64) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + return out, metadata, err +} - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) +func awsRestjson1_deserializeOpErrorMalformedInteger(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 strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + errorCode := "UnknownError" + errorMessage := errorCode - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } - } - sv.DoubleValue = ptr.Float64(f64) + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } - case "falseBooleanValue": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.FalseBooleanValue = ptr.Bool(jtv) - } + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case "floatValue": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.FloatValue = ptr.Float32(float32(f64)) + } +} - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() +type awsRestjson1_deserializeOpMalformedList struct { +} - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) +func (*awsRestjson1_deserializeOpMalformedList) ID() string { + return "OperationDeserializer" +} - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) +func (m *awsRestjson1_deserializeOpMalformedList) 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 + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - } - sv.FloatValue = ptr.Float32(float32(f64)) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorMalformedList(response, &metadata) + } + output := &MalformedListOutput{} + out.Result = output - default: - return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedList(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedLong struct { +} + +func (*awsRestjson1_deserializeOpMalformedLong) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedLong) 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_deserializeOpErrorMalformedLong(response, &metadata) + } + output := &MalformedLongOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedLong(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedMap struct { +} + +func (*awsRestjson1_deserializeOpMalformedMap) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedMap) 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_deserializeOpErrorMalformedMap(response, &metadata) + } + output := &MalformedMapOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedMap(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedRequestBody struct { +} + +func (*awsRestjson1_deserializeOpMalformedRequestBody) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedRequestBody) 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_deserializeOpErrorMalformedRequestBody(response, &metadata) + } + output := &MalformedRequestBodyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedRequestBody(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedSet struct { +} + +func (*awsRestjson1_deserializeOpMalformedSet) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedSet) 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_deserializeOpErrorMalformedSet(response, &metadata) + } + output := &MalformedSetOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedSet(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedShort struct { +} + +func (*awsRestjson1_deserializeOpMalformedShort) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedShort) 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_deserializeOpErrorMalformedShort(response, &metadata) + } + output := &MalformedShortOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedShort(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedString struct { +} + +func (*awsRestjson1_deserializeOpMalformedString) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedString) 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_deserializeOpErrorMalformedString(response, &metadata) + } + output := &MalformedStringOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedString(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampBodyDateTime struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampBodyDateTime) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampBodyDateTime) 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_deserializeOpErrorMalformedTimestampBodyDateTime(response, &metadata) + } + output := &MalformedTimestampBodyDateTimeOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampBodyDateTime(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampBodyDefault struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampBodyDefault) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampBodyDefault) 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_deserializeOpErrorMalformedTimestampBodyDefault(response, &metadata) + } + output := &MalformedTimestampBodyDefaultOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampBodyDefault(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampBodyHttpDate struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampBodyHttpDate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampBodyHttpDate) 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_deserializeOpErrorMalformedTimestampBodyHttpDate(response, &metadata) + } + output := &MalformedTimestampBodyHttpDateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampBodyHttpDate(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampHeaderDateTime struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampHeaderDateTime) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampHeaderDateTime) 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_deserializeOpErrorMalformedTimestampHeaderDateTime(response, &metadata) + } + output := &MalformedTimestampHeaderDateTimeOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampHeaderDateTime(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampHeaderDefault struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampHeaderDefault) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampHeaderDefault) 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_deserializeOpErrorMalformedTimestampHeaderDefault(response, &metadata) + } + output := &MalformedTimestampHeaderDefaultOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampHeaderDefault(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampHeaderEpoch struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampHeaderEpoch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampHeaderEpoch) 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_deserializeOpErrorMalformedTimestampHeaderEpoch(response, &metadata) + } + output := &MalformedTimestampHeaderEpochOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampHeaderEpoch(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampPathDefault struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampPathDefault) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampPathDefault) 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_deserializeOpErrorMalformedTimestampPathDefault(response, &metadata) + } + output := &MalformedTimestampPathDefaultOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampPathDefault(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampPathEpoch struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampPathEpoch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampPathEpoch) 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_deserializeOpErrorMalformedTimestampPathEpoch(response, &metadata) + } + output := &MalformedTimestampPathEpochOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampPathEpoch(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampPathHttpDate struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampPathHttpDate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampPathHttpDate) 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_deserializeOpErrorMalformedTimestampPathHttpDate(response, &metadata) + } + output := &MalformedTimestampPathHttpDateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampPathHttpDate(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampQueryDefault struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampQueryDefault) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampQueryDefault) 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_deserializeOpErrorMalformedTimestampQueryDefault(response, &metadata) + } + output := &MalformedTimestampQueryDefaultOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampQueryDefault(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampQueryEpoch struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampQueryEpoch) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampQueryEpoch) 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_deserializeOpErrorMalformedTimestampQueryEpoch(response, &metadata) + } + output := &MalformedTimestampQueryEpochOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampQueryEpoch(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedTimestampQueryHttpDate struct { +} + +func (*awsRestjson1_deserializeOpMalformedTimestampQueryHttpDate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedTimestampQueryHttpDate) 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_deserializeOpErrorMalformedTimestampQueryHttpDate(response, &metadata) + } + output := &MalformedTimestampQueryHttpDateOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedTimestampQueryHttpDate(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMalformedUnion struct { +} + +func (*awsRestjson1_deserializeOpMalformedUnion) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMalformedUnion) 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_deserializeOpErrorMalformedUnion(response, &metadata) + } + output := &MalformedUnionOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorMalformedUnion(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpMediaTypeHeader struct { +} + +func (*awsRestjson1_deserializeOpMediaTypeHeader) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpMediaTypeHeader) 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_deserializeOpErrorMediaTypeHeader(response, &metadata) + } + output := &MediaTypeHeaderOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsMediaTypeHeaderOutput(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_deserializeOpErrorMediaTypeHeader(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsMediaTypeHeaderOutput(v *MediaTypeHeaderOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Json"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + b, err := base64.StdEncoding.DecodeString(headerValues[0]) + if err != nil { + return err + } + v.Json = ptr.String(string(b)) + } + + return nil +} + +type awsRestjson1_deserializeOpNoInputAndNoOutput struct { +} + +func (*awsRestjson1_deserializeOpNoInputAndNoOutput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpNoInputAndNoOutput) 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_deserializeOpErrorNoInputAndNoOutput(response, &metadata) + } + output := &NoInputAndNoOutputOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorNoInputAndNoOutput(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpNoInputAndOutput struct { +} + +func (*awsRestjson1_deserializeOpNoInputAndOutput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpNoInputAndOutput) 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_deserializeOpErrorNoInputAndOutput(response, &metadata) + } + output := &NoInputAndOutputOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorNoInputAndOutput(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpNullAndEmptyHeadersClient struct { +} + +func (*awsRestjson1_deserializeOpNullAndEmptyHeadersClient) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpNullAndEmptyHeadersClient) 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_deserializeOpErrorNullAndEmptyHeadersClient(response, &metadata) + } + output := &NullAndEmptyHeadersClientOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersClientOutput(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_deserializeOpErrorNullAndEmptyHeadersClient(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersClientOutput(v *NullAndEmptyHeadersClientOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-A"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.A = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("X-B"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.B = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("X-C"); len(headerValues) != 0 { + { + var err error + headerValues, err = smithyhttp.SplitHeaderListValues(headerValues) + if err != nil { + return err + } + } + var list []string + for _, headerValuesVal := range headerValues { + headerValuesVal = strings.TrimSpace(headerValuesVal) + list = append(list, headerValuesVal) + } + v.C = list + } + + return nil +} + +type awsRestjson1_deserializeOpNullAndEmptyHeadersServer struct { +} + +func (*awsRestjson1_deserializeOpNullAndEmptyHeadersServer) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpNullAndEmptyHeadersServer) 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_deserializeOpErrorNullAndEmptyHeadersServer(response, &metadata) + } + output := &NullAndEmptyHeadersServerOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersServerOutput(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_deserializeOpErrorNullAndEmptyHeadersServer(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsNullAndEmptyHeadersServerOutput(v *NullAndEmptyHeadersServerOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-A"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.A = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("X-B"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.B = ptr.String(headerValues[0]) + } + + if headerValues := response.Header.Values("X-C"); len(headerValues) != 0 { + { + var err error + headerValues, err = smithyhttp.SplitHeaderListValues(headerValues) + if err != nil { + return err + } + } + var list []string + for _, headerValuesVal := range headerValues { + headerValuesVal = strings.TrimSpace(headerValuesVal) + list = append(list, headerValuesVal) + } + v.C = list + } + + return nil +} + +type awsRestjson1_deserializeOpOmitsNullSerializesEmptyString struct { +} + +func (*awsRestjson1_deserializeOpOmitsNullSerializesEmptyString) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpOmitsNullSerializesEmptyString) 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_deserializeOpErrorOmitsNullSerializesEmptyString(response, &metadata) + } + output := &OmitsNullSerializesEmptyStringOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorOmitsNullSerializesEmptyString(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill struct { +} + +func (*awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpQueryIdempotencyTokenAutoFill) 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_deserializeOpErrorQueryIdempotencyTokenAutoFill(response, &metadata) + } + output := &QueryIdempotencyTokenAutoFillOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorQueryIdempotencyTokenAutoFill(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpQueryParamsAsStringListMap struct { +} + +func (*awsRestjson1_deserializeOpQueryParamsAsStringListMap) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpQueryParamsAsStringListMap) 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_deserializeOpErrorQueryParamsAsStringListMap(response, &metadata) + } + output := &QueryParamsAsStringListMapOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorQueryParamsAsStringListMap(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpQueryPrecedence struct { +} + +func (*awsRestjson1_deserializeOpQueryPrecedence) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpQueryPrecedence) 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_deserializeOpErrorQueryPrecedence(response, &metadata) + } + output := &QueryPrecedenceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorQueryPrecedence(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpRecursiveShapes struct { +} + +func (*awsRestjson1_deserializeOpRecursiveShapes) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRecursiveShapes) 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_deserializeOpErrorRecursiveShapes(response, &metadata) + } + output := &RecursiveShapesOutput{} + 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_deserializeOpDocumentRecursiveShapesOutput(&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_deserializeOpErrorRecursiveShapes(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRecursiveShapesOutput(v **RecursiveShapesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RecursiveShapesOutput + if *v == nil { + sv = &RecursiveShapesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nested": + if err := awsRestjson1_deserializeDocumentRecursiveShapesInputOutputNested1(&sv.Nested, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSimpleScalarProperties struct { +} + +func (*awsRestjson1_deserializeOpSimpleScalarProperties) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpSimpleScalarProperties) 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_deserializeOpErrorSimpleScalarProperties(response, &metadata) + } + output := &SimpleScalarPropertiesOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsSimpleScalarPropertiesOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentSimpleScalarPropertiesOutput(&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_deserializeOpErrorSimpleScalarProperties(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsSimpleScalarPropertiesOutput(v *SimpleScalarPropertiesOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Foo = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentSimpleScalarPropertiesOutput(v **SimpleScalarPropertiesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SimpleScalarPropertiesOutput + if *v == nil { + sv = &SimpleScalarPropertiesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "byteValue": + 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.ByteValue = ptr.Int8(int8(i64)) + } + + case "DoubleDribble": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.DoubleValue = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.DoubleValue = ptr.Float64(f64) + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "falseBooleanValue": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.FalseBooleanValue = ptr.Bool(jtv) + } + + case "floatValue": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.FloatValue = ptr.Float32(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.FloatValue = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value) + + } + } + + case "integerValue": + 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.IntegerValue = ptr.Int32(int32(i64)) + } + + case "longValue": + 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.LongValue = ptr.Int64(i64) + } + + case "shortValue": + 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.ShortValue = ptr.Int16(int16(i64)) + } + + case "stringValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StringValue = ptr.String(jtv) + } + + case "trueBooleanValue": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } + sv.TrueBooleanValue = ptr.Bool(jtv) } - case "integerValue": - 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.IntegerValue = ptr.Int32(int32(i64)) - } + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStreamingTraits struct { +} + +func (*awsRestjson1_deserializeOpStreamingTraits) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStreamingTraits) 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_deserializeOpErrorStreamingTraits(response, &metadata) + } + output := &StreamingTraitsOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsStreamingTraitsOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentStreamingTraitsOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStreamingTraits(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsStreamingTraitsOutput(v *StreamingTraitsOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Foo = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentStreamingTraitsOutput(v *StreamingTraitsOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + v.Blob = body + return nil +} + +type awsRestjson1_deserializeOpStreamingTraitsRequireLength struct { +} + +func (*awsRestjson1_deserializeOpStreamingTraitsRequireLength) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStreamingTraitsRequireLength) 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_deserializeOpErrorStreamingTraitsRequireLength(response, &metadata) + } + output := &StreamingTraitsRequireLengthOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsStreamingTraitsRequireLengthOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentStreamingTraitsRequireLengthOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStreamingTraitsRequireLength(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsStreamingTraitsRequireLengthOutput(v *StreamingTraitsRequireLengthOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Foo = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentStreamingTraitsRequireLengthOutput(v *StreamingTraitsRequireLengthOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + v.Blob = body + return nil +} + +type awsRestjson1_deserializeOpStreamingTraitsWithMediaType struct { +} + +func (*awsRestjson1_deserializeOpStreamingTraitsWithMediaType) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStreamingTraitsWithMediaType) 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_deserializeOpErrorStreamingTraitsWithMediaType(response, &metadata) + } + output := &StreamingTraitsWithMediaTypeOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsStreamingTraitsWithMediaTypeOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + err = awsRestjson1_deserializeOpDocumentStreamingTraitsWithMediaTypeOutput(output, response.Body) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStreamingTraitsWithMediaType(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpHttpBindingsStreamingTraitsWithMediaTypeOutput(v *StreamingTraitsWithMediaTypeOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.Foo = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeOpDocumentStreamingTraitsWithMediaTypeOutput(v *StreamingTraitsWithMediaTypeOutput, body io.ReadCloser) error { + if v == nil { + return fmt.Errorf("unsupported deserialization of nil %T", v) + } + + v.Blob = body + return nil +} + +type awsRestjson1_deserializeOpTestBodyStructure struct { +} + +func (*awsRestjson1_deserializeOpTestBodyStructure) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTestBodyStructure) 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_deserializeOpErrorTestBodyStructure(response, &metadata) + } + output := &TestBodyStructureOutput{} + out.Result = output + + err = awsRestjson1_deserializeOpHttpBindingsTestBodyStructureOutput(output, response) + if err != nil { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentTestBodyStructureOutput(&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_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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case "longValue": - 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.LongValue = ptr.Int64(i64) - } + } +} - case "shortValue": - 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.ShortValue = ptr.Int16(int16(i64)) - } +func awsRestjson1_deserializeOpHttpBindingsTestBodyStructureOutput(v *TestBodyStructureOutput, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } - case "stringValue": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.StringValue = ptr.String(jtv) - } + if headerValues := response.Header.Values("x-amz-test-id"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.TestId = ptr.String(headerValues[0]) + } - case "trueBooleanValue": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.TrueBooleanValue = ptr.Bool(jtv) + 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: @@ -4943,14 +8585,14 @@ func awsRestjson1_deserializeOpDocumentSimpleScalarPropertiesOutput(v **SimpleSc return nil } -type awsRestjson1_deserializeOpStreamingTraits struct { +type awsRestjson1_deserializeOpTestNoPayload struct { } -func (*awsRestjson1_deserializeOpStreamingTraits) ID() string { +func (*awsRestjson1_deserializeOpTestNoPayload) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStreamingTraits) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTestNoPayload) 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) @@ -4964,25 +8606,20 @@ func (m *awsRestjson1_deserializeOpStreamingTraits) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStreamingTraits(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTestNoPayload(response, &metadata) } - output := &StreamingTraitsOutput{} + output := &TestNoPayloadOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStreamingTraitsOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsTestNoPayloadOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } - err = awsRestjson1_deserializeOpDocumentStreamingTraitsOutput(output, response.Body) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} - } - return out, metadata, err } -func awsRestjson1_deserializeOpErrorStreamingTraits(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTestNoPayload(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)} @@ -5033,35 +8670,27 @@ func awsRestjson1_deserializeOpErrorStreamingTraits(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpHttpBindingsStreamingTraitsOutput(v *StreamingTraitsOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsTestNoPayloadOutput(v *TestNoPayloadOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } - if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { + if headerValues := response.Header.Values("X-Amz-Test-Id"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Foo = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestjson1_deserializeOpDocumentStreamingTraitsOutput(v *StreamingTraitsOutput, body io.ReadCloser) error { - if v == nil { - return fmt.Errorf("unsupported deserialization of nil %T", v) + v.TestId = ptr.String(headerValues[0]) } - v.Blob = body return nil } -type awsRestjson1_deserializeOpStreamingTraitsRequireLength struct { +type awsRestjson1_deserializeOpTestPayloadBlob struct { } -func (*awsRestjson1_deserializeOpStreamingTraitsRequireLength) ID() string { +func (*awsRestjson1_deserializeOpTestPayloadBlob) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStreamingTraitsRequireLength) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTestPayloadBlob) 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) @@ -5075,17 +8704,17 @@ func (m *awsRestjson1_deserializeOpStreamingTraitsRequireLength) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStreamingTraitsRequireLength(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTestPayloadBlob(response, &metadata) } - output := &StreamingTraitsRequireLengthOutput{} + output := &TestPayloadBlobOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStreamingTraitsRequireLengthOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsTestPayloadBlobOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } - err = awsRestjson1_deserializeOpDocumentStreamingTraitsRequireLengthOutput(output, response.Body) + err = awsRestjson1_deserializeOpDocumentTestPayloadBlobOutput(output, response.Body) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} } @@ -5093,7 +8722,7 @@ func (m *awsRestjson1_deserializeOpStreamingTraitsRequireLength) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorStreamingTraitsRequireLength(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTestPayloadBlob(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)} @@ -5144,35 +8773,41 @@ func awsRestjson1_deserializeOpErrorStreamingTraitsRequireLength(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsStreamingTraitsRequireLengthOutput(v *StreamingTraitsRequireLengthOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsTestPayloadBlobOutput(v *TestPayloadBlobOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } - if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { + if headerValues := response.Header.Values("Content-Type"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Foo = ptr.String(headerValues[0]) + v.ContentType = ptr.String(headerValues[0]) } return nil } -func awsRestjson1_deserializeOpDocumentStreamingTraitsRequireLengthOutput(v *StreamingTraitsRequireLengthOutput, body io.ReadCloser) error { +func awsRestjson1_deserializeOpDocumentTestPayloadBlobOutput(v *TestPayloadBlobOutput, body io.ReadCloser) error { if v == nil { return fmt.Errorf("unsupported deserialization of nil %T", v) } - v.Blob = body + bs, err := ioutil.ReadAll(body) + if err != nil { + return err + } + if len(bs) > 0 { + v.Data = bs + } return nil } -type awsRestjson1_deserializeOpStreamingTraitsWithMediaType struct { +type awsRestjson1_deserializeOpTestPayloadStructure struct { } -func (*awsRestjson1_deserializeOpStreamingTraitsWithMediaType) ID() string { +func (*awsRestjson1_deserializeOpTestPayloadStructure) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStreamingTraitsWithMediaType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpTestPayloadStructure) 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) @@ -5186,25 +8821,48 @@ func (m *awsRestjson1_deserializeOpStreamingTraitsWithMediaType) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStreamingTraitsWithMediaType(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTestPayloadStructure(response, &metadata) } - output := &StreamingTraitsWithMediaTypeOutput{} + output := &TestPayloadStructureOutput{} out.Result = output - err = awsRestjson1_deserializeOpHttpBindingsStreamingTraitsWithMediaTypeOutput(output, response) + err = awsRestjson1_deserializeOpHttpBindingsTestPayloadStructureOutput(output, response) if err != nil { return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} } - err = awsRestjson1_deserializeOpDocumentStreamingTraitsWithMediaTypeOutput(output, response.Body) + 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_deserializeDocumentPayloadConfig(&output.PayloadConfig, shape) if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize response payload, %w", err)} + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorStreamingTraitsWithMediaType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorTestPayloadStructure(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)} @@ -5255,24 +8913,51 @@ func awsRestjson1_deserializeOpErrorStreamingTraitsWithMediaType(response *smith } } -func awsRestjson1_deserializeOpHttpBindingsStreamingTraitsWithMediaTypeOutput(v *StreamingTraitsWithMediaTypeOutput, response *smithyhttp.Response) error { +func awsRestjson1_deserializeOpHttpBindingsTestPayloadStructureOutput(v *TestPayloadStructureOutput, response *smithyhttp.Response) error { if v == nil { return fmt.Errorf("unsupported deserialization for nil %T", v) } - if headerValues := response.Header.Values("X-Foo"); len(headerValues) != 0 { + if headerValues := response.Header.Values("x-amz-test-id"); len(headerValues) != 0 { headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Foo = ptr.String(headerValues[0]) + v.TestId = ptr.String(headerValues[0]) } return nil } -func awsRestjson1_deserializeOpDocumentStreamingTraitsWithMediaTypeOutput(v *StreamingTraitsWithMediaTypeOutput, body io.ReadCloser) error { +func awsRestjson1_deserializeOpDocumentTestPayloadStructureOutput(v **TestPayloadStructureOutput, value interface{}) error { if v == nil { - return fmt.Errorf("unsupported deserialization of nil %T", v) + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - v.Blob = body + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *TestPayloadStructureOutput + if *v == nil { + sv = &TestPayloadStructureOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "payloadConfig": + if err := awsRestjson1_deserializeDocumentPayloadConfig(&sv.PayloadConfig, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv return nil } @@ -6082,6 +9767,50 @@ func awsRestjson1_deserializeDocumentNestedPayload(v **types.NestedPayload, valu return nil } +func awsRestjson1_deserializeDocumentPayloadConfig(v **types.PayloadConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.PayloadConfig + if *v == nil { + sv = &types.PayloadConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "data": + 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.Data = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRecursiveShapesInputOutputNested1(v **types.RecursiveShapesInputOutputNested1, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6399,6 +10128,50 @@ func awsRestjson1_deserializeDocumentStructureListMember(v **types.StructureList return nil } +func awsRestjson1_deserializeDocumentTestConfig(v **types.TestConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.TestConfig + if *v == nil { + sv = &types.TestConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "timeout": + 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.Timeout = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentRenamedGreeting(v **types.RenamedGreeting, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/internal/protocoltest/awsrestjson/generated.json b/internal/protocoltest/awsrestjson/generated.json index f5d628321ff..9eecc5c3783 100644 --- a/internal/protocoltest/awsrestjson/generated.json +++ b/internal/protocoltest/awsrestjson/generated.json @@ -26,6 +26,10 @@ "api_op_EndpointWithHostLabelOperation_test.go", "api_op_GreetingWithErrors.go", "api_op_GreetingWithErrors_test.go", + "api_op_HostWithPathOperation.go", + "api_op_HostWithPathOperation_test.go", + "api_op_HttpChecksumRequired.go", + "api_op_HttpChecksumRequired_test.go", "api_op_HttpEnumPayload.go", "api_op_HttpEnumPayload_test.go", "api_op_HttpPayloadTraits.go", @@ -66,6 +70,39 @@ "api_op_JsonTimestamps_test.go", "api_op_JsonUnions.go", "api_op_JsonUnions_test.go", + "api_op_MalformedAcceptWithBody.go", + "api_op_MalformedAcceptWithGenericString.go", + "api_op_MalformedAcceptWithPayload.go", + "api_op_MalformedBlob.go", + "api_op_MalformedBoolean.go", + "api_op_MalformedByte.go", + "api_op_MalformedContentTypeWithBody.go", + "api_op_MalformedContentTypeWithGenericString.go", + "api_op_MalformedContentTypeWithPayload.go", + "api_op_MalformedContentTypeWithoutBody.go", + "api_op_MalformedDouble.go", + "api_op_MalformedFloat.go", + "api_op_MalformedInteger.go", + "api_op_MalformedList.go", + "api_op_MalformedLong.go", + "api_op_MalformedMap.go", + "api_op_MalformedRequestBody.go", + "api_op_MalformedSet.go", + "api_op_MalformedShort.go", + "api_op_MalformedString.go", + "api_op_MalformedTimestampBodyDateTime.go", + "api_op_MalformedTimestampBodyDefault.go", + "api_op_MalformedTimestampBodyHttpDate.go", + "api_op_MalformedTimestampHeaderDateTime.go", + "api_op_MalformedTimestampHeaderDefault.go", + "api_op_MalformedTimestampHeaderEpoch.go", + "api_op_MalformedTimestampPathDefault.go", + "api_op_MalformedTimestampPathEpoch.go", + "api_op_MalformedTimestampPathHttpDate.go", + "api_op_MalformedTimestampQueryDefault.go", + "api_op_MalformedTimestampQueryEpoch.go", + "api_op_MalformedTimestampQueryHttpDate.go", + "api_op_MalformedUnion.go", "api_op_MediaTypeHeader.go", "api_op_MediaTypeHeader_test.go", "api_op_NoInputAndNoOutput.go", @@ -93,6 +130,14 @@ "api_op_StreamingTraitsWithMediaType.go", "api_op_StreamingTraitsWithMediaType_test.go", "api_op_StreamingTraits_test.go", + "api_op_TestBodyStructure.go", + "api_op_TestBodyStructure_test.go", + "api_op_TestNoPayload.go", + "api_op_TestNoPayload_test.go", + "api_op_TestPayloadBlob.go", + "api_op_TestPayloadBlob_test.go", + "api_op_TestPayloadStructure.go", + "api_op_TestPayloadStructure_test.go", "api_op_TimestampFormatHeaders.go", "api_op_TimestampFormatHeaders_test.go", "deserializers.go", diff --git a/internal/protocoltest/awsrestjson/serializers.go b/internal/protocoltest/awsrestjson/serializers.go index e7fa243e4b9..11fe02a952e 100644 --- a/internal/protocoltest/awsrestjson/serializers.go +++ b/internal/protocoltest/awsrestjson/serializers.go @@ -127,12 +127,14 @@ func awsRestjson1_serializeOpHttpBindingsAllQueryStringTypesInput(v *AllQueryStr encoder.SetQuery("Long").Long(*v.QueryLong) } - if v.QueryParamsMapOfStrings != nil { - for qkey, qvalue := range v.QueryParamsMapOfStrings { + if v.QueryParamsMapOfStringList != nil { + for qkey, qvalue := range v.QueryParamsMapOfStringList { if encoder.HasQuery(qkey) { continue } - encoder.SetQuery(qkey).String(qvalue) + for i := range qvalue { + encoder.AddQuery(qkey).String(qvalue[i]) + } } } @@ -389,11 +391,11 @@ func (m *awsRestjson1_serializeOpDocumentTypeAsPayload) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.DocumentValue != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.DocumentValue != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentDocument(input.DocumentValue, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -622,6 +624,119 @@ func awsRestjson1_serializeOpHttpBindingsGreetingWithErrorsInput(v *GreetingWith return nil } +type awsRestjson1_serializeOpHostWithPathOperation struct { +} + +func (*awsRestjson1_serializeOpHostWithPathOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpHostWithPathOperation) 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.(*HostWithPathOperationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/HostWithPathOperation") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpHttpBindingsHostWithPathOperationInput(v *HostWithPathOperationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpHttpChecksumRequired struct { +} + +func (*awsRestjson1_serializeOpHttpChecksumRequired) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpHttpChecksumRequired) 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.(*HttpChecksumRequiredInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/HttpChecksumRequired") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentHttpChecksumRequiredInput(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_serializeOpHttpBindingsHttpChecksumRequiredInput(v *HttpChecksumRequiredInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentHttpChecksumRequiredInput(v *HttpChecksumRequiredInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Foo != nil { + ok := object.Key("foo") + ok.String(*v.Foo) + } + + return nil +} + type awsRestjson1_serializeOpHttpEnumPayload struct { } @@ -838,11 +953,11 @@ func (m *awsRestjson1_serializeOpHttpPayloadWithStructure) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if input.Nested != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.Nested != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentNestedPayload(input.Nested, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -851,6 +966,14 @@ func (m *awsRestjson1_serializeOpHttpPayloadWithStructure) HandleSerialize(ctx c if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -2221,14 +2344,14 @@ func awsRestjson1_serializeOpDocumentJsonUnionsInput(v *JsonUnionsInput, value s return nil } -type awsRestjson1_serializeOpMediaTypeHeader struct { +type awsRestjson1_serializeOpMalformedAcceptWithBody struct { } -func (*awsRestjson1_serializeOpMediaTypeHeader) ID() string { +func (*awsRestjson1_serializeOpMalformedAcceptWithBody) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpMediaTypeHeader) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedAcceptWithBody) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2236,25 +2359,21 @@ func (m *awsRestjson1_serializeOpMediaTypeHeader) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*MediaTypeHeaderInput) + input, ok := in.Parameters.(*MalformedAcceptWithBodyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/MediaTypeHeader") + opPath, opQuery := httpbinding.SplitURI("/MalformedAcceptWithBody") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsMediaTypeHeaderInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2262,28 +2381,22 @@ func (m *awsRestjson1_serializeOpMediaTypeHeader) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsMediaTypeHeaderInput(v *MediaTypeHeaderInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedAcceptWithBodyInput(v *MalformedAcceptWithBodyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Json != nil && len(*v.Json) > 0 { - locationName := "X-Json" - encoded := ptr.String(base64.StdEncoding.EncodeToString([]byte(*v.Json))) - encoder.SetHeader(locationName).String(*encoded) - } - return nil } -type awsRestjson1_serializeOpNoInputAndNoOutput struct { +type awsRestjson1_serializeOpMalformedAcceptWithGenericString struct { } -func (*awsRestjson1_serializeOpNoInputAndNoOutput) ID() string { +func (*awsRestjson1_serializeOpMalformedAcceptWithGenericString) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpNoInputAndNoOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedAcceptWithGenericString) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2291,13 +2404,13 @@ func (m *awsRestjson1_serializeOpNoInputAndNoOutput) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*NoInputAndNoOutputInput) + input, ok := in.Parameters.(*MalformedAcceptWithGenericStringInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/NoInputAndNoOutput") + opPath, opQuery := httpbinding.SplitURI("/MalformedAcceptWithGenericString") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2306,6 +2419,17 @@ func (m *awsRestjson1_serializeOpNoInputAndNoOutput) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } + if input.Payload != nil { + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + payload := bytes.NewReader(input.Payload) + if request, err = request.SetStream(payload); 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} } @@ -2313,7 +2437,7 @@ func (m *awsRestjson1_serializeOpNoInputAndNoOutput) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsNoInputAndNoOutputInput(v *NoInputAndNoOutputInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedAcceptWithGenericStringInput(v *MalformedAcceptWithGenericStringInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2321,14 +2445,14 @@ func awsRestjson1_serializeOpHttpBindingsNoInputAndNoOutputInput(v *NoInputAndNo return nil } -type awsRestjson1_serializeOpNoInputAndOutput struct { +type awsRestjson1_serializeOpMalformedAcceptWithPayload struct { } -func (*awsRestjson1_serializeOpNoInputAndOutput) ID() string { +func (*awsRestjson1_serializeOpMalformedAcceptWithPayload) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpNoInputAndOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedAcceptWithPayload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2336,13 +2460,13 @@ func (m *awsRestjson1_serializeOpNoInputAndOutput) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*NoInputAndOutputInput) + input, ok := in.Parameters.(*MalformedAcceptWithPayloadInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/NoInputAndOutputOutput") + opPath, opQuery := httpbinding.SplitURI("/MalformedAcceptWithPayload") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2358,7 +2482,7 @@ func (m *awsRestjson1_serializeOpNoInputAndOutput) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsNoInputAndOutputInput(v *NoInputAndOutputInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedAcceptWithPayloadInput(v *MalformedAcceptWithPayloadInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2366,14 +2490,14 @@ func awsRestjson1_serializeOpHttpBindingsNoInputAndOutputInput(v *NoInputAndOutp return nil } -type awsRestjson1_serializeOpNullAndEmptyHeadersClient struct { +type awsRestjson1_serializeOpMalformedBlob struct { } -func (*awsRestjson1_serializeOpNullAndEmptyHeadersClient) ID() string { +func (*awsRestjson1_serializeOpMalformedBlob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpNullAndEmptyHeadersClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedBlob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2381,22 +2505,29 @@ func (m *awsRestjson1_serializeOpNullAndEmptyHeadersClient) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*NullAndEmptyHeadersClientInput) + input, ok := in.Parameters.(*MalformedBlobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/NullAndEmptyHeadersClient") + opPath, opQuery := httpbinding.SplitURI("/MalformedBlob") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersClientInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedBlobInput(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} } @@ -2407,41 +2538,34 @@ func (m *awsRestjson1_serializeOpNullAndEmptyHeadersClient) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersClientInput(v *NullAndEmptyHeadersClientInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedBlobInput(v *MalformedBlobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.A != nil && len(*v.A) > 0 { - locationName := "X-A" - encoder.SetHeader(locationName).String(*v.A) - } + return nil +} - if v.B != nil && len(*v.B) > 0 { - locationName := "X-B" - encoder.SetHeader(locationName).String(*v.B) - } +func awsRestjson1_serializeOpDocumentMalformedBlobInput(v *MalformedBlobInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() - if v.C != nil { - locationName := "X-C" - for i := range v.C { - if len(v.C[i]) > 0 { - encoder.AddHeader(locationName).String(v.C[i]) - } - } + if v.Blob != nil { + ok := object.Key("blob") + ok.Base64EncodeBytes(v.Blob) } return nil } -type awsRestjson1_serializeOpNullAndEmptyHeadersServer struct { +type awsRestjson1_serializeOpMalformedBoolean struct { } -func (*awsRestjson1_serializeOpNullAndEmptyHeadersServer) ID() string { +func (*awsRestjson1_serializeOpMalformedBoolean) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpNullAndEmptyHeadersServer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedBoolean) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2449,22 +2573,33 @@ func (m *awsRestjson1_serializeOpNullAndEmptyHeadersServer) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*NullAndEmptyHeadersServerInput) + input, ok := in.Parameters.(*MalformedBooleanInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/NullAndEmptyHeadersServer") + opPath, opQuery := httpbinding.SplitURI("/MalformedBoolean/{booleanInPath}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersServerInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsMalformedBooleanInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedBooleanInput(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} } @@ -2475,41 +2610,52 @@ func (m *awsRestjson1_serializeOpNullAndEmptyHeadersServer) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersServerInput(v *NullAndEmptyHeadersServerInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedBooleanInput(v *MalformedBooleanInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.A != nil && len(*v.A) > 0 { - locationName := "X-A" - encoder.SetHeader(locationName).String(*v.A) + if v.BooleanInHeader != nil { + locationName := "Booleaninheader" + encoder.SetHeader(locationName).Boolean(*v.BooleanInHeader) } - if v.B != nil && len(*v.B) > 0 { - locationName := "X-B" - encoder.SetHeader(locationName).String(*v.B) + if v.BooleanInPath == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member booleanInPath must not be empty")} } - - if v.C != nil { - locationName := "X-C" - for i := range v.C { - if len(v.C[i]) > 0 { - encoder.AddHeader(locationName).String(v.C[i]) - } + if v.BooleanInPath != nil { + if err := encoder.SetURI("booleanInPath").Boolean(*v.BooleanInPath); err != nil { + return err } } + if v.BooleanInQuery != nil { + encoder.SetQuery("booleanInQuery").Boolean(*v.BooleanInQuery) + } + return nil } -type awsRestjson1_serializeOpOmitsNullSerializesEmptyString struct { +func awsRestjson1_serializeOpDocumentMalformedBooleanInput(v *MalformedBooleanInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BooleanInBody != nil { + ok := object.Key("booleanInBody") + ok.Boolean(*v.BooleanInBody) + } + + return nil } -func (*awsRestjson1_serializeOpOmitsNullSerializesEmptyString) ID() string { +type awsRestjson1_serializeOpMalformedByte struct { +} + +func (*awsRestjson1_serializeOpMalformedByte) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpOmitsNullSerializesEmptyString) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedByte) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2517,22 +2663,33 @@ func (m *awsRestjson1_serializeOpOmitsNullSerializesEmptyString) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*OmitsNullSerializesEmptyStringInput) + input, ok := in.Parameters.(*MalformedByteInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/OmitsNullSerializesEmptyString") + opPath, opQuery := httpbinding.SplitURI("/MalformedByte/{byteInPath}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsOmitsNullSerializesEmptyStringInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsMalformedByteInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedByteInput(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} } @@ -2543,30 +2700,52 @@ func (m *awsRestjson1_serializeOpOmitsNullSerializesEmptyString) HandleSerialize return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsOmitsNullSerializesEmptyStringInput(v *OmitsNullSerializesEmptyStringInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedByteInput(v *MalformedByteInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.EmptyString != nil { - encoder.SetQuery("Empty").String(*v.EmptyString) + if v.ByteInHeader != nil { + locationName := "Byteinheader" + encoder.SetHeader(locationName).Byte(*v.ByteInHeader) } - if v.NullValue != nil { - encoder.SetQuery("Null").String(*v.NullValue) + if v.ByteInPath == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member byteInPath must not be empty")} + } + if v.ByteInPath != nil { + if err := encoder.SetURI("byteInPath").Byte(*v.ByteInPath); err != nil { + return err + } + } + + if v.ByteInQuery != nil { + encoder.SetQuery("byteInQuery").Byte(*v.ByteInQuery) } return nil } -type awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill struct { +func awsRestjson1_serializeOpDocumentMalformedByteInput(v *MalformedByteInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ByteInBody != nil { + ok := object.Key("byteInBody") + ok.Byte(*v.ByteInBody) + } + + return nil } -func (*awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill) ID() string { +type awsRestjson1_serializeOpMalformedContentTypeWithBody struct { +} + +func (*awsRestjson1_serializeOpMalformedContentTypeWithBody) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedContentTypeWithBody) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2574,13 +2753,13 @@ func (m *awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*QueryIdempotencyTokenAutoFillInput) + input, ok := in.Parameters.(*MalformedContentTypeWithBodyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/QueryIdempotencyTokenAutoFill") + opPath, opQuery := httpbinding.SplitURI("/MalformedContentTypeWithBody") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2589,7 +2768,14 @@ func (m *awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsQueryIdempotencyTokenAutoFillInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedContentTypeWithBodyInput(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} } @@ -2600,26 +2786,34 @@ func (m *awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill) HandleSerialize( return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsQueryIdempotencyTokenAutoFillInput(v *QueryIdempotencyTokenAutoFillInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedContentTypeWithBodyInput(v *MalformedContentTypeWithBodyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Token != nil { - encoder.SetQuery("token").String(*v.Token) + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedContentTypeWithBodyInput(v *MalformedContentTypeWithBodyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Hi != nil { + ok := object.Key("hi") + ok.String(*v.Hi) } return nil } -type awsRestjson1_serializeOpQueryParamsAsStringListMap struct { +type awsRestjson1_serializeOpMalformedContentTypeWithGenericString struct { } -func (*awsRestjson1_serializeOpQueryParamsAsStringListMap) ID() string { +func (*awsRestjson1_serializeOpMalformedContentTypeWithGenericString) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpQueryParamsAsStringListMap) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedContentTypeWithGenericString) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2627,13 +2821,13 @@ func (m *awsRestjson1_serializeOpQueryParamsAsStringListMap) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*QueryParamsAsStringListMapInput) + input, ok := in.Parameters.(*MalformedContentTypeWithGenericStringInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/StringListMap") + opPath, opQuery := httpbinding.SplitURI("/MalformedContentTypeWithGenericString") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2642,7 +2836,59 @@ func (m *awsRestjson1_serializeOpQueryParamsAsStringListMap) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsQueryParamsAsStringListMapInput(input, restEncoder); err != nil { + if input.Payload != nil { + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("text/plain") + } + + payload := strings.NewReader(*input.Payload) + if request, err = request.SetStream(payload); 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_serializeOpHttpBindingsMalformedContentTypeWithGenericStringInput(v *MalformedContentTypeWithGenericStringInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedContentTypeWithoutBody struct { +} + +func (*awsRestjson1_serializeOpMalformedContentTypeWithoutBody) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedContentTypeWithoutBody) 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.(*MalformedContentTypeWithoutBodyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedContentTypeWithoutBody") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2653,37 +2899,78 @@ func (m *awsRestjson1_serializeOpQueryParamsAsStringListMap) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsQueryParamsAsStringListMapInput(v *QueryParamsAsStringListMapInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedContentTypeWithoutBodyInput(v *MalformedContentTypeWithoutBodyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Foo != nil { - for qkey, qvalue := range v.Foo { - if encoder.HasQuery(qkey) { - continue - } - for i := range qvalue { - encoder.AddQuery(qkey).String(qvalue[i]) - } + return nil +} + +type awsRestjson1_serializeOpMalformedContentTypeWithPayload struct { +} + +func (*awsRestjson1_serializeOpMalformedContentTypeWithPayload) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedContentTypeWithPayload) 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.(*MalformedContentTypeWithPayloadInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedContentTypeWithPayload") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.Payload != nil { + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("image/jpeg") + } + + payload := bytes.NewReader(input.Payload) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} } } - if v.Qux != nil { - encoder.SetQuery("corge").String(*v.Qux) + 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_serializeOpHttpBindingsMalformedContentTypeWithPayloadInput(v *MalformedContentTypeWithPayloadInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } -type awsRestjson1_serializeOpQueryPrecedence struct { +type awsRestjson1_serializeOpMalformedDouble struct { } -func (*awsRestjson1_serializeOpQueryPrecedence) ID() string { +func (*awsRestjson1_serializeOpMalformedDouble) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpQueryPrecedence) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpMalformedDouble) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2691,13 +2978,13 @@ func (m *awsRestjson1_serializeOpQueryPrecedence) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*QueryPrecedenceInput) + input, ok := in.Parameters.(*MalformedDoubleInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/Precedence") + opPath, opQuery := httpbinding.SplitURI("/MalformedDouble/{doubleInPath}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2706,7 +2993,18 @@ func (m *awsRestjson1_serializeOpQueryPrecedence) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsQueryPrecedenceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsMalformedDoubleInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedDoubleInput(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} } @@ -2717,35 +3015,2418 @@ func (m *awsRestjson1_serializeOpQueryPrecedence) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsQueryPrecedenceInput(v *QueryPrecedenceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsMalformedDoubleInput(v *MalformedDoubleInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Baz != nil { - for qkey, qvalue := range v.Baz { - if encoder.HasQuery(qkey) { - continue - } - encoder.SetQuery(qkey).String(qvalue) + if v.DoubleInHeader != nil { + locationName := "Doubleinheader" + encoder.SetHeader(locationName).Double(*v.DoubleInHeader) + } + + if v.DoubleInPath == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member doubleInPath must not be empty")} + } + if v.DoubleInPath != nil { + if err := encoder.SetURI("doubleInPath").Double(*v.DoubleInPath); err != nil { + return err } } - if v.Foo != nil { - encoder.SetQuery("bar").String(*v.Foo) + if v.DoubleInQuery != nil { + encoder.SetQuery("doubleInQuery").Double(*v.DoubleInQuery) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedDoubleInput(v *MalformedDoubleInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DoubleInBody != nil { + ok := object.Key("doubleInBody") + switch { + case math.IsNaN(*v.DoubleInBody): + ok.String("NaN") + + case math.IsInf(*v.DoubleInBody, 1): + ok.String("Infinity") + + case math.IsInf(*v.DoubleInBody, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.DoubleInBody) + + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedFloat struct { +} + +func (*awsRestjson1_serializeOpMalformedFloat) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedFloat) 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.(*MalformedFloatInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedFloat/{floatInPath}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedFloatInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedFloatInput(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_serializeOpHttpBindingsMalformedFloatInput(v *MalformedFloatInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FloatInHeader != nil { + locationName := "Floatinheader" + encoder.SetHeader(locationName).Float(*v.FloatInHeader) + } + + if v.FloatInPath == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member floatInPath must not be empty")} + } + if v.FloatInPath != nil { + if err := encoder.SetURI("floatInPath").Float(*v.FloatInPath); err != nil { + return err + } + } + + if v.FloatInQuery != nil { + encoder.SetQuery("floatInQuery").Float(*v.FloatInQuery) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedFloatInput(v *MalformedFloatInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FloatInBody != nil { + ok := object.Key("floatInBody") + switch { + case math.IsNaN(float64(*v.FloatInBody)): + ok.String("NaN") + + case math.IsInf(float64(*v.FloatInBody), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.FloatInBody), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.FloatInBody) + + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedInteger struct { +} + +func (*awsRestjson1_serializeOpMalformedInteger) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedInteger) 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.(*MalformedIntegerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedInteger/{integerInPath}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedIntegerInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedIntegerInput(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_serializeOpHttpBindingsMalformedIntegerInput(v *MalformedIntegerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.IntegerInHeader != nil { + locationName := "Integerinheader" + encoder.SetHeader(locationName).Integer(*v.IntegerInHeader) + } + + if v.IntegerInPath == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member integerInPath must not be empty")} + } + if v.IntegerInPath != nil { + if err := encoder.SetURI("integerInPath").Integer(*v.IntegerInPath); err != nil { + return err + } + } + + if v.IntegerInQuery != nil { + encoder.SetQuery("integerInQuery").Integer(*v.IntegerInQuery) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedIntegerInput(v *MalformedIntegerInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IntegerInBody != nil { + ok := object.Key("integerInBody") + ok.Integer(*v.IntegerInBody) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedList struct { +} + +func (*awsRestjson1_serializeOpMalformedList) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedList) 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.(*MalformedListInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedList") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedListInput(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_serializeOpHttpBindingsMalformedListInput(v *MalformedListInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedListInput(v *MalformedListInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BodyList != nil { + ok := object.Key("bodyList") + if err := awsRestjson1_serializeDocumentSimpleList(v.BodyList, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedLong struct { +} + +func (*awsRestjson1_serializeOpMalformedLong) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedLong) 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.(*MalformedLongInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedLong/{longInPath}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedLongInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedLongInput(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_serializeOpHttpBindingsMalformedLongInput(v *MalformedLongInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.LongInHeader != nil { + locationName := "Longinheader" + encoder.SetHeader(locationName).Long(*v.LongInHeader) + } + + if v.LongInPath == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member longInPath must not be empty")} + } + if v.LongInPath != nil { + if err := encoder.SetURI("longInPath").Long(*v.LongInPath); err != nil { + return err + } + } + + if v.LongInQuery != nil { + encoder.SetQuery("longInQuery").Long(*v.LongInQuery) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedLongInput(v *MalformedLongInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LongInBody != nil { + ok := object.Key("longInBody") + ok.Long(*v.LongInBody) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedMap struct { +} + +func (*awsRestjson1_serializeOpMalformedMap) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedMap) 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.(*MalformedMapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedMap") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedMapInput(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_serializeOpHttpBindingsMalformedMapInput(v *MalformedMapInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedMapInput(v *MalformedMapInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BodyMap != nil { + ok := object.Key("bodyMap") + if err := awsRestjson1_serializeDocumentSimpleMap(v.BodyMap, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedRequestBody struct { +} + +func (*awsRestjson1_serializeOpMalformedRequestBody) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedRequestBody) 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.(*MalformedRequestBodyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedRequestBody") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedRequestBodyInput(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_serializeOpHttpBindingsMalformedRequestBodyInput(v *MalformedRequestBodyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedRequestBodyInput(v *MalformedRequestBodyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Float != nil { + ok := object.Key("float") + switch { + case math.IsNaN(float64(*v.Float)): + ok.String("NaN") + + case math.IsInf(float64(*v.Float), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.Float), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.Float) + + } + } + + if v.Int != nil { + ok := object.Key("int") + ok.Integer(*v.Int) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedSet struct { +} + +func (*awsRestjson1_serializeOpMalformedSet) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedSet) 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.(*MalformedSetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedSet") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedSetInput(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_serializeOpHttpBindingsMalformedSetInput(v *MalformedSetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedSetInput(v *MalformedSetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Set != nil { + ok := object.Key("set") + if err := awsRestjson1_serializeDocumentSimpleSet(v.Set, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedShort struct { +} + +func (*awsRestjson1_serializeOpMalformedShort) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedShort) 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.(*MalformedShortInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedShort/{shortInPath}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedShortInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedShortInput(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_serializeOpHttpBindingsMalformedShortInput(v *MalformedShortInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ShortInHeader != nil { + locationName := "Shortinheader" + encoder.SetHeader(locationName).Short(*v.ShortInHeader) + } + + if v.ShortInPath == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member shortInPath must not be empty")} + } + if v.ShortInPath != nil { + if err := encoder.SetURI("shortInPath").Short(*v.ShortInPath); err != nil { + return err + } + } + + if v.ShortInQuery != nil { + encoder.SetQuery("shortInQuery").Short(*v.ShortInQuery) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedShortInput(v *MalformedShortInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ShortInBody != nil { + ok := object.Key("shortInBody") + ok.Short(*v.ShortInBody) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedString struct { +} + +func (*awsRestjson1_serializeOpMalformedString) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedString) 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.(*MalformedStringInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedString") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedStringInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedStringInput(v *MalformedStringInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Blob != nil && len(*v.Blob) > 0 { + locationName := "Amz-Media-Typed-Header" + encoded := ptr.String(base64.StdEncoding.EncodeToString([]byte(*v.Blob))) + encoder.SetHeader(locationName).String(*encoded) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampBodyDateTime struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampBodyDateTime) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampBodyDateTime) 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.(*MalformedTimestampBodyDateTimeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampBodyDateTime") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedTimestampBodyDateTimeInput(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_serializeOpHttpBindingsMalformedTimestampBodyDateTimeInput(v *MalformedTimestampBodyDateTimeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedTimestampBodyDateTimeInput(v *MalformedTimestampBodyDateTimeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Timestamp != nil { + ok := object.Key("timestamp") + ok.String(smithytime.FormatDateTime(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampBodyDefault struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampBodyDefault) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampBodyDefault) 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.(*MalformedTimestampBodyDefaultInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampBodyDefault") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedTimestampBodyDefaultInput(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_serializeOpHttpBindingsMalformedTimestampBodyDefaultInput(v *MalformedTimestampBodyDefaultInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedTimestampBodyDefaultInput(v *MalformedTimestampBodyDefaultInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Timestamp != nil { + ok := object.Key("timestamp") + ok.Double(smithytime.FormatEpochSeconds(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampBodyHttpDate struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampBodyHttpDate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampBodyHttpDate) 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.(*MalformedTimestampBodyHttpDateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampBodyHttpDate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedTimestampBodyHttpDateInput(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_serializeOpHttpBindingsMalformedTimestampBodyHttpDateInput(v *MalformedTimestampBodyHttpDateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedTimestampBodyHttpDateInput(v *MalformedTimestampBodyHttpDateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Timestamp != nil { + ok := object.Key("timestamp") + ok.String(smithytime.FormatHTTPDate(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampHeaderDateTime struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampHeaderDateTime) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampHeaderDateTime) 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.(*MalformedTimestampHeaderDateTimeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampHeaderDateTime") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampHeaderDateTimeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampHeaderDateTimeInput(v *MalformedTimestampHeaderDateTimeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp != nil { + locationName := "Timestamp" + encoder.SetHeader(locationName).String(smithytime.FormatDateTime(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampHeaderDefault struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampHeaderDefault) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampHeaderDefault) 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.(*MalformedTimestampHeaderDefaultInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampHeaderDefault") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampHeaderDefaultInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampHeaderDefaultInput(v *MalformedTimestampHeaderDefaultInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp != nil { + locationName := "Timestamp" + encoder.SetHeader(locationName).String(smithytime.FormatHTTPDate(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampHeaderEpoch struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampHeaderEpoch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampHeaderEpoch) 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.(*MalformedTimestampHeaderEpochInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampHeaderEpoch") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampHeaderEpochInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampHeaderEpochInput(v *MalformedTimestampHeaderEpochInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp != nil { + locationName := "Timestamp" + encoder.SetHeader(locationName).Double(smithytime.FormatEpochSeconds(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampPathDefault struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampPathDefault) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampPathDefault) 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.(*MalformedTimestampPathDefaultInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampPathDefault/{timestamp}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampPathDefaultInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampPathDefaultInput(v *MalformedTimestampPathDefaultInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member timestamp must not be empty")} + } + if v.Timestamp != nil { + if err := encoder.SetURI("timestamp").String(smithytime.FormatDateTime(*v.Timestamp)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampPathEpoch struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampPathEpoch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampPathEpoch) 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.(*MalformedTimestampPathEpochInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampPathEpoch/{timestamp}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampPathEpochInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampPathEpochInput(v *MalformedTimestampPathEpochInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member timestamp must not be empty")} + } + if v.Timestamp != nil { + if err := encoder.SetURI("timestamp").Double(smithytime.FormatEpochSeconds(*v.Timestamp)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampPathHttpDate struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampPathHttpDate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampPathHttpDate) 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.(*MalformedTimestampPathHttpDateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampPathHttpDate/{timestamp}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampPathHttpDateInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampPathHttpDateInput(v *MalformedTimestampPathHttpDateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp == nil { + return &smithy.SerializationError{Err: fmt.Errorf("input member timestamp must not be empty")} + } + if v.Timestamp != nil { + if err := encoder.SetURI("timestamp").String(smithytime.FormatHTTPDate(*v.Timestamp)); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampQueryDefault struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampQueryDefault) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampQueryDefault) 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.(*MalformedTimestampQueryDefaultInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampQueryDefault") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampQueryDefaultInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampQueryDefaultInput(v *MalformedTimestampQueryDefaultInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp != nil { + encoder.SetQuery("timestamp").String(smithytime.FormatDateTime(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampQueryEpoch struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampQueryEpoch) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampQueryEpoch) 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.(*MalformedTimestampQueryEpochInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampQueryEpoch") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampQueryEpochInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampQueryEpochInput(v *MalformedTimestampQueryEpochInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp != nil { + encoder.SetQuery("timestamp").Double(smithytime.FormatEpochSeconds(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedTimestampQueryHttpDate struct { +} + +func (*awsRestjson1_serializeOpMalformedTimestampQueryHttpDate) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedTimestampQueryHttpDate) 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.(*MalformedTimestampQueryHttpDateInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedTimestampQueryHttpDate") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMalformedTimestampQueryHttpDateInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMalformedTimestampQueryHttpDateInput(v *MalformedTimestampQueryHttpDateInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Timestamp != nil { + encoder.SetQuery("timestamp").String(smithytime.FormatHTTPDate(*v.Timestamp)) + } + + return nil +} + +type awsRestjson1_serializeOpMalformedUnion struct { +} + +func (*awsRestjson1_serializeOpMalformedUnion) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMalformedUnion) 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.(*MalformedUnionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MalformedUnion") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentMalformedUnionInput(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_serializeOpHttpBindingsMalformedUnionInput(v *MalformedUnionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentMalformedUnionInput(v *MalformedUnionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Union != nil { + ok := object.Key("union") + if err := awsRestjson1_serializeDocumentSimpleUnion(v.Union, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpMediaTypeHeader struct { +} + +func (*awsRestjson1_serializeOpMediaTypeHeader) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpMediaTypeHeader) 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.(*MediaTypeHeaderInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/MediaTypeHeader") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsMediaTypeHeaderInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsMediaTypeHeaderInput(v *MediaTypeHeaderInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Json != nil && len(*v.Json) > 0 { + locationName := "X-Json" + encoded := ptr.String(base64.StdEncoding.EncodeToString([]byte(*v.Json))) + encoder.SetHeader(locationName).String(*encoded) + } + + return nil +} + +type awsRestjson1_serializeOpNoInputAndNoOutput struct { +} + +func (*awsRestjson1_serializeOpNoInputAndNoOutput) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpNoInputAndNoOutput) 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.(*NoInputAndNoOutputInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/NoInputAndNoOutput") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + 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_serializeOpHttpBindingsNoInputAndNoOutputInput(v *NoInputAndNoOutputInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpNoInputAndOutput struct { +} + +func (*awsRestjson1_serializeOpNoInputAndOutput) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpNoInputAndOutput) 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.(*NoInputAndOutputInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/NoInputAndOutputOutput") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + 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_serializeOpHttpBindingsNoInputAndOutputInput(v *NoInputAndOutputInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +type awsRestjson1_serializeOpNullAndEmptyHeadersClient struct { +} + +func (*awsRestjson1_serializeOpNullAndEmptyHeadersClient) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpNullAndEmptyHeadersClient) 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.(*NullAndEmptyHeadersClientInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/NullAndEmptyHeadersClient") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersClientInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersClientInput(v *NullAndEmptyHeadersClientInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.A != nil && len(*v.A) > 0 { + locationName := "X-A" + encoder.SetHeader(locationName).String(*v.A) + } + + if v.B != nil && len(*v.B) > 0 { + locationName := "X-B" + encoder.SetHeader(locationName).String(*v.B) + } + + if v.C != nil { + locationName := "X-C" + for i := range v.C { + if len(v.C[i]) > 0 { + encoder.AddHeader(locationName).String(v.C[i]) + } + } + } + + return nil +} + +type awsRestjson1_serializeOpNullAndEmptyHeadersServer struct { +} + +func (*awsRestjson1_serializeOpNullAndEmptyHeadersServer) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpNullAndEmptyHeadersServer) 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.(*NullAndEmptyHeadersServerInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/NullAndEmptyHeadersServer") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersServerInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsNullAndEmptyHeadersServerInput(v *NullAndEmptyHeadersServerInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.A != nil && len(*v.A) > 0 { + locationName := "X-A" + encoder.SetHeader(locationName).String(*v.A) + } + + if v.B != nil && len(*v.B) > 0 { + locationName := "X-B" + encoder.SetHeader(locationName).String(*v.B) + } + + if v.C != nil { + locationName := "X-C" + for i := range v.C { + if len(v.C[i]) > 0 { + encoder.AddHeader(locationName).String(v.C[i]) + } + } + } + + return nil +} + +type awsRestjson1_serializeOpOmitsNullSerializesEmptyString struct { +} + +func (*awsRestjson1_serializeOpOmitsNullSerializesEmptyString) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpOmitsNullSerializesEmptyString) 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.(*OmitsNullSerializesEmptyStringInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/OmitsNullSerializesEmptyString") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsOmitsNullSerializesEmptyStringInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsOmitsNullSerializesEmptyStringInput(v *OmitsNullSerializesEmptyStringInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.EmptyString != nil { + encoder.SetQuery("Empty").String(*v.EmptyString) + } + + if v.NullValue != nil { + encoder.SetQuery("Null").String(*v.NullValue) + } + + return nil +} + +type awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill struct { +} + +func (*awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpQueryIdempotencyTokenAutoFill) 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.(*QueryIdempotencyTokenAutoFillInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/QueryIdempotencyTokenAutoFill") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsQueryIdempotencyTokenAutoFillInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsQueryIdempotencyTokenAutoFillInput(v *QueryIdempotencyTokenAutoFillInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Token != nil { + encoder.SetQuery("token").String(*v.Token) + } + + return nil +} + +type awsRestjson1_serializeOpQueryParamsAsStringListMap struct { +} + +func (*awsRestjson1_serializeOpQueryParamsAsStringListMap) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpQueryParamsAsStringListMap) 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.(*QueryParamsAsStringListMapInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/StringListMap") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsQueryParamsAsStringListMapInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsQueryParamsAsStringListMapInput(v *QueryParamsAsStringListMapInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Foo != nil { + for qkey, qvalue := range v.Foo { + if encoder.HasQuery(qkey) { + continue + } + for i := range qvalue { + encoder.AddQuery(qkey).String(qvalue[i]) + } + } + } + + if v.Qux != nil { + encoder.SetQuery("corge").String(*v.Qux) + } + + return nil +} + +type awsRestjson1_serializeOpQueryPrecedence struct { +} + +func (*awsRestjson1_serializeOpQueryPrecedence) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpQueryPrecedence) 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.(*QueryPrecedenceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/Precedence") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsQueryPrecedenceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsQueryPrecedenceInput(v *QueryPrecedenceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Baz != nil { + for qkey, qvalue := range v.Baz { + if encoder.HasQuery(qkey) { + continue + } + encoder.SetQuery(qkey).String(qvalue) + } + } + + if v.Foo != nil { + encoder.SetQuery("bar").String(*v.Foo) + } + + return nil +} + +type awsRestjson1_serializeOpRecursiveShapes struct { +} + +func (*awsRestjson1_serializeOpRecursiveShapes) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRecursiveShapes) 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.(*RecursiveShapesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/RecursiveShapes") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRecursiveShapesInput(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_serializeOpHttpBindingsRecursiveShapesInput(v *RecursiveShapesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentRecursiveShapesInput(v *RecursiveShapesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Nested != nil { + ok := object.Key("nested") + if err := awsRestjson1_serializeDocumentRecursiveShapesInputOutputNested1(v.Nested, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpSimpleScalarProperties struct { +} + +func (*awsRestjson1_serializeOpSimpleScalarProperties) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpSimpleScalarProperties) 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.(*SimpleScalarPropertiesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/SimpleScalarProperties") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsSimpleScalarPropertiesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentSimpleScalarPropertiesInput(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_serializeOpHttpBindingsSimpleScalarPropertiesInput(v *SimpleScalarPropertiesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Foo != nil && len(*v.Foo) > 0 { + locationName := "X-Foo" + encoder.SetHeader(locationName).String(*v.Foo) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentSimpleScalarPropertiesInput(v *SimpleScalarPropertiesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ByteValue != nil { + ok := object.Key("byteValue") + ok.Byte(*v.ByteValue) + } + + if v.DoubleValue != nil { + ok := object.Key("DoubleDribble") + switch { + case math.IsNaN(*v.DoubleValue): + ok.String("NaN") + + case math.IsInf(*v.DoubleValue, 1): + ok.String("Infinity") + + case math.IsInf(*v.DoubleValue, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.DoubleValue) + + } + } + + if v.FalseBooleanValue != nil { + ok := object.Key("falseBooleanValue") + ok.Boolean(*v.FalseBooleanValue) + } + + if v.FloatValue != nil { + ok := object.Key("floatValue") + switch { + case math.IsNaN(float64(*v.FloatValue)): + ok.String("NaN") + + case math.IsInf(float64(*v.FloatValue), 1): + ok.String("Infinity") + + case math.IsInf(float64(*v.FloatValue), -1): + ok.String("-Infinity") + + default: + ok.Float(*v.FloatValue) + + } + } + + if v.IntegerValue != nil { + ok := object.Key("integerValue") + ok.Integer(*v.IntegerValue) + } + + if v.LongValue != nil { + ok := object.Key("longValue") + ok.Long(*v.LongValue) + } + + if v.ShortValue != nil { + ok := object.Key("shortValue") + ok.Short(*v.ShortValue) + } + + if v.StringValue != nil { + ok := object.Key("stringValue") + ok.String(*v.StringValue) + } + + if v.TrueBooleanValue != nil { + ok := object.Key("trueBooleanValue") + ok.Boolean(*v.TrueBooleanValue) + } + + return nil +} + +type awsRestjson1_serializeOpStreamingTraits struct { +} + +func (*awsRestjson1_serializeOpStreamingTraits) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStreamingTraits) 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.(*StreamingTraitsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/StreamingTraits") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStreamingTraitsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.Blob != nil { + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + payload := input.Blob + if request, err = request.SetStream(payload); 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_serializeOpHttpBindingsStreamingTraitsInput(v *StreamingTraitsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Foo != nil && len(*v.Foo) > 0 { + locationName := "X-Foo" + encoder.SetHeader(locationName).String(*v.Foo) + } + + return nil +} + +type awsRestjson1_serializeOpStreamingTraitsRequireLength struct { +} + +func (*awsRestjson1_serializeOpStreamingTraitsRequireLength) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStreamingTraitsRequireLength) 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.(*StreamingTraitsRequireLengthInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/StreamingTraitsRequireLength") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStreamingTraitsRequireLengthInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if input.Blob != nil { + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/octet-stream") + } + + payload := input.Blob + if request, err = request.SetStream(payload); 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_serializeOpHttpBindingsStreamingTraitsRequireLengthInput(v *StreamingTraitsRequireLengthInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Foo != nil && len(*v.Foo) > 0 { + locationName := "X-Foo" + encoder.SetHeader(locationName).String(*v.Foo) } return nil } -type awsRestjson1_serializeOpRecursiveShapes struct { +type awsRestjson1_serializeOpStreamingTraitsWithMediaType struct { } -func (*awsRestjson1_serializeOpRecursiveShapes) ID() string { +func (*awsRestjson1_serializeOpStreamingTraitsWithMediaType) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRecursiveShapes) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStreamingTraitsWithMediaType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2753,30 +5434,34 @@ func (m *awsRestjson1_serializeOpRecursiveShapes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RecursiveShapesInput) + input, ok := in.Parameters.(*StreamingTraitsWithMediaTypeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/RecursiveShapes") + opPath, opQuery := httpbinding.SplitURI("/StreamingTraitsWithMediaType") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRecursiveShapesInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStreamingTraitsWithMediaTypeInput(input, restEncoder); 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 input.Blob != nil { + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("text/plain") + } + + payload := input.Blob + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -2786,36 +5471,27 @@ func (m *awsRestjson1_serializeOpRecursiveShapes) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRecursiveShapesInput(v *RecursiveShapesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStreamingTraitsWithMediaTypeInput(v *StreamingTraitsWithMediaTypeInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentRecursiveShapesInput(v *RecursiveShapesInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Nested != nil { - ok := object.Key("nested") - if err := awsRestjson1_serializeDocumentRecursiveShapesInputOutputNested1(v.Nested, ok); err != nil { - return err - } + if v.Foo != nil && len(*v.Foo) > 0 { + locationName := "X-Foo" + encoder.SetHeader(locationName).String(*v.Foo) } return nil } -type awsRestjson1_serializeOpSimpleScalarProperties struct { +type awsRestjson1_serializeOpTestBodyStructure struct { } -func (*awsRestjson1_serializeOpSimpleScalarProperties) ID() string { +func (*awsRestjson1_serializeOpTestBodyStructure) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpSimpleScalarProperties) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpTestBodyStructure) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2823,29 +5499,29 @@ func (m *awsRestjson1_serializeOpSimpleScalarProperties) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*SimpleScalarPropertiesInput) + input, ok := in.Parameters.(*TestBodyStructureInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/SimpleScalarProperties") + opPath, opQuery := httpbinding.SplitURI("/body") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsSimpleScalarPropertiesInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsTestBodyStructureInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSimpleScalarPropertiesInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentTestBodyStructureInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2860,105 +5536,41 @@ func (m *awsRestjson1_serializeOpSimpleScalarProperties) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsSimpleScalarPropertiesInput(v *SimpleScalarPropertiesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsTestBodyStructureInput(v *TestBodyStructureInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Foo != nil && len(*v.Foo) > 0 { - locationName := "X-Foo" - encoder.SetHeader(locationName).String(*v.Foo) + if v.TestId != nil && len(*v.TestId) > 0 { + locationName := "X-Amz-Test-Id" + encoder.SetHeader(locationName).String(*v.TestId) } return nil } -func awsRestjson1_serializeOpDocumentSimpleScalarPropertiesInput(v *SimpleScalarPropertiesInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentTestBodyStructureInput(v *TestBodyStructureInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ByteValue != nil { - ok := object.Key("byteValue") - ok.Byte(*v.ByteValue) - } - - if v.DoubleValue != nil { - ok := object.Key("DoubleDribble") - switch { - case math.IsNaN(*v.DoubleValue): - ok.String("NaN") - - case math.IsInf(*v.DoubleValue, 1): - ok.String("Infinity") - - case math.IsInf(*v.DoubleValue, -1): - ok.String("-Infinity") - - default: - ok.Double(*v.DoubleValue) - - } - } - - if v.FalseBooleanValue != nil { - ok := object.Key("falseBooleanValue") - ok.Boolean(*v.FalseBooleanValue) - } - - if v.FloatValue != nil { - ok := object.Key("floatValue") - switch { - case math.IsNaN(float64(*v.FloatValue)): - ok.String("NaN") - - case math.IsInf(float64(*v.FloatValue), 1): - ok.String("Infinity") - - case math.IsInf(float64(*v.FloatValue), -1): - ok.String("-Infinity") - - default: - ok.Float(*v.FloatValue) - + if v.TestConfig != nil { + ok := object.Key("testConfig") + if err := awsRestjson1_serializeDocumentTestConfig(v.TestConfig, ok); err != nil { + return err } } - if v.IntegerValue != nil { - ok := object.Key("integerValue") - ok.Integer(*v.IntegerValue) - } - - if v.LongValue != nil { - ok := object.Key("longValue") - ok.Long(*v.LongValue) - } - - if v.ShortValue != nil { - ok := object.Key("shortValue") - ok.Short(*v.ShortValue) - } - - if v.StringValue != nil { - ok := object.Key("stringValue") - ok.String(*v.StringValue) - } - - if v.TrueBooleanValue != nil { - ok := object.Key("trueBooleanValue") - ok.Boolean(*v.TrueBooleanValue) - } - return nil } -type awsRestjson1_serializeOpStreamingTraits struct { +type awsRestjson1_serializeOpTestNoPayload struct { } -func (*awsRestjson1_serializeOpStreamingTraits) ID() string { +func (*awsRestjson1_serializeOpTestNoPayload) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStreamingTraits) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpTestNoPayload) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -2966,36 +5578,25 @@ func (m *awsRestjson1_serializeOpStreamingTraits) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StreamingTraitsInput) + input, ok := in.Parameters.(*TestNoPayloadInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/StreamingTraits") + opPath, opQuery := httpbinding.SplitURI("/no_payload") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStreamingTraitsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsTestNoPayloadInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if input.Blob != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/octet-stream") - } - - payload := input.Blob - if request, err = request.SetStream(payload); 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} } @@ -3003,27 +5604,27 @@ func (m *awsRestjson1_serializeOpStreamingTraits) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStreamingTraitsInput(v *StreamingTraitsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsTestNoPayloadInput(v *TestNoPayloadInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Foo != nil && len(*v.Foo) > 0 { - locationName := "X-Foo" - encoder.SetHeader(locationName).String(*v.Foo) + if v.TestId != nil && len(*v.TestId) > 0 { + locationName := "X-Amz-Test-Id" + encoder.SetHeader(locationName).String(*v.TestId) } return nil } -type awsRestjson1_serializeOpStreamingTraitsRequireLength struct { +type awsRestjson1_serializeOpTestPayloadBlob struct { } -func (*awsRestjson1_serializeOpStreamingTraitsRequireLength) ID() string { +func (*awsRestjson1_serializeOpTestPayloadBlob) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStreamingTraitsRequireLength) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpTestPayloadBlob) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3031,13 +5632,13 @@ func (m *awsRestjson1_serializeOpStreamingTraitsRequireLength) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StreamingTraitsRequireLengthInput) + input, ok := in.Parameters.(*TestPayloadBlobInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/StreamingTraitsRequireLength") + opPath, opQuery := httpbinding.SplitURI("/blob_payload") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3046,16 +5647,16 @@ func (m *awsRestjson1_serializeOpStreamingTraitsRequireLength) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStreamingTraitsRequireLengthInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsTestPayloadBlobInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if input.Blob != nil { + if input.Data != nil { if !restEncoder.HasHeader("Content-Type") { restEncoder.SetHeader("Content-Type").String("application/octet-stream") } - payload := input.Blob + payload := bytes.NewReader(input.Data) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3068,27 +5669,27 @@ func (m *awsRestjson1_serializeOpStreamingTraitsRequireLength) HandleSerialize(c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStreamingTraitsRequireLengthInput(v *StreamingTraitsRequireLengthInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsTestPayloadBlobInput(v *TestPayloadBlobInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Foo != nil && len(*v.Foo) > 0 { - locationName := "X-Foo" - encoder.SetHeader(locationName).String(*v.Foo) + if v.ContentType != nil && len(*v.ContentType) > 0 { + locationName := "Content-Type" + encoder.SetHeader(locationName).String(*v.ContentType) } return nil } -type awsRestjson1_serializeOpStreamingTraitsWithMediaType struct { +type awsRestjson1_serializeOpTestPayloadStructure struct { } -func (*awsRestjson1_serializeOpStreamingTraitsWithMediaType) ID() string { +func (*awsRestjson1_serializeOpTestPayloadStructure) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStreamingTraitsWithMediaType) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpTestPayloadStructure) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -3096,13 +5697,13 @@ func (m *awsRestjson1_serializeOpStreamingTraitsWithMediaType) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StreamingTraitsWithMediaTypeInput) + input, ok := in.Parameters.(*TestPayloadStructureInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/StreamingTraitsWithMediaType") + opPath, opQuery := httpbinding.SplitURI("/payload") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3111,19 +5712,31 @@ func (m *awsRestjson1_serializeOpStreamingTraitsWithMediaType) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStreamingTraitsWithMediaTypeInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsTestPayloadStructureInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if input.Blob != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("text/plain") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } - payload := input.Blob + if input.PayloadConfig != nil { + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeDocumentPayloadConfig(input.PayloadConfig, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -3133,14 +5746,14 @@ func (m *awsRestjson1_serializeOpStreamingTraitsWithMediaType) HandleSerialize(c return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStreamingTraitsWithMediaTypeInput(v *StreamingTraitsWithMediaTypeInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsTestPayloadStructureInput(v *TestPayloadStructureInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.Foo != nil && len(*v.Foo) > 0 { - locationName := "X-Foo" - encoder.SetHeader(locationName).String(*v.Foo) + if v.TestId != nil && len(*v.TestId) > 0 { + locationName := "X-Amz-Test-Id" + encoder.SetHeader(locationName).String(*v.TestId) } return nil @@ -3385,6 +5998,18 @@ func awsRestjson1_serializeDocumentNestedPayload(v *types.NestedPayload, value s return nil } +func awsRestjson1_serializeDocumentPayloadConfig(v *types.PayloadConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Data != nil { + ok := object.Key("data") + ok.Integer(*v.Data) + } + + return nil +} + func awsRestjson1_serializeDocumentRecursiveShapesInputOutputNested1(v *types.RecursiveShapesInputOutputNested1, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3423,6 +6048,59 @@ func awsRestjson1_serializeDocumentRecursiveShapesInputOutputNested2(v *types.Re return nil } +func awsRestjson1_serializeDocumentSimpleList(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_serializeDocumentSimpleMap(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_serializeDocumentSimpleSet(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_serializeDocumentSimpleUnion(v types.SimpleUnion, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.SimpleUnionMemberInt: + av := object.Key("int") + av.Integer(uv.Value) + + case *types.SimpleUnionMemberString: + av := object.Key("string") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentSparseBooleanMap(v map[string]*bool, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3517,6 +6195,18 @@ func awsRestjson1_serializeDocumentStructureListMember(v *types.StructureListMem return nil } +func awsRestjson1_serializeDocumentTestConfig(v *types.TestConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Timeout != nil { + ok := object.Key("timeout") + ok.Integer(*v.Timeout) + } + + return nil +} + func awsRestjson1_serializeDocumentRenamedGreeting(v *types.RenamedGreeting, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/internal/protocoltest/awsrestjson/types/types.go b/internal/protocoltest/awsrestjson/types/types.go index 7d5ebc87c17..64ea83abbd2 100644 --- a/internal/protocoltest/awsrestjson/types/types.go +++ b/internal/protocoltest/awsrestjson/types/types.go @@ -118,6 +118,12 @@ type NestedPayload struct { noSmithyDocumentSerde } +type PayloadConfig struct { + Data *int32 + + noSmithyDocumentSerde +} + type RecursiveShapesInputOutputNested1 struct { Foo *string @@ -134,6 +140,29 @@ type RecursiveShapesInputOutputNested2 struct { noSmithyDocumentSerde } +// The following types satisfy this interface: +// SimpleUnionMemberInt +// SimpleUnionMemberString +type SimpleUnion interface { + isSimpleUnion() +} + +type SimpleUnionMemberInt struct { + Value int32 + + noSmithyDocumentSerde +} + +func (*SimpleUnionMemberInt) isSimpleUnion() {} + +type SimpleUnionMemberString struct { + Value string + + noSmithyDocumentSerde +} + +func (*SimpleUnionMemberString) isSimpleUnion() {} + type StructureListMember struct { A *string @@ -142,6 +171,12 @@ type StructureListMember struct { noSmithyDocumentSerde } +type TestConfig struct { + Timeout *int32 + + noSmithyDocumentSerde +} + type RenamedGreeting struct { Salutation *string @@ -165,4 +200,5 @@ type UnknownUnionMember struct { noSmithyDocumentSerde } -func (*UnknownUnionMember) isMyUnion() {} +func (*UnknownUnionMember) isMyUnion() {} +func (*UnknownUnionMember) isSimpleUnion() {} diff --git a/internal/protocoltest/awsrestjson/types/types_exported_test.go b/internal/protocoltest/awsrestjson/types/types_exported_test.go index 6bfb5e73952..9de80b86bad 100644 --- a/internal/protocoltest/awsrestjson/types/types_exported_test.go +++ b/internal/protocoltest/awsrestjson/types/types_exported_test.go @@ -61,3 +61,25 @@ var _ types.FooEnum var _ *types.GreetingStruct var _ *time.Time var _ []byte + +func ExampleSimpleUnion_outputUsage() { + var union types.SimpleUnion + // type switches can be used to check the union value + switch v := union.(type) { + case *types.SimpleUnionMemberInt: + _ = v.Value // Value is int32 + + case *types.SimpleUnionMemberString: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string +var _ *int32 diff --git a/internal/protocoltest/awsrestjson/validators.go b/internal/protocoltest/awsrestjson/validators.go index befa58aa435..a0004e6534a 100644 --- a/internal/protocoltest/awsrestjson/validators.go +++ b/internal/protocoltest/awsrestjson/validators.go @@ -129,28 +129,484 @@ func (m *validateOpHttpRequestWithLabels) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpMalformedBoolean struct { +} + +func (*validateOpMalformedBoolean) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedBoolean) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedBooleanInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedBooleanInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedByte struct { +} + +func (*validateOpMalformedByte) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedByte) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedByteInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedByteInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedDouble struct { +} + +func (*validateOpMalformedDouble) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedDouble) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedDoubleInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedDoubleInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedFloat struct { +} + +func (*validateOpMalformedFloat) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedFloat) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedFloatInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedFloatInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedInteger struct { +} + +func (*validateOpMalformedInteger) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedInteger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedIntegerInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedIntegerInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedLong struct { +} + +func (*validateOpMalformedLong) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedLong) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedLongInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedLongInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedShort struct { +} + +func (*validateOpMalformedShort) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedShort) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedShortInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedShortInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampBodyDateTime struct { +} + +func (*validateOpMalformedTimestampBodyDateTime) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampBodyDateTime) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampBodyDateTimeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampBodyDateTimeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampBodyDefault struct { +} + +func (*validateOpMalformedTimestampBodyDefault) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampBodyDefault) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampBodyDefaultInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampBodyDefaultInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampBodyHttpDate struct { +} + +func (*validateOpMalformedTimestampBodyHttpDate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampBodyHttpDate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampBodyHttpDateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampBodyHttpDateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampHeaderDateTime struct { +} + +func (*validateOpMalformedTimestampHeaderDateTime) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampHeaderDateTime) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampHeaderDateTimeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampHeaderDateTimeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampHeaderDefault struct { +} + +func (*validateOpMalformedTimestampHeaderDefault) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampHeaderDefault) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampHeaderDefaultInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampHeaderDefaultInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampHeaderEpoch struct { +} + +func (*validateOpMalformedTimestampHeaderEpoch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampHeaderEpoch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampHeaderEpochInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampHeaderEpochInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampPathDefault struct { +} + +func (*validateOpMalformedTimestampPathDefault) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampPathDefault) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampPathDefaultInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampPathDefaultInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampPathEpoch struct { +} + +func (*validateOpMalformedTimestampPathEpoch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampPathEpoch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampPathEpochInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampPathEpochInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampPathHttpDate struct { +} + +func (*validateOpMalformedTimestampPathHttpDate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampPathHttpDate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampPathHttpDateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampPathHttpDateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampQueryDefault struct { +} + +func (*validateOpMalformedTimestampQueryDefault) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampQueryDefault) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampQueryDefaultInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampQueryDefaultInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampQueryEpoch struct { +} + +func (*validateOpMalformedTimestampQueryEpoch) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampQueryEpoch) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampQueryEpochInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampQueryEpochInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpMalformedTimestampQueryHttpDate struct { +} + +func (*validateOpMalformedTimestampQueryHttpDate) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpMalformedTimestampQueryHttpDate) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*MalformedTimestampQueryHttpDateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpMalformedTimestampQueryHttpDateInput(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) } -func addOpEndpointWithHostLabelOperationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEndpointWithHostLabelOperation{}, middleware.After) +func addOpEndpointWithHostLabelOperationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpEndpointWithHostLabelOperation{}, middleware.After) +} + +func addOpHttpRequestWithFloatLabelsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpHttpRequestWithFloatLabels{}, middleware.After) +} + +func addOpHttpRequestWithGreedyLabelInPathValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpHttpRequestWithGreedyLabelInPath{}, middleware.After) +} + +func addOpHttpRequestWithLabelsAndTimestampFormatValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpHttpRequestWithLabelsAndTimestampFormat{}, middleware.After) +} + +func addOpHttpRequestWithLabelsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpHttpRequestWithLabels{}, middleware.After) +} + +func addOpMalformedBooleanValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedBoolean{}, middleware.After) +} + +func addOpMalformedByteValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedByte{}, middleware.After) +} + +func addOpMalformedDoubleValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedDouble{}, middleware.After) +} + +func addOpMalformedFloatValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedFloat{}, middleware.After) +} + +func addOpMalformedIntegerValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedInteger{}, middleware.After) +} + +func addOpMalformedLongValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedLong{}, middleware.After) +} + +func addOpMalformedShortValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedShort{}, middleware.After) +} + +func addOpMalformedTimestampBodyDateTimeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampBodyDateTime{}, middleware.After) +} + +func addOpMalformedTimestampBodyDefaultValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampBodyDefault{}, middleware.After) } -func addOpHttpRequestWithFloatLabelsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpHttpRequestWithFloatLabels{}, middleware.After) +func addOpMalformedTimestampBodyHttpDateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampBodyHttpDate{}, middleware.After) } -func addOpHttpRequestWithGreedyLabelInPathValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpHttpRequestWithGreedyLabelInPath{}, middleware.After) +func addOpMalformedTimestampHeaderDateTimeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampHeaderDateTime{}, middleware.After) } -func addOpHttpRequestWithLabelsAndTimestampFormatValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpHttpRequestWithLabelsAndTimestampFormat{}, middleware.After) +func addOpMalformedTimestampHeaderDefaultValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampHeaderDefault{}, middleware.After) } -func addOpHttpRequestWithLabelsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpHttpRequestWithLabels{}, middleware.After) +func addOpMalformedTimestampHeaderEpochValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampHeaderEpoch{}, middleware.After) +} + +func addOpMalformedTimestampPathDefaultValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampPathDefault{}, middleware.After) +} + +func addOpMalformedTimestampPathEpochValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampPathEpoch{}, middleware.After) +} + +func addOpMalformedTimestampPathHttpDateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampPathHttpDate{}, middleware.After) +} + +func addOpMalformedTimestampQueryDefaultValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampQueryDefault{}, middleware.After) +} + +func addOpMalformedTimestampQueryEpochValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampQueryEpoch{}, middleware.After) +} + +func addOpMalformedTimestampQueryHttpDateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpMalformedTimestampQueryHttpDate{}, middleware.After) } func validateOpConstantQueryStringInput(v *ConstantQueryStringInput) error { @@ -287,3 +743,288 @@ func validateOpHttpRequestWithLabelsInput(v *HttpRequestWithLabelsInput) error { return nil } } + +func validateOpMalformedBooleanInput(v *MalformedBooleanInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedBooleanInput"} + if v.BooleanInPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("BooleanInPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedByteInput(v *MalformedByteInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedByteInput"} + if v.ByteInPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("ByteInPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedDoubleInput(v *MalformedDoubleInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedDoubleInput"} + if v.DoubleInPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("DoubleInPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedFloatInput(v *MalformedFloatInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedFloatInput"} + if v.FloatInPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("FloatInPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedIntegerInput(v *MalformedIntegerInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedIntegerInput"} + if v.IntegerInPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("IntegerInPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedLongInput(v *MalformedLongInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedLongInput"} + if v.LongInPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("LongInPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedShortInput(v *MalformedShortInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedShortInput"} + if v.ShortInPath == nil { + invalidParams.Add(smithy.NewErrParamRequired("ShortInPath")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampBodyDateTimeInput(v *MalformedTimestampBodyDateTimeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampBodyDateTimeInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampBodyDefaultInput(v *MalformedTimestampBodyDefaultInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampBodyDefaultInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampBodyHttpDateInput(v *MalformedTimestampBodyHttpDateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampBodyHttpDateInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampHeaderDateTimeInput(v *MalformedTimestampHeaderDateTimeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampHeaderDateTimeInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampHeaderDefaultInput(v *MalformedTimestampHeaderDefaultInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampHeaderDefaultInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampHeaderEpochInput(v *MalformedTimestampHeaderEpochInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampHeaderEpochInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampPathDefaultInput(v *MalformedTimestampPathDefaultInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampPathDefaultInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampPathEpochInput(v *MalformedTimestampPathEpochInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampPathEpochInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampPathHttpDateInput(v *MalformedTimestampPathHttpDateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampPathHttpDateInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampQueryDefaultInput(v *MalformedTimestampQueryDefaultInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampQueryDefaultInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampQueryEpochInput(v *MalformedTimestampQueryEpochInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampQueryEpochInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpMalformedTimestampQueryHttpDateInput(v *MalformedTimestampQueryHttpDateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "MalformedTimestampQueryHttpDateInput"} + if v.Timestamp == nil { + invalidParams.Add(smithy.NewErrParamRequired("Timestamp")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go index df898e3f3fe..9a6cc75548b 100644 --- a/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/ec2query/api_op_EmptyInputAndEmptyOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsEc2querySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -72,7 +74,17 @@ func TestClient_EmptyInputAndEmptyOutput_awsEc2querySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +93,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsEc2querySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -142,7 +154,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -175,7 +187,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_EndpointOperation_test.go b/internal/protocoltest/ec2query/api_op_EndpointOperation_test.go index bf56ff82323..b88ffcf05a4 100644 --- a/internal/protocoltest/ec2query/api_op_EndpointOperation_test.go +++ b/internal/protocoltest/ec2query/api_op_EndpointOperation_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -29,6 +30,7 @@ func TestClient_EndpointOperation_awsEc2querySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -41,6 +43,17 @@ func TestClient_EndpointOperation_awsEc2querySerialize(t *testing.T) { ExpectHeader: http.Header{ "Content-Type": []string{"application/x-www-form-urlencoded"}, }, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/x-www-form-urlencoded", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareURLFormReaderBytes(actual, []byte(`Action=EndpointOperation&Version=2020-01-08`)) @@ -71,7 +84,17 @@ func TestClient_EndpointOperation_awsEc2querySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -80,7 +103,7 @@ func TestClient_EndpointOperation_awsEc2querySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation_test.go b/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation_test.go index 4bb45204186..c3ed6933fba 100644 --- a/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation_test.go +++ b/internal/protocoltest/ec2query/api_op_EndpointWithHostLabelOperation_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_EndpointWithHostLabelOperation_awsEc2querySerialize(t *testing.T ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -46,6 +48,17 @@ func TestClient_EndpointWithHostLabelOperation_awsEc2querySerialize(t *testing.T ExpectHeader: http.Header{ "Content-Type": []string{"application/x-www-form-urlencoded"}, }, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/x-www-form-urlencoded", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareURLFormReaderBytes(actual, []byte(`Action=EndpointWithHostLabelOperation&Version=2020-01-08&Label=bar`)) @@ -76,7 +89,17 @@ func TestClient_EndpointWithHostLabelOperation_awsEc2querySerialize(t *testing.T w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +108,7 @@ func TestClient_EndpointWithHostLabelOperation_awsEc2querySerialize(t *testing.T }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go b/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go index 83556b971c4..8ba252046cd 100644 --- a/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/ec2query/api_op_GreetingWithErrors_test.go @@ -50,7 +50,7 @@ func TestClient_GreetingWithErrors_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -83,7 +83,7 @@ func TestClient_GreetingWithErrors_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -149,7 +149,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsEc2queryDeserialize(t *tes } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -182,7 +182,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsEc2queryDeserialize(t *tes }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -271,7 +271,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsEc2queryDeserialize(t *testin } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -304,7 +304,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsEc2queryDeserialize(t *testin }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_HostWithPathOperation.go b/internal/protocoltest/ec2query/api_op_HostWithPathOperation.go new file mode 100644 index 00000000000..a2582e2f865 --- /dev/null +++ b/internal/protocoltest/ec2query/api_op_HostWithPathOperation.go @@ -0,0 +1,98 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2query + +import ( + "context" + 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) HostWithPathOperation(ctx context.Context, params *HostWithPathOperationInput, optFns ...func(*Options)) (*HostWithPathOperationOutput, error) { + if params == nil { + params = &HostWithPathOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "HostWithPathOperation", params, optFns, c.addOperationHostWithPathOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*HostWithPathOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type HostWithPathOperationInput struct { + noSmithyDocumentSerde +} + +type HostWithPathOperationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsEc2query_serializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsEc2query_deserializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opHostWithPathOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "HostWithPathOperation", + } +} diff --git a/internal/protocoltest/ec2query/api_op_HostWithPathOperation_test.go b/internal/protocoltest/ec2query/api_op_HostWithPathOperation_test.go new file mode 100644 index 00000000000..2d9e970c518 --- /dev/null +++ b/internal/protocoltest/ec2query/api_op_HostWithPathOperation_test.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package ec2query + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_HostWithPathOperation_awsEc2querySerialize(t *testing.T) { + cases := map[string]struct { + Params *HostWithPathOperationInput + 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 + }{ + // Custom endpoints supplied by users can have paths + "Ec2QueryHostWithPath": { + Params: &HostWithPathOperationInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/custom/", + ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com/custom" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderBytes(actual, []byte(`Action=HostWithPathOperation&Version=2020-01-08`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.HostWithPathOperation(context.Background(), c.Params) + 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/ec2query/api_op_IgnoresWrappingXmlName_test.go b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go index e3943870f0b..859ae710ec1 100644 --- a/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go +++ b/internal/protocoltest/ec2query/api_op_IgnoresWrappingXmlName_test.go @@ -47,7 +47,7 @@ func TestClient_IgnoresWrappingXmlName_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -80,7 +80,7 @@ func TestClient_IgnoresWrappingXmlName_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_NestedStructures_test.go b/internal/protocoltest/ec2query/api_op_NestedStructures_test.go index 8c9e5fd412a..c79d4a72c44 100644 --- a/internal/protocoltest/ec2query/api_op_NestedStructures_test.go +++ b/internal/protocoltest/ec2query/api_op_NestedStructures_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_NestedStructures_awsEc2querySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -80,7 +82,17 @@ func TestClient_NestedStructures_awsEc2querySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -89,7 +101,7 @@ func TestClient_NestedStructures_awsEc2querySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go b/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go index 10cbdce9ad0..15b0a50c2df 100644 --- a/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/ec2query/api_op_NoInputAndOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_NoInputAndOutput_awsEc2querySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -72,7 +74,17 @@ func TestClient_NoInputAndOutput_awsEc2querySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +93,7 @@ func TestClient_NoInputAndOutput_awsEc2querySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -142,7 +154,7 @@ func TestClient_NoInputAndOutput_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -175,7 +187,7 @@ func TestClient_NoInputAndOutput_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill_test.go b/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill_test.go index a426dd34fa4..5861aa0fb00 100644 --- a/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill_test.go +++ b/internal/protocoltest/ec2query/api_op_QueryIdempotencyTokenAutoFill_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsEc2querySerialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -90,7 +92,17 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsEc2querySerialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -99,7 +111,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsEc2querySerialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_QueryLists_test.go b/internal/protocoltest/ec2query/api_op_QueryLists_test.go index 128057e1124..21eb48f0094 100644 --- a/internal/protocoltest/ec2query/api_op_QueryLists_test.go +++ b/internal/protocoltest/ec2query/api_op_QueryLists_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_QueryLists_awsEc2querySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -159,7 +161,17 @@ func TestClient_QueryLists_awsEc2querySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -168,7 +180,7 @@ func TestClient_QueryLists_awsEc2querySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_QueryTimestamps_test.go b/internal/protocoltest/ec2query/api_op_QueryTimestamps_test.go index a427ae2160e..255e2fd422c 100644 --- a/internal/protocoltest/ec2query/api_op_QueryTimestamps_test.go +++ b/internal/protocoltest/ec2query/api_op_QueryTimestamps_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_QueryTimestamps_awsEc2querySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -76,7 +78,17 @@ func TestClient_QueryTimestamps_awsEc2querySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +97,7 @@ func TestClient_QueryTimestamps_awsEc2querySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go index 3b23facf59c..0ebf09c99db 100644 --- a/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go +++ b/internal/protocoltest/ec2query/api_op_RecursiveXmlShapes_test.go @@ -70,7 +70,7 @@ func TestClient_RecursiveXmlShapes_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -103,7 +103,7 @@ func TestClient_RecursiveXmlShapes_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_SimpleInputParams_test.go b/internal/protocoltest/ec2query/api_op_SimpleInputParams_test.go index 2bda4a87bf1..ae34e94ab21 100644 --- a/internal/protocoltest/ec2query/api_op_SimpleInputParams_test.go +++ b/internal/protocoltest/ec2query/api_op_SimpleInputParams_test.go @@ -17,6 +17,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -32,6 +33,7 @@ func TestClient_SimpleInputParams_awsEc2querySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -308,7 +310,17 @@ func TestClient_SimpleInputParams_awsEc2querySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -317,7 +329,7 @@ func TestClient_SimpleInputParams_awsEc2querySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go index 21d415e32db..6721de73a6f 100644 --- a/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go +++ b/internal/protocoltest/ec2query/api_op_SimpleScalarXmlProperties_test.go @@ -116,7 +116,7 @@ func TestClient_SimpleScalarXmlProperties_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -149,7 +149,7 @@ func TestClient_SimpleScalarXmlProperties_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go b/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go index cd3f8f4a637..fccf9e66b19 100644 --- a/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlBlobs_test.go @@ -46,7 +46,7 @@ func TestClient_XmlBlobs_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -79,7 +79,7 @@ func TestClient_XmlBlobs_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go index 3b6c78aac77..4e9ae64314c 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEmptyBlobs_test.go @@ -62,7 +62,7 @@ func TestClient_XmlEmptyBlobs_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -95,7 +95,7 @@ func TestClient_XmlEmptyBlobs_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go b/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go index 99bf6895a55..547f96b1918 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEmptyLists_test.go @@ -47,7 +47,7 @@ func TestClient_XmlEmptyLists_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -80,7 +80,7 @@ func TestClient_XmlEmptyLists_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_XmlEnums_test.go b/internal/protocoltest/ec2query/api_op_XmlEnums_test.go index 7a96489e353..6a67587913c 100644 --- a/internal/protocoltest/ec2query/api_op_XmlEnums_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlEnums_test.go @@ -81,7 +81,7 @@ func TestClient_XmlEnums_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -114,7 +114,7 @@ func TestClient_XmlEnums_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_XmlLists_test.go b/internal/protocoltest/ec2query/api_op_XmlLists_test.go index afd4e501cb6..a943ec27d9c 100644 --- a/internal/protocoltest/ec2query/api_op_XmlLists_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlLists_test.go @@ -168,7 +168,7 @@ func TestClient_XmlLists_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -201,7 +201,7 @@ func TestClient_XmlLists_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go b/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go index fcc15946f70..28d5101f7f4 100644 --- a/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlNamespaces_test.go @@ -60,7 +60,7 @@ func TestClient_XmlNamespaces_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -93,7 +93,7 @@ func TestClient_XmlNamespaces_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go b/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go index 3f36f19633a..e8c8c1793e5 100644 --- a/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go +++ b/internal/protocoltest/ec2query/api_op_XmlTimestamps_test.go @@ -96,7 +96,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -129,7 +129,7 @@ func TestClient_XmlTimestamps_awsEc2queryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/ec2query/deserializers.go b/internal/protocoltest/ec2query/deserializers.go index f9932f4f93b..663b54b99d8 100644 --- a/internal/protocoltest/ec2query/deserializers.go +++ b/internal/protocoltest/ec2query/deserializers.go @@ -349,6 +349,74 @@ func awsEc2query_deserializeOpErrorGreetingWithErrors(response *smithyhttp.Respo } } +type awsEc2query_deserializeOpHostWithPathOperation struct { +} + +func (*awsEc2query_deserializeOpHostWithPathOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsEc2query_deserializeOpHostWithPathOperation) 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, awsEc2query_deserializeOpErrorHostWithPathOperation(response, &metadata) + } + output := &HostWithPathOperationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsEc2query_deserializeOpErrorHostWithPathOperation(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 := ec2query.GetErrorResponseComponents(errorBody) + if err != nil { + return err + } + awsmiddleware.SetRequestIDMetadata(metadata, errorComponents.RequestID) + 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 awsEc2query_deserializeOpIgnoresWrappingXmlName struct { } diff --git a/internal/protocoltest/ec2query/generated.json b/internal/protocoltest/ec2query/generated.json index 386903cb460..221c45afd49 100644 --- a/internal/protocoltest/ec2query/generated.json +++ b/internal/protocoltest/ec2query/generated.json @@ -16,6 +16,8 @@ "api_op_EndpointWithHostLabelOperation_test.go", "api_op_GreetingWithErrors.go", "api_op_GreetingWithErrors_test.go", + "api_op_HostWithPathOperation.go", + "api_op_HostWithPathOperation_test.go", "api_op_IgnoresWrappingXmlName.go", "api_op_IgnoresWrappingXmlName_test.go", "api_op_NestedStructures.go", diff --git a/internal/protocoltest/ec2query/serializers.go b/internal/protocoltest/ec2query/serializers.go index 5009fce737b..204d3bf6bcf 100644 --- a/internal/protocoltest/ec2query/serializers.go +++ b/internal/protocoltest/ec2query/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsEc2query_serializeOpEmptyInputAndEmptyOutput struct { @@ -37,7 +38,15 @@ func (m *awsEc2query_serializeOpEmptyInputAndEmptyOutput) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -89,7 +98,15 @@ func (m *awsEc2query_serializeOpEndpointOperation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -141,7 +158,15 @@ func (m *awsEc2query_serializeOpEndpointWithHostLabelOperation) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -197,7 +222,15 @@ func (m *awsEc2query_serializeOpGreetingWithErrors) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -228,6 +261,66 @@ func (m *awsEc2query_serializeOpGreetingWithErrors) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsEc2query_serializeOpHostWithPathOperation struct { +} + +func (*awsEc2query_serializeOpHostWithPathOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsEc2query_serializeOpHostWithPathOperation) 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.(*HostWithPathOperationInput) + _ = 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 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("HostWithPathOperation") + body.Key("Version").String("2020-01-08") + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsEc2query_serializeOpIgnoresWrappingXmlName struct { } @@ -249,7 +342,15 @@ func (m *awsEc2query_serializeOpIgnoresWrappingXmlName) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -301,7 +402,15 @@ func (m *awsEc2query_serializeOpNestedStructures) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -357,7 +466,15 @@ func (m *awsEc2query_serializeOpNoInputAndOutput) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -409,7 +526,15 @@ func (m *awsEc2query_serializeOpQueryIdempotencyTokenAutoFill) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -465,7 +590,15 @@ func (m *awsEc2query_serializeOpQueryLists) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -521,7 +654,15 @@ func (m *awsEc2query_serializeOpQueryTimestamps) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -577,7 +718,15 @@ func (m *awsEc2query_serializeOpRecursiveXmlShapes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -629,7 +778,15 @@ func (m *awsEc2query_serializeOpSimpleInputParams) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -685,7 +842,15 @@ func (m *awsEc2query_serializeOpSimpleScalarXmlProperties) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -737,7 +902,15 @@ func (m *awsEc2query_serializeOpXmlBlobs) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +962,15 @@ func (m *awsEc2query_serializeOpXmlEmptyBlobs) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -841,7 +1022,15 @@ func (m *awsEc2query_serializeOpXmlEmptyLists) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -893,7 +1082,15 @@ func (m *awsEc2query_serializeOpXmlEnums) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -945,7 +1142,15 @@ func (m *awsEc2query_serializeOpXmlLists) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -997,7 +1202,15 @@ func (m *awsEc2query_serializeOpXmlNamespaces) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1049,7 +1262,15 @@ func (m *awsEc2query_serializeOpXmlTimestamps) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go b/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go index 459dca7b71a..4c8eac5faf6 100644 --- a/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_EmptyOperation_test.go @@ -18,6 +18,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -33,6 +34,7 @@ func TestClient_EmptyOperation_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -96,7 +98,17 @@ func TestClient_EmptyOperation_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -105,7 +117,7 @@ func TestClient_EmptyOperation_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -190,7 +202,7 @@ func TestClient_EmptyOperation_awsAwsjson11Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -223,7 +235,7 @@ func TestClient_EmptyOperation_awsAwsjson11Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_EndpointOperation_test.go b/internal/protocoltest/jsonrpc/api_op_EndpointOperation_test.go index cc3804bc0be..d346034f0c6 100644 --- a/internal/protocoltest/jsonrpc/api_op_EndpointOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_EndpointOperation_test.go @@ -13,6 +13,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -28,6 +29,7 @@ func TestClient_EndpointOperation_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -37,6 +39,17 @@ func TestClient_EndpointOperation_awsAwsjson11Serialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderBytes(actual, []byte(`{}`)) }, @@ -66,7 +79,17 @@ func TestClient_EndpointOperation_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -75,7 +98,7 @@ func TestClient_EndpointOperation_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation_test.go b/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation_test.go index 0567544660f..795d82b2c62 100644 --- a/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_EndpointWithHostLabelOperation_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -29,6 +30,7 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson11Serialize(t *testing. ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -42,6 +44,17 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson11Serialize(t *testing. ExpectMethod: "POST", ExpectURIPath: "/", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/json", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareJSONReaderBytes(actual, []byte(`{"label": "bar"}`)) @@ -72,7 +85,17 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson11Serialize(t *testing. w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +104,7 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson11Serialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go b/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go index 1025b4bc75a..3897d249edb 100644 --- a/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/jsonrpc/api_op_GreetingWithErrors_test.go @@ -47,7 +47,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsjson11Deserialize(t *te } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -80,7 +80,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsjson11Deserialize(t *te }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -173,7 +173,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsjson11Deserialize(t *testi } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -206,7 +206,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsjson11Deserialize(t *testi }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -381,7 +381,7 @@ func TestClient_GreetingWithErrors_FooError_awsAwsjson11Deserialize(t *testing.T } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -414,7 +414,7 @@ func TestClient_GreetingWithErrors_FooError_awsAwsjson11Deserialize(t *testing.T }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go b/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go new file mode 100644 index 00000000000..34c2cfd02c7 --- /dev/null +++ b/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation.go @@ -0,0 +1,106 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func (c *Client) HostWithPathOperation(ctx context.Context, params *HostWithPathOperationInput, optFns ...func(*Options)) (*HostWithPathOperationOutput, error) { + if params == nil { + params = &HostWithPathOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "HostWithPathOperation", params, optFns, c.addOperationHostWithPathOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*HostWithPathOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type HostWithPathOperationInput struct { + noSmithyDocumentSerde +} + +type HostWithPathOperationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opHostWithPathOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "foo", + OperationName: "HostWithPathOperation", + } +} diff --git a/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation_test.go b/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation_test.go new file mode 100644 index 00000000000..b79befe89cd --- /dev/null +++ b/internal/protocoltest/jsonrpc/api_op_HostWithPathOperation_test.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_HostWithPathOperation_awsAwsjson11Serialize(t *testing.T) { + cases := map[string]struct { + Params *HostWithPathOperationInput + 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 + }{ + // Custom endpoints supplied by users can have paths + "AwsJson11HostWithPath": { + Params: &HostWithPathOperationInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/custom/", + ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com/custom" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderBytes(actual, []byte(`{}`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + Region: "us-west-2", + }) + result, err := client.HostWithPathOperation(context.Background(), c.Params) + 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/api_op_JsonEnums_test.go b/internal/protocoltest/jsonrpc/api_op_JsonEnums_test.go index 9af79bb68d7..2e393bb0f8c 100644 --- a/internal/protocoltest/jsonrpc/api_op_JsonEnums_test.go +++ b/internal/protocoltest/jsonrpc/api_op_JsonEnums_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_JsonEnums_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -104,7 +106,17 @@ func TestClient_JsonEnums_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -113,7 +125,7 @@ func TestClient_JsonEnums_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -202,7 +214,7 @@ func TestClient_JsonEnums_awsAwsjson11Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -235,7 +247,7 @@ func TestClient_JsonEnums_awsAwsjson11Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go b/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go index 470e69c931e..9f435b3f0dd 100644 --- a/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go +++ b/internal/protocoltest/jsonrpc/api_op_JsonUnions_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_JsonUnions_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -262,7 +264,17 @@ func TestClient_JsonUnions_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -271,7 +283,7 @@ func TestClient_JsonUnions_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -475,7 +487,7 @@ func TestClient_JsonUnions_awsAwsjson11Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -508,7 +520,7 @@ func TestClient_JsonUnions_awsAwsjson11Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go index ad5212a298b..a41aeb5332a 100644 --- a/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_KitchenSinkOperation_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -681,7 +683,17 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -690,7 +702,7 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -1091,7 +1103,7 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -1124,7 +1136,7 @@ func TestClient_KitchenSinkOperation_awsAwsjson11Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go b/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go index 3c88262ce20..de879d72fff 100644 --- a/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go +++ b/internal/protocoltest/jsonrpc/api_op_NullOperation_test.go @@ -18,6 +18,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -33,6 +34,7 @@ func TestClient_NullOperation_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -125,7 +127,17 @@ func TestClient_NullOperation_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -134,7 +146,7 @@ func TestClient_NullOperation_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -229,7 +241,7 @@ func TestClient_NullOperation_awsAwsjson11Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -262,7 +274,7 @@ func TestClient_NullOperation_awsAwsjson11Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput_test.go b/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput_test.go index 61d86497fb3..654dd6c4ab2 100644 --- a/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput_test.go +++ b/internal/protocoltest/jsonrpc/api_op_OperationWithOptionalInputOutput_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -29,6 +30,7 @@ func TestClient_OperationWithOptionalInputOutput_awsAwsjson11Serialize(t *testin ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -85,7 +87,17 @@ func TestClient_OperationWithOptionalInputOutput_awsAwsjson11Serialize(t *testin w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -94,7 +106,7 @@ func TestClient_OperationWithOptionalInputOutput_awsAwsjson11Serialize(t *testin }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go b/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go index 2e4af2a17df..638a109941b 100644 --- a/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go +++ b/internal/protocoltest/jsonrpc/api_op_PutAndGetInlineDocuments_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_PutAndGetInlineDocuments_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -81,7 +83,17 @@ func TestClient_PutAndGetInlineDocuments_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -90,7 +102,7 @@ func TestClient_PutAndGetInlineDocuments_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -153,7 +165,7 @@ func TestClient_PutAndGetInlineDocuments_awsAwsjson11Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -186,7 +198,7 @@ func TestClient_PutAndGetInlineDocuments_awsAwsjson11Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go index 1101b6a4432..e7aca8447ed 100644 --- a/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/jsonrpc/api_op_SimpleScalarProperties_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson11Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -121,7 +123,17 @@ func TestClient_SimpleScalarProperties_awsAwsjson11Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -130,7 +142,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson11Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -225,7 +237,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson11Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -258,7 +270,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson11Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc/deserializers.go b/internal/protocoltest/jsonrpc/deserializers.go index 1a8fa8e4bd9..89863f21ff8 100644 --- a/internal/protocoltest/jsonrpc/deserializers.go +++ b/internal/protocoltest/jsonrpc/deserializers.go @@ -400,6 +400,92 @@ func awsAwsjson11_deserializeOpErrorGreetingWithErrors(response *smithyhttp.Resp } } +type awsAwsjson11_deserializeOpHostWithPathOperation struct { +} + +func (*awsAwsjson11_deserializeOpHostWithPathOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpHostWithPathOperation) 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_deserializeOpErrorHostWithPathOperation(response, &metadata) + } + output := &HostWithPathOperationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorHostWithPathOperation(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpJsonEnums struct { } diff --git a/internal/protocoltest/jsonrpc/generated.json b/internal/protocoltest/jsonrpc/generated.json index adb76154089..3903c9a391d 100644 --- a/internal/protocoltest/jsonrpc/generated.json +++ b/internal/protocoltest/jsonrpc/generated.json @@ -16,6 +16,8 @@ "api_op_EndpointWithHostLabelOperation_test.go", "api_op_GreetingWithErrors.go", "api_op_GreetingWithErrors_test.go", + "api_op_HostWithPathOperation.go", + "api_op_HostWithPathOperation_test.go", "api_op_JsonEnums.go", "api_op_JsonEnums_test.go", "api_op_JsonUnions.go", diff --git a/internal/protocoltest/jsonrpc/serializers.go b/internal/protocoltest/jsonrpc/serializers.go index 316ac8d2e2a..af1618d8b77 100644 --- a/internal/protocoltest/jsonrpc/serializers.go +++ b/internal/protocoltest/jsonrpc/serializers.go @@ -16,6 +16,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" "strings" ) @@ -40,7 +41,15 @@ func (m *awsAwsjson11_serializeOpEmptyOperation) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpEndpointOperation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -124,7 +141,15 @@ func (m *awsAwsjson11_serializeOpEndpointWithHostLabelOperation) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -171,7 +196,15 @@ func (m *awsAwsjson11_serializeOpGreetingWithErrors) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -192,6 +225,56 @@ func (m *awsAwsjson11_serializeOpGreetingWithErrors) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpHostWithPathOperation struct { +} + +func (*awsAwsjson11_serializeOpHostWithPathOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpHostWithPathOperation) 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.(*HostWithPathOperationInput) + _ = 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 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.HostWithPathOperation") + + if request, err = request.SetStream(strings.NewReader(`{}`)); 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_serializeOpJsonEnums struct { } @@ -213,7 +296,15 @@ func (m *awsAwsjson11_serializeOpJsonEnums) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +351,15 @@ func (m *awsAwsjson11_serializeOpJsonUnions) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -307,7 +406,15 @@ func (m *awsAwsjson11_serializeOpKitchenSinkOperation) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -354,7 +461,15 @@ func (m *awsAwsjson11_serializeOpNullOperation) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -401,7 +516,15 @@ func (m *awsAwsjson11_serializeOpOperationWithOptionalInputOutput) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -448,7 +571,15 @@ func (m *awsAwsjson11_serializeOpPutAndGetInlineDocuments) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -495,7 +626,15 @@ func (m *awsAwsjson11_serializeOpSimpleScalarProperties) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go index ed60705e292..ac1f9197627 100644 --- a/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_EmptyInputAndEmptyOutput_test.go @@ -18,6 +18,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -33,6 +34,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsjson10Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -76,7 +78,17 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsjson10Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +97,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsjson10Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -142,7 +154,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsjson10Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -175,7 +187,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsjson10Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/api_op_EndpointOperation_test.go b/internal/protocoltest/jsonrpc10/api_op_EndpointOperation_test.go index 183d5b203a9..53d0e7feb88 100644 --- a/internal/protocoltest/jsonrpc10/api_op_EndpointOperation_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_EndpointOperation_test.go @@ -13,6 +13,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -28,6 +29,7 @@ func TestClient_EndpointOperation_awsAwsjson10Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -37,6 +39,17 @@ func TestClient_EndpointOperation_awsAwsjson10Serialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderBytes(actual, []byte(`{}`)) }, @@ -66,7 +79,17 @@ func TestClient_EndpointOperation_awsAwsjson10Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -75,7 +98,7 @@ func TestClient_EndpointOperation_awsAwsjson10Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation_test.go b/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation_test.go index 16dbd46827d..d56160f4bdb 100644 --- a/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_EndpointWithHostLabelOperation_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -29,6 +30,7 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson10Serialize(t *testing. ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -42,6 +44,17 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson10Serialize(t *testing. ExpectMethod: "POST", ExpectURIPath: "/", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/json", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareJSONReaderBytes(actual, []byte(`{"label": "bar"}`)) @@ -72,7 +85,17 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson10Serialize(t *testing. w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +104,7 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsjson10Serialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go b/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go index 1c74629392b..b1ea6eca9fd 100644 --- a/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_GreetingWithErrors_test.go @@ -47,7 +47,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsjson10Deserialize(t *te } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -80,7 +80,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsjson10Deserialize(t *te }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -255,7 +255,7 @@ func TestClient_GreetingWithErrors_FooError_awsAwsjson10Deserialize(t *testing.T } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -288,7 +288,7 @@ func TestClient_GreetingWithErrors_FooError_awsAwsjson10Deserialize(t *testing.T }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -382,7 +382,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsjson10Deserialize(t *testi } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -415,7 +415,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsjson10Deserialize(t *testi }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go b/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go new file mode 100644 index 00000000000..614c1d6d681 --- /dev/null +++ b/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation.go @@ -0,0 +1,98 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc10 + +import ( + "context" + 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) HostWithPathOperation(ctx context.Context, params *HostWithPathOperationInput, optFns ...func(*Options)) (*HostWithPathOperationOutput, error) { + if params == nil { + params = &HostWithPathOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "HostWithPathOperation", params, optFns, c.addOperationHostWithPathOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*HostWithPathOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type HostWithPathOperationInput struct { + noSmithyDocumentSerde +} + +type HostWithPathOperationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opHostWithPathOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "HostWithPathOperation", + } +} diff --git a/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation_test.go b/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation_test.go new file mode 100644 index 00000000000..df4aeea794c --- /dev/null +++ b/internal/protocoltest/jsonrpc10/api_op_HostWithPathOperation_test.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package jsonrpc10 + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_HostWithPathOperation_awsAwsjson10Serialize(t *testing.T) { + cases := map[string]struct { + Params *HostWithPathOperationInput + 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 + }{ + // Custom endpoints supplied by users can have paths + "AwsJson10HostWithPath": { + Params: &HostWithPathOperationInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/custom/", + ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com/custom" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderBytes(actual, []byte(`{}`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + Region: "us-west-2", + }) + result, err := client.HostWithPathOperation(context.Background(), c.Params) + 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/api_op_JsonUnions_test.go b/internal/protocoltest/jsonrpc10/api_op_JsonUnions_test.go index 95e2d039021..9bbbb0ad700 100644 --- a/internal/protocoltest/jsonrpc10/api_op_JsonUnions_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_JsonUnions_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_JsonUnions_awsAwsjson10Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -262,7 +264,17 @@ func TestClient_JsonUnions_awsAwsjson10Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -271,7 +283,7 @@ func TestClient_JsonUnions_awsAwsjson10Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -475,7 +487,7 @@ func TestClient_JsonUnions_awsAwsjson10Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -508,7 +520,7 @@ func TestClient_JsonUnions_awsAwsjson10Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go index 92d51286d99..626905ac6b0 100644 --- a/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_NoInputAndNoOutput_test.go @@ -18,6 +18,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -33,6 +34,7 @@ func TestClient_NoInputAndNoOutput_awsAwsjson10Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -79,7 +81,17 @@ func TestClient_NoInputAndNoOutput_awsAwsjson10Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -88,7 +100,7 @@ func TestClient_NoInputAndNoOutput_awsAwsjson10Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -173,7 +185,7 @@ func TestClient_NoInputAndNoOutput_awsAwsjson10Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -206,7 +218,7 @@ func TestClient_NoInputAndNoOutput_awsAwsjson10Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go b/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go index 9da79b3e43a..4873e24ea9a 100644 --- a/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_NoInputAndOutput_test.go @@ -18,6 +18,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -33,6 +34,7 @@ func TestClient_NoInputAndOutput_awsAwsjson10Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -72,7 +74,17 @@ func TestClient_NoInputAndOutput_awsAwsjson10Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +93,7 @@ func TestClient_NoInputAndOutput_awsAwsjson10Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -138,7 +150,7 @@ func TestClient_NoInputAndOutput_awsAwsjson10Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -171,7 +183,7 @@ func TestClient_NoInputAndOutput_awsAwsjson10Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go index 1fa2360b1dd..cb831df6adc 100644 --- a/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/jsonrpc10/api_op_SimpleScalarProperties_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson10Serialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -121,7 +123,17 @@ func TestClient_SimpleScalarProperties_awsAwsjson10Serialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -130,7 +142,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson10Serialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -225,7 +237,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson10Deserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -258,7 +270,7 @@ func TestClient_SimpleScalarProperties_awsAwsjson10Deserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/jsonrpc10/deserializers.go b/internal/protocoltest/jsonrpc10/deserializers.go index 4bd7a5ba037..7ece9408c23 100644 --- a/internal/protocoltest/jsonrpc10/deserializers.go +++ b/internal/protocoltest/jsonrpc10/deserializers.go @@ -420,6 +420,92 @@ func awsAwsjson10_deserializeOpErrorGreetingWithErrors(response *smithyhttp.Resp } } +type awsAwsjson10_deserializeOpHostWithPathOperation struct { +} + +func (*awsAwsjson10_deserializeOpHostWithPathOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpHostWithPathOperation) 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_deserializeOpErrorHostWithPathOperation(response, &metadata) + } + output := &HostWithPathOperationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorHostWithPathOperation(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 + + code := response.Header.Get("X-Amzn-ErrorType") + if len(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + code, 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(code) != 0 { + errorCode = restjson.SanitizeErrorCode(code) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson10_deserializeOpJsonUnions struct { } diff --git a/internal/protocoltest/jsonrpc10/generated.json b/internal/protocoltest/jsonrpc10/generated.json index fa241676af8..89b9c8b5c9f 100644 --- a/internal/protocoltest/jsonrpc10/generated.json +++ b/internal/protocoltest/jsonrpc10/generated.json @@ -16,6 +16,8 @@ "api_op_EndpointWithHostLabelOperation_test.go", "api_op_GreetingWithErrors.go", "api_op_GreetingWithErrors_test.go", + "api_op_HostWithPathOperation.go", + "api_op_HostWithPathOperation_test.go", "api_op_JsonUnions.go", "api_op_JsonUnions_test.go", "api_op_NoInputAndNoOutput.go", diff --git a/internal/protocoltest/jsonrpc10/serializers.go b/internal/protocoltest/jsonrpc10/serializers.go index 8adc21d30c7..aec36030ebb 100644 --- a/internal/protocoltest/jsonrpc10/serializers.go +++ b/internal/protocoltest/jsonrpc10/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" "strings" ) @@ -38,7 +39,15 @@ func (m *awsAwsjson10_serializeOpEmptyInputAndEmptyOutput) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -85,7 +94,15 @@ func (m *awsAwsjson10_serializeOpEndpointOperation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -127,7 +144,15 @@ func (m *awsAwsjson10_serializeOpEndpointWithHostLabelOperation) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -174,7 +199,15 @@ func (m *awsAwsjson10_serializeOpGreetingWithErrors) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -195,6 +228,56 @@ func (m *awsAwsjson10_serializeOpGreetingWithErrors) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpHostWithPathOperation struct { +} + +func (*awsAwsjson10_serializeOpHostWithPathOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpHostWithPathOperation) 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.(*HostWithPathOperationInput) + _ = 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 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.HostWithPathOperation") + + if request, err = request.SetStream(strings.NewReader(`{}`)); 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_serializeOpJsonUnions struct { } @@ -216,7 +299,15 @@ func (m *awsAwsjson10_serializeOpJsonUnions) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -263,7 +354,15 @@ func (m *awsAwsjson10_serializeOpNoInputAndNoOutput) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -305,7 +404,15 @@ func (m *awsAwsjson10_serializeOpNoInputAndOutput) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -347,7 +454,15 @@ func (m *awsAwsjson10_serializeOpSimpleScalarProperties) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go index 5cb34def765..aaf6cf362bb 100644 --- a/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/query/api_op_EmptyInputAndEmptyOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -72,7 +74,17 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +93,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -134,7 +146,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -167,7 +179,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_EndpointOperation_test.go b/internal/protocoltest/query/api_op_EndpointOperation_test.go index 3f5faaa1f27..7d502d43985 100644 --- a/internal/protocoltest/query/api_op_EndpointOperation_test.go +++ b/internal/protocoltest/query/api_op_EndpointOperation_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -29,6 +30,7 @@ func TestClient_EndpointOperation_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -41,6 +43,17 @@ func TestClient_EndpointOperation_awsAwsquerySerialize(t *testing.T) { ExpectHeader: http.Header{ "Content-Type": []string{"application/x-www-form-urlencoded"}, }, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/x-www-form-urlencoded", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareURLFormReaderBytes(actual, []byte(`Action=EndpointOperation&Version=2020-01-08`)) @@ -71,7 +84,17 @@ func TestClient_EndpointOperation_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -80,7 +103,7 @@ func TestClient_EndpointOperation_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation_test.go b/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation_test.go index 9124f490ed8..ed5f84eda96 100644 --- a/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation_test.go +++ b/internal/protocoltest/query/api_op_EndpointWithHostLabelOperation_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsquerySerialize(t *testing.T ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -46,6 +48,17 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsquerySerialize(t *testing.T ExpectHeader: http.Header{ "Content-Type": []string{"application/x-www-form-urlencoded"}, }, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/x-www-form-urlencoded", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareURLFormReaderBytes(actual, []byte(`Action=EndpointWithHostLabelOperation&Version=2020-01-08&label=bar`)) @@ -76,7 +89,17 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsquerySerialize(t *testing.T w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +108,7 @@ func TestClient_EndpointWithHostLabelOperation_awsAwsquerySerialize(t *testing.T }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go index 536e14c2a17..8fd755b98c6 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlName_test.go @@ -56,7 +56,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsAwsqueryDeserialize(t *testing.T) } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -89,7 +89,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsAwsqueryDeserialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go index 82d1eae9266..c2fd29460aa 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMapWithXmlNamespace_test.go @@ -57,7 +57,7 @@ func TestClient_FlattenedXmlMapWithXmlNamespace_awsAwsqueryDeserialize(t *testin } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -90,7 +90,7 @@ func TestClient_FlattenedXmlMapWithXmlNamespace_awsAwsqueryDeserialize(t *testin }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go b/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go index f06c8da4ade..c59cb3802da 100644 --- a/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go +++ b/internal/protocoltest/query/api_op_FlattenedXmlMap_test.go @@ -57,7 +57,7 @@ func TestClient_FlattenedXmlMap_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -90,7 +90,7 @@ func TestClient_FlattenedXmlMap_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_GreetingWithErrors_test.go b/internal/protocoltest/query/api_op_GreetingWithErrors_test.go index 0de1c79439b..41767d2d0de 100644 --- a/internal/protocoltest/query/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/query/api_op_GreetingWithErrors_test.go @@ -51,7 +51,7 @@ func TestClient_GreetingWithErrors_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -84,7 +84,7 @@ func TestClient_GreetingWithErrors_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -149,7 +149,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsqueryDeserialize(t *tes } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -182,7 +182,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsAwsqueryDeserialize(t *tes }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -264,7 +264,7 @@ func TestClient_GreetingWithErrors_CustomCodeError_awsAwsqueryDeserialize(t *tes } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -297,7 +297,7 @@ func TestClient_GreetingWithErrors_CustomCodeError_awsAwsqueryDeserialize(t *tes }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -366,7 +366,6 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsqueryDeserialize(t *testin Sender ComplexError - Hi Top level bar @@ -385,7 +384,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsqueryDeserialize(t *testin } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -418,7 +417,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsAwsqueryDeserialize(t *testin }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_HostWithPathOperation.go b/internal/protocoltest/query/api_op_HostWithPathOperation.go new file mode 100644 index 00000000000..9b6f88baf25 --- /dev/null +++ b/internal/protocoltest/query/api_op_HostWithPathOperation.go @@ -0,0 +1,98 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package query + +import ( + "context" + 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) HostWithPathOperation(ctx context.Context, params *HostWithPathOperationInput, optFns ...func(*Options)) (*HostWithPathOperationOutput, error) { + if params == nil { + params = &HostWithPathOperationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "HostWithPathOperation", params, optFns, c.addOperationHostWithPathOperationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*HostWithPathOperationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type HostWithPathOperationInput struct { + noSmithyDocumentSerde +} + +type HostWithPathOperationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationHostWithPathOperationMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsquery_serializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsquery_deserializeOpHostWithPathOperation{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opHostWithPathOperation(options.Region), middleware.Before); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opHostWithPathOperation(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "HostWithPathOperation", + } +} diff --git a/internal/protocoltest/query/api_op_HostWithPathOperation_test.go b/internal/protocoltest/query/api_op_HostWithPathOperation_test.go new file mode 100644 index 00000000000..71547d55235 --- /dev/null +++ b/internal/protocoltest/query/api_op_HostWithPathOperation_test.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package query + +import ( + "bytes" + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + smithytesting "github.com/aws/smithy-go/testing" + "io" + "io/ioutil" + "net/http" + "net/http/httptest" + "net/url" + "strconv" + "testing" +) + +func TestClient_HostWithPathOperation_awsAwsquerySerialize(t *testing.T) { + cases := map[string]struct { + Params *HostWithPathOperationInput + 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 + }{ + // Custom endpoints supplied by users can have paths + "QueryHostWithPath": { + Params: &HostWithPathOperationInput{}, + ExpectMethod: "POST", + ExpectURIPath: "/custom/", + ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com/custom" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareReaderBytes(actual, []byte(`Action=HostWithPathOperation&Version=2020-01-08`)) + }, + }, + } + for name, c := range cases { + t.Run(name, func(t *testing.T) { + var actualReq *http.Request + server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + actualReq = r.Clone(r.Context()) + if len(actualReq.URL.RawPath) == 0 { + actualReq.URL.RawPath = actualReq.URL.Path + } + if v := actualReq.ContentLength; v != 0 { + actualReq.Header.Set("Content-Length", strconv.FormatInt(v, 10)) + } + var buf bytes.Buffer + if _, err := io.Copy(&buf, r.Body); err != nil { + t.Errorf("failed to read request body, %v", err) + } + actualReq.Body = ioutil.NopCloser(&buf) + + w.WriteHeader(200) + })) + defer server.Close() + serverURL := server.URL + 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() + 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: awshttp.NewBuildableClient(), + IdempotencyTokenProvider: smithyrand.NewUUIDIdempotencyToken(&smithytesting.ByteLoop{}), + Region: "us-west-2", + }) + result, err := client.HostWithPathOperation(context.Background(), c.Params) + 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/query/api_op_IgnoresWrappingXmlName_test.go b/internal/protocoltest/query/api_op_IgnoresWrappingXmlName_test.go index a55893229c4..337290a5c6f 100644 --- a/internal/protocoltest/query/api_op_IgnoresWrappingXmlName_test.go +++ b/internal/protocoltest/query/api_op_IgnoresWrappingXmlName_test.go @@ -48,7 +48,7 @@ func TestClient_IgnoresWrappingXmlName_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -81,7 +81,7 @@ func TestClient_IgnoresWrappingXmlName_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_NestedStructures_test.go b/internal/protocoltest/query/api_op_NestedStructures_test.go index b264b66d23e..ffb01305e0c 100644 --- a/internal/protocoltest/query/api_op_NestedStructures_test.go +++ b/internal/protocoltest/query/api_op_NestedStructures_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_NestedStructures_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -80,7 +82,17 @@ func TestClient_NestedStructures_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -89,7 +101,7 @@ func TestClient_NestedStructures_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go index 3cfc6aedb00..b0edd0cd3bf 100644 --- a/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/query/api_op_NoInputAndNoOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_NoInputAndNoOutput_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -72,7 +74,17 @@ func TestClient_NoInputAndNoOutput_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +93,7 @@ func TestClient_NoInputAndNoOutput_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -134,7 +146,7 @@ func TestClient_NoInputAndNoOutput_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -167,7 +179,7 @@ func TestClient_NoInputAndNoOutput_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_NoInputAndOutput_test.go b/internal/protocoltest/query/api_op_NoInputAndOutput_test.go index aba1ab02d80..716776d13e0 100644 --- a/internal/protocoltest/query/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/query/api_op_NoInputAndOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_NoInputAndOutput_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -72,7 +74,17 @@ func TestClient_NoInputAndOutput_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -81,7 +93,7 @@ func TestClient_NoInputAndOutput_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -134,7 +146,7 @@ func TestClient_NoInputAndOutput_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -167,7 +179,7 @@ func TestClient_NoInputAndOutput_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill_test.go b/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill_test.go index 97f9a754394..6b49fb5377e 100644 --- a/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill_test.go +++ b/internal/protocoltest/query/api_op_QueryIdempotencyTokenAutoFill_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsAwsquerySerialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -90,7 +92,17 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsAwsquerySerialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -99,7 +111,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsAwsquerySerialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_QueryLists_test.go b/internal/protocoltest/query/api_op_QueryLists_test.go index 2cba4f09ed5..5d374ea32b3 100644 --- a/internal/protocoltest/query/api_op_QueryLists_test.go +++ b/internal/protocoltest/query/api_op_QueryLists_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_QueryLists_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -178,7 +180,17 @@ func TestClient_QueryLists_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -187,7 +199,7 @@ func TestClient_QueryLists_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_QueryMaps_test.go b/internal/protocoltest/query/api_op_QueryMaps_test.go index a9c35ebfddf..fb0fe92218c 100644 --- a/internal/protocoltest/query/api_op_QueryMaps_test.go +++ b/internal/protocoltest/query/api_op_QueryMaps_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_QueryMaps_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -234,7 +236,17 @@ func TestClient_QueryMaps_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -243,7 +255,7 @@ func TestClient_QueryMaps_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_QueryTimestamps_test.go b/internal/protocoltest/query/api_op_QueryTimestamps_test.go index 429c2d1b41a..bd9e36358bf 100644 --- a/internal/protocoltest/query/api_op_QueryTimestamps_test.go +++ b/internal/protocoltest/query/api_op_QueryTimestamps_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_QueryTimestamps_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -76,7 +78,17 @@ func TestClient_QueryTimestamps_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +97,7 @@ func TestClient_QueryTimestamps_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go b/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go index 4a4c6fb2c21..842f3daf735 100644 --- a/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go +++ b/internal/protocoltest/query/api_op_RecursiveXmlShapes_test.go @@ -71,7 +71,7 @@ func TestClient_RecursiveXmlShapes_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -104,7 +104,7 @@ func TestClient_RecursiveXmlShapes_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_SimpleInputParams_test.go b/internal/protocoltest/query/api_op_SimpleInputParams_test.go index 7a9d0a3e517..2e746f2ef40 100644 --- a/internal/protocoltest/query/api_op_SimpleInputParams_test.go +++ b/internal/protocoltest/query/api_op_SimpleInputParams_test.go @@ -17,6 +17,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -32,6 +33,7 @@ func TestClient_SimpleInputParams_awsAwsquerySerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -251,7 +253,17 @@ func TestClient_SimpleInputParams_awsAwsquerySerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -260,7 +272,7 @@ func TestClient_SimpleInputParams_awsAwsquerySerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go b/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go index 849c7f7162a..42f0b3cd33f 100644 --- a/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go +++ b/internal/protocoltest/query/api_op_SimpleScalarXmlProperties_test.go @@ -123,7 +123,7 @@ func TestClient_SimpleScalarXmlProperties_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -156,7 +156,7 @@ func TestClient_SimpleScalarXmlProperties_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlBlobs_test.go b/internal/protocoltest/query/api_op_XmlBlobs_test.go index d46672b3156..7668ad4d86c 100644 --- a/internal/protocoltest/query/api_op_XmlBlobs_test.go +++ b/internal/protocoltest/query/api_op_XmlBlobs_test.go @@ -47,7 +47,7 @@ func TestClient_XmlBlobs_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -80,7 +80,7 @@ func TestClient_XmlBlobs_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go b/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go index 6a085b9e232..86067e6d19d 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go +++ b/internal/protocoltest/query/api_op_XmlEmptyBlobs_test.go @@ -64,7 +64,7 @@ func TestClient_XmlEmptyBlobs_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -97,7 +97,7 @@ func TestClient_XmlEmptyBlobs_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlEmptyLists_test.go b/internal/protocoltest/query/api_op_XmlEmptyLists_test.go index e23c7148d36..2bfecb91814 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyLists_test.go +++ b/internal/protocoltest/query/api_op_XmlEmptyLists_test.go @@ -49,7 +49,7 @@ func TestClient_XmlEmptyLists_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -82,7 +82,7 @@ func TestClient_XmlEmptyLists_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go b/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go index e7648dc11e8..1cd5e47f542 100644 --- a/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go +++ b/internal/protocoltest/query/api_op_XmlEmptyMaps_test.go @@ -66,7 +66,7 @@ func TestClient_XmlEmptyMaps_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -99,7 +99,7 @@ func TestClient_XmlEmptyMaps_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlEnums_test.go b/internal/protocoltest/query/api_op_XmlEnums_test.go index dc8bcb95d5f..3a7d148b63f 100644 --- a/internal/protocoltest/query/api_op_XmlEnums_test.go +++ b/internal/protocoltest/query/api_op_XmlEnums_test.go @@ -82,7 +82,7 @@ func TestClient_XmlEnums_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -115,7 +115,7 @@ func TestClient_XmlEnums_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlLists_test.go b/internal/protocoltest/query/api_op_XmlLists_test.go index 4dd5a2d951d..c0125069f7a 100644 --- a/internal/protocoltest/query/api_op_XmlLists_test.go +++ b/internal/protocoltest/query/api_op_XmlLists_test.go @@ -169,7 +169,7 @@ func TestClient_XmlLists_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -202,7 +202,7 @@ func TestClient_XmlLists_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go b/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go index 020d019973d..45f8ac4e292 100644 --- a/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go +++ b/internal/protocoltest/query/api_op_XmlMapsXmlName_test.go @@ -69,7 +69,7 @@ func TestClient_XmlMapsXmlName_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -102,7 +102,7 @@ func TestClient_XmlMapsXmlName_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlMaps_test.go b/internal/protocoltest/query/api_op_XmlMaps_test.go index 252a0140a76..299fd762a96 100644 --- a/internal/protocoltest/query/api_op_XmlMaps_test.go +++ b/internal/protocoltest/query/api_op_XmlMaps_test.go @@ -69,7 +69,7 @@ func TestClient_XmlMaps_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -102,7 +102,7 @@ func TestClient_XmlMaps_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlNamespaces_test.go b/internal/protocoltest/query/api_op_XmlNamespaces_test.go index 1455f8caca0..2bc447ed386 100644 --- a/internal/protocoltest/query/api_op_XmlNamespaces_test.go +++ b/internal/protocoltest/query/api_op_XmlNamespaces_test.go @@ -61,7 +61,7 @@ func TestClient_XmlNamespaces_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -94,7 +94,7 @@ func TestClient_XmlNamespaces_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/api_op_XmlTimestamps_test.go b/internal/protocoltest/query/api_op_XmlTimestamps_test.go index e0c2ea349db..a8611466426 100644 --- a/internal/protocoltest/query/api_op_XmlTimestamps_test.go +++ b/internal/protocoltest/query/api_op_XmlTimestamps_test.go @@ -100,7 +100,7 @@ func TestClient_XmlTimestamps_awsAwsqueryDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -133,7 +133,7 @@ func TestClient_XmlTimestamps_awsAwsqueryDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/query/deserializers.go b/internal/protocoltest/query/deserializers.go index afb9a536de0..dee53cc4118 100644 --- a/internal/protocoltest/query/deserializers.go +++ b/internal/protocoltest/query/deserializers.go @@ -699,6 +699,76 @@ func awsAwsquery_deserializeOpErrorGreetingWithErrors(response *smithyhttp.Respo } } +type awsAwsquery_deserializeOpHostWithPathOperation struct { +} + +func (*awsAwsquery_deserializeOpHostWithPathOperation) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsquery_deserializeOpHostWithPathOperation) 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, awsAwsquery_deserializeOpErrorHostWithPathOperation(response, &metadata) + } + output := &HostWithPathOperationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + return out, metadata, err +} + +func awsAwsquery_deserializeOpErrorHostWithPathOperation(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 awsAwsquery_deserializeOpIgnoresWrappingXmlName struct { } diff --git a/internal/protocoltest/query/generated.json b/internal/protocoltest/query/generated.json index d445a0ffb27..73ad66f289a 100644 --- a/internal/protocoltest/query/generated.json +++ b/internal/protocoltest/query/generated.json @@ -22,6 +22,8 @@ "api_op_FlattenedXmlMap_test.go", "api_op_GreetingWithErrors.go", "api_op_GreetingWithErrors_test.go", + "api_op_HostWithPathOperation.go", + "api_op_HostWithPathOperation_test.go", "api_op_IgnoresWrappingXmlName.go", "api_op_IgnoresWrappingXmlName_test.go", "api_op_NestedStructures.go", diff --git a/internal/protocoltest/query/serializers.go b/internal/protocoltest/query/serializers.go index cdea3646a78..6131dc1048e 100644 --- a/internal/protocoltest/query/serializers.go +++ b/internal/protocoltest/query/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" "sort" ) @@ -38,7 +39,15 @@ func (m *awsAwsquery_serializeOpEmptyInputAndEmptyOutput) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -90,7 +99,15 @@ func (m *awsAwsquery_serializeOpEndpointOperation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -142,7 +159,15 @@ func (m *awsAwsquery_serializeOpEndpointWithHostLabelOperation) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -198,7 +223,15 @@ func (m *awsAwsquery_serializeOpFlattenedXmlMap) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -250,7 +283,15 @@ func (m *awsAwsquery_serializeOpFlattenedXmlMapWithXmlName) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -302,7 +343,15 @@ func (m *awsAwsquery_serializeOpFlattenedXmlMapWithXmlNamespace) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -354,7 +403,15 @@ func (m *awsAwsquery_serializeOpGreetingWithErrors) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -385,6 +442,66 @@ func (m *awsAwsquery_serializeOpGreetingWithErrors) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsquery_serializeOpHostWithPathOperation struct { +} + +func (*awsAwsquery_serializeOpHostWithPathOperation) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsquery_serializeOpHostWithPathOperation) 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.(*HostWithPathOperationInput) + _ = 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 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-www-form-urlencoded") + + bodyWriter := bytes.NewBuffer(nil) + bodyEncoder := query.NewEncoder(bodyWriter) + body := bodyEncoder.Object() + body.Key("Action").String("HostWithPathOperation") + body.Key("Version").String("2020-01-08") + + err = bodyEncoder.Encode() + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(bodyWriter.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 awsAwsquery_serializeOpIgnoresWrappingXmlName struct { } @@ -406,7 +523,15 @@ func (m *awsAwsquery_serializeOpIgnoresWrappingXmlName) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +583,15 @@ func (m *awsAwsquery_serializeOpNestedStructures) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -514,7 +647,15 @@ func (m *awsAwsquery_serializeOpNoInputAndNoOutput) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -566,7 +707,15 @@ func (m *awsAwsquery_serializeOpNoInputAndOutput) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -618,7 +767,15 @@ func (m *awsAwsquery_serializeOpQueryIdempotencyTokenAutoFill) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -674,7 +831,15 @@ func (m *awsAwsquery_serializeOpQueryLists) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -730,7 +895,15 @@ func (m *awsAwsquery_serializeOpQueryMaps) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -786,7 +959,15 @@ func (m *awsAwsquery_serializeOpQueryTimestamps) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -842,7 +1023,15 @@ func (m *awsAwsquery_serializeOpRecursiveXmlShapes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -894,7 +1083,15 @@ func (m *awsAwsquery_serializeOpSimpleInputParams) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -950,7 +1147,15 @@ func (m *awsAwsquery_serializeOpSimpleScalarXmlProperties) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1002,7 +1207,15 @@ func (m *awsAwsquery_serializeOpXmlBlobs) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1054,7 +1267,15 @@ func (m *awsAwsquery_serializeOpXmlEmptyBlobs) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1106,7 +1327,15 @@ func (m *awsAwsquery_serializeOpXmlEmptyLists) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1158,7 +1387,15 @@ func (m *awsAwsquery_serializeOpXmlEmptyMaps) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1447,15 @@ func (m *awsAwsquery_serializeOpXmlEnums) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1262,7 +1507,15 @@ func (m *awsAwsquery_serializeOpXmlLists) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1314,7 +1567,15 @@ func (m *awsAwsquery_serializeOpXmlMaps) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1366,7 +1627,15 @@ func (m *awsAwsquery_serializeOpXmlMapsXmlName) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1418,7 +1687,15 @@ func (m *awsAwsquery_serializeOpXmlNamespaces) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1470,7 +1747,15 @@ func (m *awsAwsquery_serializeOpXmlTimestamps) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go b/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go index c3c63f383ba..b016b231aae 100644 --- a/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go +++ b/internal/protocoltest/restxml/api_op_AllQueryStringTypes_test.go @@ -18,6 +18,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" "time" @@ -34,6 +35,7 @@ func TestClient_AllQueryStringTypes_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -220,7 +222,17 @@ func TestClient_AllQueryStringTypes_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -229,7 +241,7 @@ func TestClient_AllQueryStringTypes_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go b/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go index e30a6da5e0b..8c0b37e03d2 100644 --- a/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_BodyWithXmlName_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_BodyWithXmlName_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -81,7 +83,17 @@ func TestClient_BodyWithXmlName_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -90,7 +102,7 @@ func TestClient_BodyWithXmlName_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -152,7 +164,7 @@ func TestClient_BodyWithXmlName_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -185,7 +197,7 @@ func TestClient_BodyWithXmlName_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString_test.go b/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString_test.go index b5af8eab64c..3701c72983c 100644 --- a/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString_test.go +++ b/internal/protocoltest/restxml/api_op_ConstantAndVariableQueryString_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_ConstantAndVariableQueryString_awsRestxmlSerialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -89,7 +91,17 @@ func TestClient_ConstantAndVariableQueryString_awsRestxmlSerialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -98,7 +110,7 @@ func TestClient_ConstantAndVariableQueryString_awsRestxmlSerialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_ConstantQueryString_test.go b/internal/protocoltest/restxml/api_op_ConstantQueryString_test.go index 9ebf40a4d1e..fd597b041c5 100644 --- a/internal/protocoltest/restxml/api_op_ConstantQueryString_test.go +++ b/internal/protocoltest/restxml/api_op_ConstantQueryString_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_ConstantQueryString_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -69,7 +71,17 @@ func TestClient_ConstantQueryString_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -78,7 +90,7 @@ func TestClient_ConstantQueryString_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go b/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go index bd66b75650c..4c5fc40bec8 100644 --- a/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go +++ b/internal/protocoltest/restxml/api_op_EmptyInputAndEmptyOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -68,7 +70,17 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -77,7 +89,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -131,7 +143,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -164,7 +176,7 @@ func TestClient_EmptyInputAndEmptyOutput_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_EndpointOperation_test.go b/internal/protocoltest/restxml/api_op_EndpointOperation_test.go index 0a18372753d..cf0782a69c9 100644 --- a/internal/protocoltest/restxml/api_op_EndpointOperation_test.go +++ b/internal/protocoltest/restxml/api_op_EndpointOperation_test.go @@ -14,6 +14,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -29,6 +30,7 @@ func TestClient_EndpointOperation_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -38,6 +40,17 @@ func TestClient_EndpointOperation_awsRestxmlSerialize(t *testing.T) { ExpectMethod: "POST", ExpectURIPath: "/EndpointOperation", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderEmpty(actual) }, @@ -67,7 +80,17 @@ func TestClient_EndpointOperation_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -76,7 +99,7 @@ func TestClient_EndpointOperation_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation_test.go b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation_test.go index 213cb2d6f5f..83a07f2a6de 100644 --- a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation_test.go +++ b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelHeaderOperation_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_EndpointWithHostLabelHeaderOperation_awsRestxmlSerialize(t *test ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -47,6 +49,17 @@ func TestClient_EndpointWithHostLabelHeaderOperation_awsRestxmlSerialize(t *test ExpectHeader: http.Header{ "X-Amz-Account-Id": []string{"bar"}, }, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/xml", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareReaderEmpty(actual) @@ -77,7 +90,17 @@ func TestClient_EndpointWithHostLabelHeaderOperation_awsRestxmlSerialize(t *test w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -86,7 +109,7 @@ func TestClient_EndpointWithHostLabelHeaderOperation_awsRestxmlSerialize(t *test }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation_test.go b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation_test.go index db2ac31983d..84d1e4721cf 100644 --- a/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation_test.go +++ b/internal/protocoltest/restxml/api_op_EndpointWithHostLabelOperation_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_EndpointWithHostLabelOperation_awsRestxmlSerialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -43,6 +45,17 @@ func TestClient_EndpointWithHostLabelOperation_awsRestxmlSerialize(t *testing.T) ExpectMethod: "POST", ExpectURIPath: "/EndpointWithHostLabelOperation", ExpectQuery: []smithytesting.QueryItem{}, + Host: func() *url.URL { + host := "https://example.com" + if len(host) == 0 { + return nil + } + u, err := url.Parse(host) + if err != nil { + panic(err) + } + return u + }(), BodyMediaType: "application/xml", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareXMLReaderBytes(actual, []byte(` @@ -76,7 +89,17 @@ func TestClient_EndpointWithHostLabelOperation_awsRestxmlSerialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +108,7 @@ func TestClient_EndpointWithHostLabelOperation_awsRestxmlSerialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go index 55b29e06df8..cb5a2e7f577 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlName_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -86,7 +88,17 @@ func TestClient_FlattenedXmlMapWithXmlName_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -95,7 +107,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -167,7 +179,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -200,7 +212,7 @@ func TestClient_FlattenedXmlMapWithXmlName_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go index 67f57111409..4cb1481e6c6 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMapWithXmlNamespace_test.go @@ -55,7 +55,7 @@ func TestClient_FlattenedXmlMapWithXmlNamespace_awsRestxmlDeserialize(t *testing } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -88,7 +88,7 @@ func TestClient_FlattenedXmlMapWithXmlNamespace_awsRestxmlDeserialize(t *testing }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go b/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go index 413c27a2974..662614d4606 100644 --- a/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go +++ b/internal/protocoltest/restxml/api_op_FlattenedXmlMap_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_FlattenedXmlMap_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -87,7 +89,17 @@ func TestClient_FlattenedXmlMap_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -96,7 +108,7 @@ func TestClient_FlattenedXmlMap_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -168,7 +180,7 @@ func TestClient_FlattenedXmlMap_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -201,7 +213,7 @@ func TestClient_FlattenedXmlMap_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go b/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go index d4edc4b578c..982f09b442f 100644 --- a/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go +++ b/internal/protocoltest/restxml/api_op_GreetingWithErrors_test.go @@ -45,7 +45,7 @@ func TestClient_GreetingWithErrors_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -78,7 +78,7 @@ func TestClient_GreetingWithErrors_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -144,7 +144,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsRestxmlDeserialize(t *test } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -177,7 +177,7 @@ func TestClient_GreetingWithErrors_InvalidGreeting_awsRestxmlDeserialize(t *test }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -267,7 +267,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsRestxmlDeserialize(t *testing } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -300,7 +300,7 @@ func TestClient_GreetingWithErrors_ComplexError_awsRestxmlDeserialize(t *testing }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go index 7d320eb2500..3c07fb15bf8 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadTraitsWithMediaType_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestxmlSerialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -79,7 +81,17 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestxmlSerialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -88,7 +100,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestxmlSerialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -149,7 +161,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestxmlDeserialize(t *testing. } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -182,7 +194,7 @@ func TestClient_HttpPayloadTraitsWithMediaType_awsRestxmlDeserialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go index 8cdd76662f2..7e14e3c8519 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadTraits_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpPayloadTraits_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -93,7 +95,17 @@ func TestClient_HttpPayloadTraits_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -102,7 +114,7 @@ func TestClient_HttpPayloadTraits_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -173,7 +185,7 @@ func TestClient_HttpPayloadTraits_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -206,7 +218,7 @@ func TestClient_HttpPayloadTraits_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go index f343e3f2dd3..e3d6afe726b 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithMemberXmlName_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_HttpPayloadWithMemberXmlName_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -82,7 +84,17 @@ func TestClient_HttpPayloadWithMemberXmlName_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -91,7 +103,7 @@ func TestClient_HttpPayloadWithMemberXmlName_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -154,7 +166,7 @@ func TestClient_HttpPayloadWithMemberXmlName_awsRestxmlDeserialize(t *testing.T) } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -187,7 +199,7 @@ func TestClient_HttpPayloadWithMemberXmlName_awsRestxmlDeserialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go index b418063cce2..c618c07264f 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithStructure_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_HttpPayloadWithStructure_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -86,7 +88,17 @@ func TestClient_HttpPayloadWithStructure_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -95,7 +107,7 @@ func TestClient_HttpPayloadWithStructure_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -162,7 +174,7 @@ func TestClient_HttpPayloadWithStructure_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -195,7 +207,7 @@ func TestClient_HttpPayloadWithStructure_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go index bbcb2e19de8..5f383276d5e 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlName_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_HttpPayloadWithXmlName_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -81,7 +83,17 @@ func TestClient_HttpPayloadWithXmlName_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -90,7 +102,7 @@ func TestClient_HttpPayloadWithXmlName_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -152,7 +164,7 @@ func TestClient_HttpPayloadWithXmlName_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -185,7 +197,7 @@ func TestClient_HttpPayloadWithXmlName_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go index fc5a76fcc42..95400c39b88 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespaceAndPrefix_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_HttpPayloadWithXmlNamespaceAndPrefix_awsRestxmlSerialize(t *test ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -83,7 +85,17 @@ func TestClient_HttpPayloadWithXmlNamespaceAndPrefix_awsRestxmlSerialize(t *test w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -92,7 +104,7 @@ func TestClient_HttpPayloadWithXmlNamespaceAndPrefix_awsRestxmlSerialize(t *test }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -156,7 +168,7 @@ func TestClient_HttpPayloadWithXmlNamespaceAndPrefix_awsRestxmlDeserialize(t *te } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -189,7 +201,7 @@ func TestClient_HttpPayloadWithXmlNamespaceAndPrefix_awsRestxmlDeserialize(t *te }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go index 82b127bd2e7..359450b55d0 100644 --- a/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPayloadWithXmlNamespace_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_HttpPayloadWithXmlNamespace_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -83,7 +85,17 @@ func TestClient_HttpPayloadWithXmlNamespace_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -92,7 +104,7 @@ func TestClient_HttpPayloadWithXmlNamespace_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -156,7 +168,7 @@ func TestClient_HttpPayloadWithXmlNamespace_awsRestxmlDeserialize(t *testing.T) } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -189,7 +201,7 @@ func TestClient_HttpPayloadWithXmlNamespace_awsRestxmlDeserialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go b/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go index 5daa8b57ee4..621ee7a474b 100644 --- a/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go +++ b/internal/protocoltest/restxml/api_op_HttpPrefixHeaders_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_HttpPrefixHeaders_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -96,7 +98,17 @@ func TestClient_HttpPrefixHeaders_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -105,7 +117,7 @@ func TestClient_HttpPrefixHeaders_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -186,7 +198,7 @@ func TestClient_HttpPrefixHeaders_awsRestxmlDeserialize(t *testing.T) { t.Skip("disabled test aws.protocoltests.restxml#RestXml aws.protocoltests.restxml#HttpPrefixHeaders") } - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -219,7 +231,7 @@ func TestClient_HttpPrefixHeaders_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels_test.go b/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels_test.go index c009e003a17..83729691c3d 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels_test.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithFloatLabels_test.go @@ -16,6 +16,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_HttpRequestWithFloatLabels_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -94,7 +96,17 @@ func TestClient_HttpRequestWithFloatLabels_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -103,7 +115,7 @@ func TestClient_HttpRequestWithFloatLabels_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath_test.go b/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath_test.go index b58b86d84bf..61db3d38f2a 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath_test.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithGreedyLabelInPath_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_HttpRequestWithGreedyLabelInPath_awsRestxmlSerialize(t *testing. ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -67,7 +69,17 @@ func TestClient_HttpRequestWithGreedyLabelInPath_awsRestxmlSerialize(t *testing. w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -76,7 +88,7 @@ func TestClient_HttpRequestWithGreedyLabelInPath_awsRestxmlSerialize(t *testing. }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go b/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go index 3709e0cd4d7..31a40b74487 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithLabelsAndTimestampFormat_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_HttpRequestWithLabelsAndTimestampFormat_awsRestxmlSerialize(t *t ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -73,7 +75,17 @@ func TestClient_HttpRequestWithLabelsAndTimestampFormat_awsRestxmlSerialize(t *t w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -82,7 +94,7 @@ func TestClient_HttpRequestWithLabelsAndTimestampFormat_awsRestxmlSerialize(t *t }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go b/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go index 146aab695ee..31a663a4720 100644 --- a/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go +++ b/internal/protocoltest/restxml/api_op_HttpRequestWithLabels_test.go @@ -16,6 +16,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -31,6 +32,7 @@ func TestClient_HttpRequestWithLabels_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -74,7 +76,17 @@ func TestClient_HttpRequestWithLabels_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -83,7 +95,7 @@ func TestClient_HttpRequestWithLabels_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go b/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go index c5159fb98d9..d7b7b337e0b 100644 --- a/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go +++ b/internal/protocoltest/restxml/api_op_HttpResponseCode_test.go @@ -43,7 +43,7 @@ func TestClient_HttpResponseCode_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -76,7 +76,7 @@ func TestClient_HttpResponseCode_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go b/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go index ace6ee88ca1..a1aa5fa96a1 100644 --- a/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go +++ b/internal/protocoltest/restxml/api_op_IgnoreQueryParamsInResponse_test.go @@ -43,7 +43,7 @@ func TestClient_IgnoreQueryParamsInResponse_awsRestxmlDeserialize(t *testing.T) } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -76,7 +76,7 @@ func TestClient_IgnoreQueryParamsInResponse_awsRestxmlDeserialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go b/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go index 1be3729ea64..78da5759860 100644 --- a/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go +++ b/internal/protocoltest/restxml/api_op_InputAndOutputWithHeaders_test.go @@ -22,6 +22,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" "time" @@ -38,6 +39,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -233,7 +235,17 @@ func TestClient_InputAndOutputWithHeaders_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -242,7 +254,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -429,7 +441,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -462,7 +474,7 @@ func TestClient_InputAndOutputWithHeaders_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go b/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go index 509ec985b0a..b46312f17fc 100644 --- a/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go +++ b/internal/protocoltest/restxml/api_op_NestedXmlMaps_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_NestedXmlMaps_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -122,7 +124,17 @@ func TestClient_NestedXmlMaps_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -131,7 +143,7 @@ func TestClient_NestedXmlMaps_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -234,7 +246,7 @@ func TestClient_NestedXmlMaps_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -267,7 +279,7 @@ func TestClient_NestedXmlMaps_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go b/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go index 401114a9443..9fb5ac50fa1 100644 --- a/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go +++ b/internal/protocoltest/restxml/api_op_NoInputAndNoOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_NoInputAndNoOutput_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -68,7 +70,17 @@ func TestClient_NoInputAndNoOutput_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -77,7 +89,7 @@ func TestClient_NoInputAndNoOutput_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -131,7 +143,7 @@ func TestClient_NoInputAndNoOutput_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -164,7 +176,7 @@ func TestClient_NoInputAndNoOutput_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go b/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go index d401d4ec855..b2f7a8bbb00 100644 --- a/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go +++ b/internal/protocoltest/restxml/api_op_NoInputAndOutput_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_NoInputAndOutput_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -68,7 +70,17 @@ func TestClient_NoInputAndOutput_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -77,7 +89,7 @@ func TestClient_NoInputAndOutput_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -131,7 +143,7 @@ func TestClient_NoInputAndOutput_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -164,7 +176,7 @@ func TestClient_NoInputAndOutput_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient_test.go b/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient_test.go index 9b3c10bbe48..447823f292f 100644 --- a/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient_test.go +++ b/internal/protocoltest/restxml/api_op_NullAndEmptyHeadersClient_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_NullAndEmptyHeadersClient_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -73,7 +75,17 @@ func TestClient_NullAndEmptyHeadersClient_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -82,7 +94,7 @@ func TestClient_NullAndEmptyHeadersClient_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString_test.go b/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString_test.go index 5f88fc648b4..a364cb5b8e8 100644 --- a/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString_test.go +++ b/internal/protocoltest/restxml/api_op_OmitsNullSerializesEmptyString_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_OmitsNullSerializesEmptyString_awsRestxmlSerialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -80,7 +82,17 @@ func TestClient_OmitsNullSerializesEmptyString_awsRestxmlSerialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -89,7 +101,7 @@ func TestClient_OmitsNullSerializesEmptyString_awsRestxmlSerialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill_test.go b/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill_test.go index 9375dad06db..e509b428aca 100644 --- a/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill_test.go +++ b/internal/protocoltest/restxml/api_op_QueryIdempotencyTokenAutoFill_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsRestxmlSerialize(t *testing.T) ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -80,7 +82,17 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsRestxmlSerialize(t *testing.T) w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -89,7 +101,7 @@ func TestClient_QueryIdempotencyTokenAutoFill_awsRestxmlSerialize(t *testing.T) }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap_test.go b/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap_test.go index c09edb1565e..c546703ebe1 100644 --- a/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap_test.go +++ b/internal/protocoltest/restxml/api_op_QueryParamsAsStringListMap_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryParamsAsStringListMap_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -76,7 +78,17 @@ func TestClient_QueryParamsAsStringListMap_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -85,7 +97,7 @@ func TestClient_QueryParamsAsStringListMap_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_QueryPrecedence_test.go b/internal/protocoltest/restxml/api_op_QueryPrecedence_test.go index 9a7f7aebd81..4e23f670249 100644 --- a/internal/protocoltest/restxml/api_op_QueryPrecedence_test.go +++ b/internal/protocoltest/restxml/api_op_QueryPrecedence_test.go @@ -15,6 +15,7 @@ import ( "io/ioutil" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -30,6 +31,7 @@ func TestClient_QueryPrecedence_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -73,7 +75,17 @@ func TestClient_QueryPrecedence_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -82,7 +94,7 @@ func TestClient_QueryPrecedence_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go b/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go index 9c481e2e5f1..c8130bf3ce3 100644 --- a/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go +++ b/internal/protocoltest/restxml/api_op_RecursiveShapes_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_RecursiveShapes_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -101,7 +103,17 @@ func TestClient_RecursiveShapes_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -110,7 +122,7 @@ func TestClient_RecursiveShapes_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -195,7 +207,7 @@ func TestClient_RecursiveShapes_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -228,7 +240,7 @@ func TestClient_RecursiveShapes_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go index d4c3b03cea6..73d5e38f2c2 100644 --- a/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/restxml/api_op_SimpleScalarProperties_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -100,7 +102,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { "SimpleScalarPropertiesWithWhiteSpace": { Params: &SimpleScalarPropertiesInput{ Foo: ptr.String("Foo"), - StringValue: ptr.String("string with white space"), + StringValue: ptr.String(" string with white space "), }, ExpectMethod: "PUT", ExpectURIPath: "/SimpleScalarProperties", @@ -112,7 +114,28 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { BodyMediaType: "application/xml", BodyAssert: func(actual io.Reader) error { return smithytesting.CompareXMLReaderBytes(actual, []byte(` - string with white space + string with white space + + `)) + }, + }, + // Serializes string containing exclusively whitespace + "SimpleScalarPropertiesPureWhiteSpace": { + Params: &SimpleScalarPropertiesInput{ + Foo: ptr.String("Foo"), + StringValue: ptr.String(" "), + }, + ExpectMethod: "PUT", + ExpectURIPath: "/SimpleScalarProperties", + ExpectQuery: []smithytesting.QueryItem{}, + ExpectHeader: http.Header{ + "Content-Type": []string{"application/xml"}, + "X-Foo": []string{"Foo"}, + }, + BodyMediaType: "application/xml", + BodyAssert: func(actual io.Reader) error { + return smithytesting.CompareXMLReaderBytes(actual, []byte(` + `)) }, @@ -201,7 +224,17 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -210,7 +243,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -356,12 +389,30 @@ func TestClient_SimpleScalarProperties_awsRestxmlDeserialize(t *testing.T) { BodyMediaType: "application/xml", Body: []byte(` - string with white space + string with white space + + `), + ExpectResult: &SimpleScalarPropertiesOutput{ + Foo: ptr.String("Foo"), + StringValue: ptr.String(" string with white space "), + }, + }, + // Serializes string containing white space + "SimpleScalarPropertiesPureWhiteSpace": { + StatusCode: 200, + Header: http.Header{ + "Content-Type": []string{"application/xml"}, + "X-Foo": []string{"Foo"}, + }, + BodyMediaType: "application/xml", + Body: []byte(` + + `), ExpectResult: &SimpleScalarPropertiesOutput{ Foo: ptr.String("Foo"), - StringValue: ptr.String("string with white space"), + StringValue: ptr.String(" "), }, }, // Supports handling NaN float values. @@ -418,7 +469,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -451,7 +502,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go b/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go index ebd9be1f437..924a4cfa91d 100644 --- a/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go +++ b/internal/protocoltest/restxml/api_op_TimestampFormatHeaders_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_TimestampFormatHeaders_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -87,7 +89,17 @@ func TestClient_TimestampFormatHeaders_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -96,7 +108,7 @@ func TestClient_TimestampFormatHeaders_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -167,7 +179,7 @@ func TestClient_TimestampFormatHeaders_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -200,7 +212,7 @@ func TestClient_TimestampFormatHeaders_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go b/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go index 92a62672772..625ba342ca7 100644 --- a/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go +++ b/internal/protocoltest/restxml/api_op_XmlAttributesOnPayload_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_XmlAttributesOnPayload_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -82,7 +84,17 @@ func TestClient_XmlAttributesOnPayload_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -91,7 +103,7 @@ func TestClient_XmlAttributesOnPayload_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -157,7 +169,7 @@ func TestClient_XmlAttributesOnPayload_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -190,7 +202,7 @@ func TestClient_XmlAttributesOnPayload_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlAttributes_test.go b/internal/protocoltest/restxml/api_op_XmlAttributes_test.go index 3c9c59fd2de..80fd18df853 100644 --- a/internal/protocoltest/restxml/api_op_XmlAttributes_test.go +++ b/internal/protocoltest/restxml/api_op_XmlAttributes_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_XmlAttributes_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -99,7 +101,17 @@ func TestClient_XmlAttributes_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -108,7 +120,7 @@ func TestClient_XmlAttributes_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -172,7 +184,7 @@ func TestClient_XmlAttributes_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -205,7 +217,7 @@ func TestClient_XmlAttributes_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlBlobs_test.go b/internal/protocoltest/restxml/api_op_XmlBlobs_test.go index 235689c4b66..03b4d1b134e 100644 --- a/internal/protocoltest/restxml/api_op_XmlBlobs_test.go +++ b/internal/protocoltest/restxml/api_op_XmlBlobs_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_XmlBlobs_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -77,7 +79,17 @@ func TestClient_XmlBlobs_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -86,7 +98,7 @@ func TestClient_XmlBlobs_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -149,7 +161,7 @@ func TestClient_XmlBlobs_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -182,7 +194,7 @@ func TestClient_XmlBlobs_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go index f37da3502c3..8868a6c251b 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyBlobs_test.go @@ -60,7 +60,7 @@ func TestClient_XmlEmptyBlobs_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -93,7 +93,7 @@ func TestClient_XmlEmptyBlobs_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go index b11b8c29514..ef8e54f7aff 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyLists_test.go @@ -19,6 +19,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -34,6 +35,7 @@ func TestClient_XmlEmptyLists_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -79,7 +81,17 @@ func TestClient_XmlEmptyLists_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -88,7 +100,7 @@ func TestClient_XmlEmptyLists_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -153,7 +165,7 @@ func TestClient_XmlEmptyLists_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -186,7 +198,7 @@ func TestClient_XmlEmptyLists_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go index a63b3693903..5b02c982aca 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyMaps_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_XmlEmptyMaps_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -78,7 +80,17 @@ func TestClient_XmlEmptyMaps_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -87,7 +99,7 @@ func TestClient_XmlEmptyMaps_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -165,7 +177,7 @@ func TestClient_XmlEmptyMaps_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -198,7 +210,7 @@ func TestClient_XmlEmptyMaps_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go b/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go index 082026c2f4e..75072e76c5e 100644 --- a/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEmptyStrings_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_XmlEmptyStrings_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -78,7 +80,17 @@ func TestClient_XmlEmptyStrings_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -87,7 +99,7 @@ func TestClient_XmlEmptyStrings_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -165,7 +177,7 @@ func TestClient_XmlEmptyStrings_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -198,7 +210,7 @@ func TestClient_XmlEmptyStrings_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlEnums_test.go b/internal/protocoltest/restxml/api_op_XmlEnums_test.go index 49d700adeb2..cdfe9536fcb 100644 --- a/internal/protocoltest/restxml/api_op_XmlEnums_test.go +++ b/internal/protocoltest/restxml/api_op_XmlEnums_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_XmlEnums_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -112,7 +114,17 @@ func TestClient_XmlEnums_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -121,7 +133,7 @@ func TestClient_XmlEnums_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -218,7 +230,7 @@ func TestClient_XmlEnums_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -251,7 +263,7 @@ func TestClient_XmlEnums_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlLists_test.go b/internal/protocoltest/restxml/api_op_XmlLists_test.go index 74f2f243bfb..92a9e22bb30 100644 --- a/internal/protocoltest/restxml/api_op_XmlLists_test.go +++ b/internal/protocoltest/restxml/api_op_XmlLists_test.go @@ -22,6 +22,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" "time" @@ -38,6 +39,7 @@ func TestClient_XmlLists_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -205,7 +207,17 @@ func TestClient_XmlLists_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -214,7 +226,7 @@ func TestClient_XmlLists_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -413,7 +425,7 @@ func TestClient_XmlLists_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -446,7 +458,7 @@ func TestClient_XmlLists_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go b/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go index 658ea206712..7869ba75f86 100644 --- a/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go +++ b/internal/protocoltest/restxml/api_op_XmlMapsXmlName_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_XmlMapsXmlName_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -99,7 +101,17 @@ func TestClient_XmlMapsXmlName_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -108,7 +120,7 @@ func TestClient_XmlMapsXmlName_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -191,7 +203,7 @@ func TestClient_XmlMapsXmlName_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -224,7 +236,7 @@ func TestClient_XmlMapsXmlName_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlMaps_test.go b/internal/protocoltest/restxml/api_op_XmlMaps_test.go index b3a50deb9a5..55096518f1c 100644 --- a/internal/protocoltest/restxml/api_op_XmlMaps_test.go +++ b/internal/protocoltest/restxml/api_op_XmlMaps_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_XmlMaps_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -99,7 +101,17 @@ func TestClient_XmlMaps_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -108,7 +120,7 @@ func TestClient_XmlMaps_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -191,7 +203,7 @@ func TestClient_XmlMaps_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -224,7 +236,7 @@ func TestClient_XmlMaps_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go b/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go index 492f5944c92..8b16f4ba2fe 100644 --- a/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go +++ b/internal/protocoltest/restxml/api_op_XmlNamespaces_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_XmlNamespaces_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -91,7 +93,17 @@ func TestClient_XmlNamespaces_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -100,7 +112,7 @@ func TestClient_XmlNamespaces_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -175,7 +187,7 @@ func TestClient_XmlNamespaces_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -208,7 +220,7 @@ func TestClient_XmlNamespaces_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go b/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go index 50b2da71342..5b9c5cf606d 100644 --- a/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go +++ b/internal/protocoltest/restxml/api_op_XmlTimestamps_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_XmlTimestamps_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -136,7 +138,17 @@ func TestClient_XmlTimestamps_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -145,7 +157,7 @@ func TestClient_XmlTimestamps_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -253,7 +265,7 @@ func TestClient_XmlTimestamps_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -286,7 +298,7 @@ func TestClient_XmlTimestamps_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxml/api_op_XmlUnions_test.go b/internal/protocoltest/restxml/api_op_XmlUnions_test.go index 0f8223fc1b1..ad966c5fb1f 100644 --- a/internal/protocoltest/restxml/api_op_XmlUnions_test.go +++ b/internal/protocoltest/restxml/api_op_XmlUnions_test.go @@ -21,6 +21,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -36,6 +37,7 @@ func TestClient_XmlUnions_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -164,7 +166,17 @@ func TestClient_XmlUnions_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -173,7 +185,7 @@ func TestClient_XmlUnions_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -309,7 +321,7 @@ func TestClient_XmlUnions_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -342,7 +354,7 @@ func TestClient_XmlUnions_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go b/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go index a214c4bcfdc..7f77379543d 100644 --- a/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go +++ b/internal/protocoltest/restxmlwithnamespace/api_op_SimpleScalarProperties_test.go @@ -20,6 +20,7 @@ import ( "math" "net/http" "net/http/httptest" + "net/url" "strconv" "testing" ) @@ -35,6 +36,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { ExpectHeader http.Header RequireHeader []string ForbidHeader []string + Host *url.URL BodyMediaType string BodyAssert func(io.Reader) error }{ @@ -100,7 +102,17 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { w.WriteHeader(200) })) defer server.Close() - url := server.URL + serverURL := server.URL + 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 { @@ -109,7 +121,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlSerialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), @@ -193,7 +205,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlDeserialize(t *testing.T) { } for name, c := range cases { t.Run(name, func(t *testing.T) { - url := "http://localhost:8888/" + serverURL := "http://localhost:8888/" client := New(Options{ HTTPClient: smithyhttp.ClientDoFunc(func(r *http.Request) (*http.Response, error) { headers := http.Header{} @@ -226,7 +238,7 @@ func TestClient_SimpleScalarProperties_awsRestxmlDeserialize(t *testing.T) { }, }, EndpointResolver: EndpointResolverFunc(func(region string, options EndpointResolverOptions) (e aws.Endpoint, err error) { - e.URL = url + e.URL = serverURL e.SigningRegion = "us-west-2" return e, err }), diff --git a/service/acm/serializers.go b/service/acm/serializers.go index 0d1fcd8aa35..5fa92fef139 100644 --- a/service/acm/serializers.go +++ b/service/acm/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToCertificate) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpDeleteCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDescribeCertificate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpExportCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpGetAccountConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -266,7 +307,15 @@ func (m *awsAwsjson11_serializeOpGetCertificate) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -313,7 +362,15 @@ func (m *awsAwsjson11_serializeOpImportCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -360,7 +417,15 @@ func (m *awsAwsjson11_serializeOpListCertificates) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -407,7 +472,15 @@ func (m *awsAwsjson11_serializeOpListTagsForCertificate) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -454,7 +527,15 @@ func (m *awsAwsjson11_serializeOpPutAccountConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -501,7 +582,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromCertificate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -548,7 +637,15 @@ func (m *awsAwsjson11_serializeOpRenewCertificate) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -595,7 +692,15 @@ func (m *awsAwsjson11_serializeOpRequestCertificate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -642,7 +747,15 @@ func (m *awsAwsjson11_serializeOpResendValidationEmail) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -689,7 +802,15 @@ func (m *awsAwsjson11_serializeOpUpdateCertificateOptions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/acmpca/serializers.go b/service/acmpca/serializers.go index f2649bd0fbc..112a95997be 100644 --- a/service/acmpca/serializers.go +++ b/service/acmpca/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateCertificateAuthority struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateCertificateAuthority) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateCertificateAuthorityAuditReport) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreatePermission) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDeleteCertificateAuthority) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeletePermission) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeletePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeCertificateAuthority) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDescribeCertificateAuthorityAuditReport) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpGetCertificate) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpGetCertificateAuthorityCertificate) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetCertificateAuthorityCsr) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpGetPolicy) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpImportCertificateAuthorityCertificate) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpIssueCertificate) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpListCertificateAuthorities) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpListPermissions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpPutPolicy) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpRestoreCertificateAuthority) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpRevokeCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpTagCertificateAuthority) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpUntagCertificateAuthority) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpUpdateCertificateAuthority) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/alexaforbusiness/serializers.go b/service/alexaforbusiness/serializers.go index 8a65a430f4a..1026fb63170 100644 --- a/service/alexaforbusiness/serializers.go +++ b/service/alexaforbusiness/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpApproveSkill struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpApproveSkill) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAssociateContactWithAddressBook) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpAssociateDeviceWithNetworkProfile) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpAssociateDeviceWithRoom) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpAssociateSkillGroupWithRoom) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpAssociateSkillWithSkillGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpAssociateSkillWithUsers) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateAddressBook) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateBusinessReportSchedule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateConferenceProvider) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpCreateContact) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpCreateGatewayGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpCreateNetworkProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpCreateProfile) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpCreateRoom) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpCreateSkillGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDeleteAddressBook) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDeleteBusinessReportSchedule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDeleteConferenceProvider) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDeleteContact) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDeleteDevice) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDeleteDeviceUsageData) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpDeleteGatewayGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpDeleteNetworkProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpDeleteProfile) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpDeleteRoom) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpDeleteRoomSkillParameter) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpDeleteSkillAuthorization) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpDeleteSkillGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpDisassociateContactFromAddressBook) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpDisassociateDeviceFromRoom) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpDisassociateSkillFromSkillGroup) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpDisassociateSkillFromUsers) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpDisassociateSkillGroupFromRoom) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpForgetSmartHomeAppliances) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpGetAddressBook) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpGetConferencePreference) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpGetConferenceProvider) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpGetContact) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpGetDevice) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpGetGateway) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpGetGatewayGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpGetInvitationConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpGetNetworkProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpGetProfile) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpGetRoom) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpGetRoomSkillParameter) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpGetSkillGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpListBusinessReportSchedules) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpListConferenceProviders) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpListDeviceEvents) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpListGatewayGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpListGateways) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpListSkills) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpListSkillsStoreCategories) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpListSkillsStoreSkillsByCategory) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpListSmartHomeAppliances) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpPutConferencePreference) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpPutInvitationConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpPutRoomSkillParameter) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2996,7 +3501,15 @@ func (m *awsAwsjson11_serializeOpPutSkillAuthorization) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3043,7 +3556,15 @@ func (m *awsAwsjson11_serializeOpRegisterAVSDevice) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3090,7 +3611,15 @@ func (m *awsAwsjson11_serializeOpRejectSkill) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3137,7 +3666,15 @@ func (m *awsAwsjson11_serializeOpResolveRoom) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3184,7 +3721,15 @@ func (m *awsAwsjson11_serializeOpRevokeInvitation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3231,7 +3776,15 @@ func (m *awsAwsjson11_serializeOpSearchAddressBooks) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3278,7 +3831,15 @@ func (m *awsAwsjson11_serializeOpSearchContacts) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3325,7 +3886,15 @@ func (m *awsAwsjson11_serializeOpSearchDevices) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3372,7 +3941,15 @@ func (m *awsAwsjson11_serializeOpSearchNetworkProfiles) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3419,7 +3996,15 @@ func (m *awsAwsjson11_serializeOpSearchProfiles) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3466,7 +4051,15 @@ func (m *awsAwsjson11_serializeOpSearchRooms) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3513,7 +4106,15 @@ func (m *awsAwsjson11_serializeOpSearchSkillGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3560,7 +4161,15 @@ func (m *awsAwsjson11_serializeOpSearchUsers) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3607,7 +4216,15 @@ func (m *awsAwsjson11_serializeOpSendAnnouncement) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3654,7 +4271,15 @@ func (m *awsAwsjson11_serializeOpSendInvitation) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3701,7 +4326,15 @@ func (m *awsAwsjson11_serializeOpStartDeviceSync) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3748,7 +4381,15 @@ func (m *awsAwsjson11_serializeOpStartSmartHomeApplianceDiscovery) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3795,7 +4436,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3842,7 +4491,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3889,7 +4546,15 @@ func (m *awsAwsjson11_serializeOpUpdateAddressBook) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3936,7 +4601,15 @@ func (m *awsAwsjson11_serializeOpUpdateBusinessReportSchedule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3983,7 +4656,15 @@ func (m *awsAwsjson11_serializeOpUpdateConferenceProvider) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4030,7 +4711,15 @@ func (m *awsAwsjson11_serializeOpUpdateContact) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4077,7 +4766,15 @@ func (m *awsAwsjson11_serializeOpUpdateDevice) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4124,7 +4821,15 @@ func (m *awsAwsjson11_serializeOpUpdateGateway) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4171,7 +4876,15 @@ func (m *awsAwsjson11_serializeOpUpdateGatewayGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4218,7 +4931,15 @@ func (m *awsAwsjson11_serializeOpUpdateNetworkProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4265,7 +4986,15 @@ func (m *awsAwsjson11_serializeOpUpdateProfile) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4312,7 +5041,15 @@ func (m *awsAwsjson11_serializeOpUpdateRoom) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4359,7 +5096,15 @@ func (m *awsAwsjson11_serializeOpUpdateSkillGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/applicationautoscaling/serializers.go b/service/applicationautoscaling/serializers.go index ab97861ce9c..68137ecc94a 100644 --- a/service/applicationautoscaling/serializers.go +++ b/service/applicationautoscaling/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpDeleteScalingPolicy struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpDeleteScalingPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpDeleteScheduledAction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpDeregisterScalableTarget) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpDescribeScalableTargets) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpDescribeScalingActivities) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpDescribeScalingPolicies) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpDescribeScheduledActions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpPutScalingPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpPutScheduledAction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpRegisterScalableTarget) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/applicationdiscoveryservice/serializers.go b/service/applicationdiscoveryservice/serializers.go index fd71cd5ee9b..764b3e1afac 100644 --- a/service/applicationdiscoveryservice/serializers.go +++ b/service/applicationdiscoveryservice/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpAssociateConfigurationItemsToApplication) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteImportData) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpCreateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpCreateTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplications) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpDeleteTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpDescribeAgents) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpDescribeConfigurations) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpDescribeContinuousExports) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDescribeExportConfigurations) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDescribeExportTasks) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDescribeImportTasks) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDescribeTags) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDisassociateConfigurationItemsFromApplication) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpExportConfigurations) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -737,7 +858,15 @@ func (m *awsAwsjson11_serializeOpGetDiscoverySummary) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -784,7 +913,15 @@ func (m *awsAwsjson11_serializeOpListConfigurations) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -831,7 +968,15 @@ func (m *awsAwsjson11_serializeOpListServerNeighbors) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -878,7 +1023,15 @@ func (m *awsAwsjson11_serializeOpStartContinuousExport) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -925,7 +1078,15 @@ func (m *awsAwsjson11_serializeOpStartDataCollectionByAgentIds) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -972,7 +1133,15 @@ func (m *awsAwsjson11_serializeOpStartExportTask) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1019,7 +1188,15 @@ func (m *awsAwsjson11_serializeOpStartImportTask) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1066,7 +1243,15 @@ func (m *awsAwsjson11_serializeOpStopContinuousExport) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1113,7 +1298,15 @@ func (m *awsAwsjson11_serializeOpStopDataCollectionByAgentIds) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1160,7 +1353,15 @@ func (m *awsAwsjson11_serializeOpUpdateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/applicationinsights/serializers.go b/service/applicationinsights/serializers.go index 6e5b50e0350..f1ba7a23c70 100644 --- a/service/applicationinsights/serializers.go +++ b/service/applicationinsights/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateApplication struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateComponent) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateLogPattern) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteComponent) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeleteLogPattern) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDescribeApplication) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDescribeComponent) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDescribeComponentConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDescribeComponentConfigurationRecommendation) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDescribeLogPattern) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDescribeObservation) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDescribeProblem) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDescribeProblemObservations) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListApplications) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpListComponents) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpListConfigurationHistory) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpListLogPatterns) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpListLogPatternSets) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpListProblems) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpUpdateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpUpdateComponent) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpUpdateComponentConfiguration) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpUpdateLogPattern) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/apprunner/serializers.go b/service/apprunner/serializers.go index 6dc6de6a526..7702efe6097 100644 --- a/service/apprunner/serializers.go +++ b/service/apprunner/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpAssociateCustomDomain struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpAssociateCustomDomain) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpCreateAutoScalingConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpCreateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpDeleteAutoScalingConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpDeleteService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpDescribeAutoScalingConfiguration) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson10_serializeOpDescribeCustomDomains) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson10_serializeOpDescribeService) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson10_serializeOpDisassociateCustomDomain) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson10_serializeOpListAutoScalingConfigurations) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson10_serializeOpListConnections) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson10_serializeOpListOperations) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson10_serializeOpListServices) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson10_serializeOpPauseService) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson10_serializeOpResumeService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson10_serializeOpStartDeployment) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson10_serializeOpUpdateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/appstream/serializers.go b/service/appstream/serializers.go index b271197ae0d..7cff7fe8027 100644 --- a/service/appstream/serializers.go +++ b/service/appstream/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateFleet struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateFleet) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpBatchAssociateUserStack) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpBatchDisassociateUserStack) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCopyImage) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateDirectoryConfig) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateFleet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateImageBuilder) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateImageBuilderStreamingURL) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateStack) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateStreamingURL) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpCreateUpdatedImage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpCreateUsageReportSubscription) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDeleteDirectoryConfig) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDeleteFleet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDeleteImage) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDeleteImageBuilder) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDeleteImagePermissions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDeleteStack) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDeleteUsageReportSubscription) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDescribeDirectoryConfigs) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleets) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpDescribeImageBuilders) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpDescribeImagePermissions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpDescribeImages) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpDescribeSessions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpDescribeStacks) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpDescribeUsageReportSubscriptions) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpDescribeUsers) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserStackAssociations) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpDisableUser) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpDisassociateFleet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpEnableUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpExpireSession) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpListAssociatedFleets) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpListAssociatedStacks) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpStartFleet) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpStartImageBuilder) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpStopFleet) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpStopImageBuilder) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpUpdateDirectoryConfig) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpUpdateFleet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpUpdateImagePermissions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpUpdateStack) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/athena/serializers.go b/service/athena/serializers.go index f034c208858..f4e1c554ab4 100644 --- a/service/athena/serializers.go +++ b/service/athena/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpBatchGetNamedQuery struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpBatchGetNamedQuery) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpBatchGetQueryExecution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateDataCatalog) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateNamedQuery) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreatePreparedStatement) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDeleteDataCatalog) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDeleteNamedQuery) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDeletePreparedStatement) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetDatabase) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpGetDataCatalog) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpGetNamedQuery) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpGetPreparedStatement) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpGetQueryExecution) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpGetQueryResults) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpGetTableMetadata) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpGetWorkGroup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpListDatabases) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpListDataCatalogs) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpListEngineVersions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpListNamedQueries) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpListPreparedStatements) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpListQueryExecutions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpListTableMetadata) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpListWorkGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpStartQueryExecution) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpStopQueryExecution) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpUpdateDataCatalog) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpUpdatePreparedStatement) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpUpdateWorkGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/autoscaling/serializers.go b/service/autoscaling/serializers.go index 95cf8694a50..fd1bbe4c37f 100644 --- a/service/autoscaling/serializers.go +++ b/service/autoscaling/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsquery_serializeOpAttachInstances struct { @@ -37,7 +38,15 @@ func (m *awsAwsquery_serializeOpAttachInstances) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -93,7 +102,15 @@ func (m *awsAwsquery_serializeOpAttachLoadBalancers) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -149,7 +166,15 @@ func (m *awsAwsquery_serializeOpAttachLoadBalancerTargetGroups) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -205,7 +230,15 @@ func (m *awsAwsquery_serializeOpBatchDeleteScheduledAction) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -261,7 +294,15 @@ func (m *awsAwsquery_serializeOpBatchPutScheduledUpdateGroupAction) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +358,15 @@ func (m *awsAwsquery_serializeOpCancelInstanceRefresh) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -373,7 +422,15 @@ func (m *awsAwsquery_serializeOpCompleteLifecycleAction) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -429,7 +486,15 @@ func (m *awsAwsquery_serializeOpCreateAutoScalingGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -485,7 +550,15 @@ func (m *awsAwsquery_serializeOpCreateLaunchConfiguration) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -541,7 +614,15 @@ func (m *awsAwsquery_serializeOpCreateOrUpdateTags) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -597,7 +678,15 @@ func (m *awsAwsquery_serializeOpDeleteAutoScalingGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -653,7 +742,15 @@ func (m *awsAwsquery_serializeOpDeleteLaunchConfiguration) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -709,7 +806,15 @@ func (m *awsAwsquery_serializeOpDeleteLifecycleHook) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -765,7 +870,15 @@ func (m *awsAwsquery_serializeOpDeleteNotificationConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -821,7 +934,15 @@ func (m *awsAwsquery_serializeOpDeletePolicy) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -877,7 +998,15 @@ func (m *awsAwsquery_serializeOpDeleteScheduledAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -933,7 +1062,15 @@ func (m *awsAwsquery_serializeOpDeleteTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -989,7 +1126,15 @@ func (m *awsAwsquery_serializeOpDeleteWarmPool) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1045,7 +1190,15 @@ func (m *awsAwsquery_serializeOpDescribeAccountLimits) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1097,7 +1250,15 @@ func (m *awsAwsquery_serializeOpDescribeAdjustmentTypes) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1149,7 +1310,15 @@ func (m *awsAwsquery_serializeOpDescribeAutoScalingGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1205,7 +1374,15 @@ func (m *awsAwsquery_serializeOpDescribeAutoScalingInstances) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1261,7 +1438,15 @@ func (m *awsAwsquery_serializeOpDescribeAutoScalingNotificationTypes) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1313,7 +1498,15 @@ func (m *awsAwsquery_serializeOpDescribeInstanceRefreshes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1369,7 +1562,15 @@ func (m *awsAwsquery_serializeOpDescribeLaunchConfigurations) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1425,7 +1626,15 @@ func (m *awsAwsquery_serializeOpDescribeLifecycleHooks) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1481,7 +1690,15 @@ func (m *awsAwsquery_serializeOpDescribeLifecycleHookTypes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1533,7 +1750,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancers) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1589,7 +1814,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancerTargetGroups) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1645,7 +1878,15 @@ func (m *awsAwsquery_serializeOpDescribeMetricCollectionTypes) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1697,7 +1938,15 @@ func (m *awsAwsquery_serializeOpDescribeNotificationConfigurations) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1753,7 +2002,15 @@ func (m *awsAwsquery_serializeOpDescribePolicies) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1809,7 +2066,15 @@ func (m *awsAwsquery_serializeOpDescribeScalingActivities) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1865,7 +2130,15 @@ func (m *awsAwsquery_serializeOpDescribeScalingProcessTypes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2190,15 @@ func (m *awsAwsquery_serializeOpDescribeScheduledActions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1973,7 +2254,15 @@ func (m *awsAwsquery_serializeOpDescribeTags) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2029,7 +2318,15 @@ func (m *awsAwsquery_serializeOpDescribeTerminationPolicyTypes) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2081,7 +2378,15 @@ func (m *awsAwsquery_serializeOpDescribeWarmPool) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2137,7 +2442,15 @@ func (m *awsAwsquery_serializeOpDetachInstances) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2193,7 +2506,15 @@ func (m *awsAwsquery_serializeOpDetachLoadBalancers) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2249,7 +2570,15 @@ func (m *awsAwsquery_serializeOpDetachLoadBalancerTargetGroups) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2305,7 +2634,15 @@ func (m *awsAwsquery_serializeOpDisableMetricsCollection) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2361,7 +2698,15 @@ func (m *awsAwsquery_serializeOpEnableMetricsCollection) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2417,7 +2762,15 @@ func (m *awsAwsquery_serializeOpEnterStandby) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2473,7 +2826,15 @@ func (m *awsAwsquery_serializeOpExecutePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2529,7 +2890,15 @@ func (m *awsAwsquery_serializeOpExitStandby) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2585,7 +2954,15 @@ func (m *awsAwsquery_serializeOpGetPredictiveScalingForecast) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2641,7 +3018,15 @@ func (m *awsAwsquery_serializeOpPutLifecycleHook) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2697,7 +3082,15 @@ func (m *awsAwsquery_serializeOpPutNotificationConfiguration) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2753,7 +3146,15 @@ func (m *awsAwsquery_serializeOpPutScalingPolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2809,7 +3210,15 @@ func (m *awsAwsquery_serializeOpPutScheduledUpdateGroupAction) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2865,7 +3274,15 @@ func (m *awsAwsquery_serializeOpPutWarmPool) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2921,7 +3338,15 @@ func (m *awsAwsquery_serializeOpRecordLifecycleActionHeartbeat) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2977,7 +3402,15 @@ func (m *awsAwsquery_serializeOpResumeProcesses) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3033,7 +3466,15 @@ func (m *awsAwsquery_serializeOpSetDesiredCapacity) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3089,7 +3530,15 @@ func (m *awsAwsquery_serializeOpSetInstanceHealth) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3145,7 +3594,15 @@ func (m *awsAwsquery_serializeOpSetInstanceProtection) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3201,7 +3658,15 @@ func (m *awsAwsquery_serializeOpStartInstanceRefresh) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3257,7 +3722,15 @@ func (m *awsAwsquery_serializeOpSuspendProcesses) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3313,7 +3786,15 @@ func (m *awsAwsquery_serializeOpTerminateInstanceInAutoScalingGroup) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3369,7 +3850,15 @@ func (m *awsAwsquery_serializeOpUpdateAutoScalingGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/autoscalingplans/serializers.go b/service/autoscalingplans/serializers.go index 4c09e6470b9..9b83964a9c7 100644 --- a/service/autoscalingplans/serializers.go +++ b/service/autoscalingplans/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateScalingPlan struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpCreateScalingPlan) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpDeleteScalingPlan) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpDescribeScalingPlanResources) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpDescribeScalingPlans) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpGetScalingPlanResourceForecastData) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpUpdateScalingPlan) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/budgets/serializers.go b/service/budgets/serializers.go index 7bd3007c81c..b5a67cd3450 100644 --- a/service/budgets/serializers.go +++ b/service/budgets/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateBudget struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpCreateBudget) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpCreateBudgetAction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpCreateNotification) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpCreateSubscriber) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpDeleteBudget) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpDeleteBudgetAction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpDeleteNotification) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpDeleteSubscriber) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpDescribeBudget) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDescribeBudgetAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDescribeBudgetActionHistories) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDescribeBudgetActionsForAccount) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDescribeBudgetActionsForBudget) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDescribeBudgetPerformanceHistory) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpDescribeBudgets) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpDescribeNotificationsForBudget) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDescribeSubscribersForNotification) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpExecuteBudgetAction) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpUpdateBudget) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpUpdateBudgetAction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpUpdateNotification) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpUpdateSubscriber) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloud9/serializers.go b/service/cloud9/serializers.go index 28b52836868..38fb90e4725 100644 --- a/service/cloud9/serializers.go +++ b/service/cloud9/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateEnvironmentEC2 struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateEnvironmentEC2) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateEnvironmentMembership) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpDeleteEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDeleteEnvironmentMembership) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDescribeEnvironmentMemberships) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDescribeEnvironments) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeEnvironmentStatus) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpListEnvironments) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpUpdateEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpUpdateEnvironmentMembership) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudcontrol/serializers.go b/service/cloudcontrol/serializers.go index 91d5399b2a3..a941f022fd1 100644 --- a/service/cloudcontrol/serializers.go +++ b/service/cloudcontrol/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCancelResourceRequest struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpCancelResourceRequest) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpCreateResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpDeleteResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpGetResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpGetResourceRequestStatus) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpListResourceRequests) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpListResources) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpUpdateResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudformation/serializers.go b/service/cloudformation/serializers.go index 78b5f118251..60841ce525e 100644 --- a/service/cloudformation/serializers.go +++ b/service/cloudformation/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "sort" ) @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpActivateType) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpBatchDescribeTypeConfigurations) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpCancelUpdateStack) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpContinueUpdateRollback) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpCreateChangeSet) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCreateStack) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpCreateStackInstances) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpCreateStackSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpDeactivateType) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpDeleteChangeSet) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpDeleteStack) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpDeleteStackInstances) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpDeleteStackSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpDeregisterType) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpDescribeAccountLimits) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpDescribeChangeSet) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpDescribePublisher) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpDescribeStackDriftDetectionStatus) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpDescribeStackEvents) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpDescribeStackInstance) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpDescribeStackResource) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpDescribeStackResourceDrifts) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1268,7 +1445,15 @@ func (m *awsAwsquery_serializeOpDescribeStackResources) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1324,7 +1509,15 @@ func (m *awsAwsquery_serializeOpDescribeStacks) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1380,7 +1573,15 @@ func (m *awsAwsquery_serializeOpDescribeStackSet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1436,7 +1637,15 @@ func (m *awsAwsquery_serializeOpDescribeStackSetOperation) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1701,15 @@ func (m *awsAwsquery_serializeOpDescribeType) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1548,7 +1765,15 @@ func (m *awsAwsquery_serializeOpDescribeTypeRegistration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1604,7 +1829,15 @@ func (m *awsAwsquery_serializeOpDetectStackDrift) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1660,7 +1893,15 @@ func (m *awsAwsquery_serializeOpDetectStackResourceDrift) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1716,7 +1957,15 @@ func (m *awsAwsquery_serializeOpDetectStackSetDrift) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1772,7 +2021,15 @@ func (m *awsAwsquery_serializeOpEstimateTemplateCost) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1828,7 +2085,15 @@ func (m *awsAwsquery_serializeOpExecuteChangeSet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1884,7 +2149,15 @@ func (m *awsAwsquery_serializeOpGetStackPolicy) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1940,7 +2213,15 @@ func (m *awsAwsquery_serializeOpGetTemplate) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1996,7 +2277,15 @@ func (m *awsAwsquery_serializeOpGetTemplateSummary) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2341,15 @@ func (m *awsAwsquery_serializeOpImportStacksToStackSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2108,7 +2405,15 @@ func (m *awsAwsquery_serializeOpListChangeSets) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2164,7 +2469,15 @@ func (m *awsAwsquery_serializeOpListExports) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2220,7 +2533,15 @@ func (m *awsAwsquery_serializeOpListImports) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2276,7 +2597,15 @@ func (m *awsAwsquery_serializeOpListStackInstances) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2332,7 +2661,15 @@ func (m *awsAwsquery_serializeOpListStackResources) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2388,7 +2725,15 @@ func (m *awsAwsquery_serializeOpListStacks) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2444,7 +2789,15 @@ func (m *awsAwsquery_serializeOpListStackSetOperationResults) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2500,7 +2853,15 @@ func (m *awsAwsquery_serializeOpListStackSetOperations) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2556,7 +2917,15 @@ func (m *awsAwsquery_serializeOpListStackSets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2612,7 +2981,15 @@ func (m *awsAwsquery_serializeOpListTypeRegistrations) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3045,15 @@ func (m *awsAwsquery_serializeOpListTypes) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2724,7 +3109,15 @@ func (m *awsAwsquery_serializeOpListTypeVersions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2780,7 +3173,15 @@ func (m *awsAwsquery_serializeOpPublishType) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2836,7 +3237,15 @@ func (m *awsAwsquery_serializeOpRecordHandlerProgress) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2892,7 +3301,15 @@ func (m *awsAwsquery_serializeOpRegisterPublisher) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2948,7 +3365,15 @@ func (m *awsAwsquery_serializeOpRegisterType) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3004,7 +3429,15 @@ func (m *awsAwsquery_serializeOpRollbackStack) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3060,7 +3493,15 @@ func (m *awsAwsquery_serializeOpSetStackPolicy) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3116,7 +3557,15 @@ func (m *awsAwsquery_serializeOpSetTypeConfiguration) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3172,7 +3621,15 @@ func (m *awsAwsquery_serializeOpSetTypeDefaultVersion) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3228,7 +3685,15 @@ func (m *awsAwsquery_serializeOpSignalResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3284,7 +3749,15 @@ func (m *awsAwsquery_serializeOpStopStackSetOperation) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3340,7 +3813,15 @@ func (m *awsAwsquery_serializeOpTestType) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3396,7 +3877,15 @@ func (m *awsAwsquery_serializeOpUpdateStack) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3452,7 +3941,15 @@ func (m *awsAwsquery_serializeOpUpdateStackInstances) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3508,7 +4005,15 @@ func (m *awsAwsquery_serializeOpUpdateStackSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3564,7 +4069,15 @@ func (m *awsAwsquery_serializeOpUpdateTerminationProtection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3620,7 +4133,15 @@ func (m *awsAwsquery_serializeOpValidateTemplate) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudhsm/serializers.go b/service/cloudhsm/serializers.go index 61db632e622..25678dea562 100644 --- a/service/cloudhsm/serializers.go +++ b/service/cloudhsm/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddTagsToResource struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateHapg) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateHsm) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateLunaClient) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteHapg) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteHsm) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDeleteLunaClient) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDescribeHapg) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDescribeHsm) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeLunaClient) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetConfig) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpListAvailableZones) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpListHapgs) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpListHsms) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpListLunaClients) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpModifyHapg) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpModifyHsm) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpModifyLunaClient) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudhsmv2/serializers.go b/service/cloudhsmv2/serializers.go index 0f3c8cb95cd..fbd88999c9b 100644 --- a/service/cloudhsmv2/serializers.go +++ b/service/cloudhsmv2/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCopyBackupToRegion struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCopyBackupToRegion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateHsm) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDeleteBackup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteHsm) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeBackups) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDescribeClusters) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpInitializeCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpModifyBackupAttributes) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpModifyCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpRestoreBackup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudsearch/serializers.go b/service/cloudsearch/serializers.go index 58a0ef4378b..1e9bc8a7654 100644 --- a/service/cloudsearch/serializers.go +++ b/service/cloudsearch/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsquery_serializeOpBuildSuggesters struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpBuildSuggesters) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpCreateDomain) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpDefineAnalysisScheme) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpDefineExpression) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpDefineIndexField) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpDefineSuggester) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpDeleteAnalysisScheme) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpDeleteDomain) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpDeleteExpression) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpDeleteIndexField) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpDeleteSuggester) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpDescribeAnalysisSchemes) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpDescribeAvailabilityOptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpDescribeDomainEndpointOptions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpDescribeDomains) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpDescribeExpressions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpDescribeIndexFields) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpDescribeScalingParameters) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpDescribeServiceAccessPolicies) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpDescribeSuggesters) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpIndexDocuments) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpListDomainNames) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1264,7 +1441,15 @@ func (m *awsAwsquery_serializeOpUpdateAvailabilityOptions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1320,7 +1505,15 @@ func (m *awsAwsquery_serializeOpUpdateDomainEndpointOptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1376,7 +1569,15 @@ func (m *awsAwsquery_serializeOpUpdateScalingParameters) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1432,7 +1633,15 @@ func (m *awsAwsquery_serializeOpUpdateServiceAccessPolicies) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudtrail/serializers.go b/service/cloudtrail/serializers.go index df69dcf1390..0e6ac3353ac 100644 --- a/service/cloudtrail/serializers.go +++ b/service/cloudtrail/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddTags struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddTags) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateTrail) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDeleteTrail) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrails) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpGetEventSelectors) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpGetInsightSelectors) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpGetTrail) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpGetTrailStatus) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpListPublicKeys) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpListTrails) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpLookupEvents) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpPutEventSelectors) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpPutInsightSelectors) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpRemoveTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpStartLogging) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpStopLogging) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpUpdateTrail) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudwatch/serializers.go b/service/cloudwatch/serializers.go index 0dce7f740c3..ac5dec73d9e 100644 --- a/service/cloudwatch/serializers.go +++ b/service/cloudwatch/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsquery_serializeOpDeleteAlarms struct { @@ -37,7 +38,15 @@ func (m *awsAwsquery_serializeOpDeleteAlarms) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -93,7 +102,15 @@ func (m *awsAwsquery_serializeOpDeleteAnomalyDetector) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -149,7 +166,15 @@ func (m *awsAwsquery_serializeOpDeleteDashboards) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -205,7 +230,15 @@ func (m *awsAwsquery_serializeOpDeleteInsightRules) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -261,7 +294,15 @@ func (m *awsAwsquery_serializeOpDeleteMetricStream) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +358,15 @@ func (m *awsAwsquery_serializeOpDescribeAlarmHistory) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -373,7 +422,15 @@ func (m *awsAwsquery_serializeOpDescribeAlarms) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -429,7 +486,15 @@ func (m *awsAwsquery_serializeOpDescribeAlarmsForMetric) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -485,7 +550,15 @@ func (m *awsAwsquery_serializeOpDescribeAnomalyDetectors) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -541,7 +614,15 @@ func (m *awsAwsquery_serializeOpDescribeInsightRules) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -597,7 +678,15 @@ func (m *awsAwsquery_serializeOpDisableAlarmActions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -653,7 +742,15 @@ func (m *awsAwsquery_serializeOpDisableInsightRules) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -709,7 +806,15 @@ func (m *awsAwsquery_serializeOpEnableAlarmActions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -765,7 +870,15 @@ func (m *awsAwsquery_serializeOpEnableInsightRules) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -821,7 +934,15 @@ func (m *awsAwsquery_serializeOpGetDashboard) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -877,7 +998,15 @@ func (m *awsAwsquery_serializeOpGetInsightRuleReport) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -933,7 +1062,15 @@ func (m *awsAwsquery_serializeOpGetMetricData) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -989,7 +1126,15 @@ func (m *awsAwsquery_serializeOpGetMetricStatistics) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1045,7 +1190,15 @@ func (m *awsAwsquery_serializeOpGetMetricStream) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1101,7 +1254,15 @@ func (m *awsAwsquery_serializeOpGetMetricWidgetImage) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1157,7 +1318,15 @@ func (m *awsAwsquery_serializeOpListDashboards) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1213,7 +1382,15 @@ func (m *awsAwsquery_serializeOpListMetrics) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1269,7 +1446,15 @@ func (m *awsAwsquery_serializeOpListMetricStreams) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1325,7 +1510,15 @@ func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1381,7 +1574,15 @@ func (m *awsAwsquery_serializeOpPutAnomalyDetector) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1437,7 +1638,15 @@ func (m *awsAwsquery_serializeOpPutCompositeAlarm) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1702,15 @@ func (m *awsAwsquery_serializeOpPutDashboard) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1549,7 +1766,15 @@ func (m *awsAwsquery_serializeOpPutInsightRule) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1605,7 +1830,15 @@ func (m *awsAwsquery_serializeOpPutMetricAlarm) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1661,7 +1894,15 @@ func (m *awsAwsquery_serializeOpPutMetricData) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1717,7 +1958,15 @@ func (m *awsAwsquery_serializeOpPutMetricStream) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1773,7 +2022,15 @@ func (m *awsAwsquery_serializeOpSetAlarmState) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1829,7 +2086,15 @@ func (m *awsAwsquery_serializeOpStartMetricStreams) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1885,7 +2150,15 @@ func (m *awsAwsquery_serializeOpStopMetricStreams) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1941,7 +2214,15 @@ func (m *awsAwsquery_serializeOpTagResource) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1997,7 +2278,15 @@ func (m *awsAwsquery_serializeOpUntagResource) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudwatchevents/serializers.go b/service/cloudwatchevents/serializers.go index 241a35390e4..20113991819 100644 --- a/service/cloudwatchevents/serializers.go +++ b/service/cloudwatchevents/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpActivateEventSource struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpActivateEventSource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCancelReplay) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateApiDestination) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateArchive) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateEventBus) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreatePartnerEventSource) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeactivateEventSource) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeauthorizeConnection) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteApiDestination) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteArchive) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteEventBus) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeletePartnerEventSource) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeApiDestination) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeArchive) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventBus) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventSource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribePartnerEventSource) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplay) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDescribeRule) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDisableRule) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpEnableRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListApiDestinations) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListArchives) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListConnections) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListEventBuses) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListEventSources) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListPartnerEventSourceAccounts) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListPartnerEventSources) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListReplays) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListRuleNamesByTarget) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListRules) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpListTargetsByRule) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpPutEvents) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpPutPartnerEvents) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpPutPermission) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpPutRule) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpPutTargets) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpRemovePermission) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpRemoveTargets) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpStartReplay) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpTestEventPattern) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpUpdateApiDestination) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpUpdateArchive) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpUpdateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cloudwatchlogs/serializers.go b/service/cloudwatchlogs/serializers.go index fe1c0b6021c..af65d40aa67 100644 --- a/service/cloudwatchlogs/serializers.go +++ b/service/cloudwatchlogs/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAssociateKmsKey struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateKmsKey) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCancelExportTask) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateExportTask) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateLogGroup) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateLogStream) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeleteDestination) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteLogGroup) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteLogStream) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteMetricFilter) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteQueryDefinition) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteRetentionPolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteSubscriptionFilter) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDescribeDestinations) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDescribeExportTasks) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeLogGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeLogStreams) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeMetricFilters) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeQueries) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeQueryDefinitions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribeResourcePolicies) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribeSubscriptionFilters) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDisassociateKmsKey) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpFilterLogEvents) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpGetLogEvents) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpGetLogGroupFields) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpGetLogRecord) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpGetQueryResults) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListTagsLogGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpPutDestination) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpPutDestinationPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpPutLogEvents) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpPutMetricFilter) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpPutQueryDefinition) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpPutRetentionPolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpPutSubscriptionFilter) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpStartQuery) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpStopQuery) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpTagLogGroup) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpTestMetricFilter) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpUntagLogGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/codebuild/serializers.go b/service/codebuild/serializers.go index 99f5ceb27fe..6c2b8bad47f 100644 --- a/service/codebuild/serializers.go +++ b/service/codebuild/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpBatchDeleteBuilds struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteBuilds) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpBatchGetBuildBatches) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpBatchGetBuilds) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpBatchGetProjects) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpBatchGetReportGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpBatchGetReports) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateReportGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateWebhook) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteBuildBatch) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteReport) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteReportGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteSourceCredentials) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteWebhook) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeCodeCoverages) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeTestCases) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpGetReportGroupTrend) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGetResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpImportSourceCredentials) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpInvalidateProjectCache) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpListBuildBatches) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpListBuildBatchesForProject) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpListBuilds) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListBuildsForProject) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListCuratedEnvironmentImages) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListProjects) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListReportGroups) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListReports) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListReportsForReportGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListSharedProjects) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListSharedReportGroups) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListSourceCredentials) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpRetryBuild) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpRetryBuildBatch) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpStartBuild) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpStartBuildBatch) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpStopBuild) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpStopBuildBatch) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpUpdateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpUpdateProjectVisibility) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpUpdateReportGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpUpdateWebhook) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/codecommit/serializers.go b/service/codecommit/serializers.go index ac3775115a3..4b8b031b13d 100644 --- a/service/codecommit/serializers.go +++ b/service/codecommit/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateApprovalRuleTemplateWithRepository struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateApprovalRuleTemplateWithRepository) Ha return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpBatchAssociateApprovalRuleTemplateWithRepositor return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpBatchDescribeMergeConflicts) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpBatchDisassociateApprovalRuleTemplateFromReposi return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpBatchGetCommits) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpBatchGetRepositories) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateApprovalRuleTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateBranch) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateCommit) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreatePullRequest) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpCreatePullRequestApprovalRule) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpCreateRepository) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpCreateUnreferencedMergeCommit) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDeleteApprovalRuleTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDeleteBranch) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDeleteCommentContent) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDeleteFile) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDeletePullRequestApprovalRule) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDeleteRepository) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDescribeMergeConflicts) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDescribePullRequestEvents) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDisassociateApprovalRuleTemplateFromRepository) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpEvaluatePullRequestApprovalRules) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpGetApprovalRuleTemplate) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpGetBlob) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpGetBranch) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpGetComment) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpGetCommentReactions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpGetCommentsForComparedCommit) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpGetCommentsForPullRequest) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpGetCommit) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpGetDifferences) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpGetFile) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpGetFolder) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpGetMergeCommit) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpGetMergeConflicts) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpGetMergeOptions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpGetPullRequest) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpGetPullRequestApprovalStates) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpGetPullRequestOverrideState) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpGetRepository) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpGetRepositoryTriggers) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpListApprovalRuleTemplates) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpListAssociatedApprovalRuleTemplatesForRepositor return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpListBranches) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpListPullRequests) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpListRepositories) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpListRepositoriesForApprovalRuleTemplate) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpMergeBranchesByFastForward) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpMergeBranchesBySquash) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpMergeBranchesByThreeWay) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpMergePullRequestByFastForward) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpMergePullRequestBySquash) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpMergePullRequestByThreeWay) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpOverridePullRequestApprovalRules) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpPostCommentForComparedCommit) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpPostCommentForPullRequest) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpPostCommentReply) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpPutCommentReaction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpPutFile) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpPutRepositoryTriggers) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2996,7 +3501,15 @@ func (m *awsAwsjson11_serializeOpTestRepositoryTriggers) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3043,7 +3556,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3090,7 +3611,15 @@ func (m *awsAwsjson11_serializeOpUpdateApprovalRuleTemplateContent) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3137,7 +3666,15 @@ func (m *awsAwsjson11_serializeOpUpdateApprovalRuleTemplateDescription) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3184,7 +3721,15 @@ func (m *awsAwsjson11_serializeOpUpdateApprovalRuleTemplateName) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3231,7 +3776,15 @@ func (m *awsAwsjson11_serializeOpUpdateComment) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3278,7 +3831,15 @@ func (m *awsAwsjson11_serializeOpUpdateDefaultBranch) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3325,7 +3886,15 @@ func (m *awsAwsjson11_serializeOpUpdatePullRequestApprovalRuleContent) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3372,7 +3941,15 @@ func (m *awsAwsjson11_serializeOpUpdatePullRequestApprovalState) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3419,7 +3996,15 @@ func (m *awsAwsjson11_serializeOpUpdatePullRequestDescription) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3466,7 +4051,15 @@ func (m *awsAwsjson11_serializeOpUpdatePullRequestStatus) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3513,7 +4106,15 @@ func (m *awsAwsjson11_serializeOpUpdatePullRequestTitle) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3560,7 +4161,15 @@ func (m *awsAwsjson11_serializeOpUpdateRepositoryDescription) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3607,7 +4216,15 @@ func (m *awsAwsjson11_serializeOpUpdateRepositoryName) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/codedeploy/serializers.go b/service/codedeploy/serializers.go index 5fc525ac5be..9ae01ca7d58 100644 --- a/service/codedeploy/serializers.go +++ b/service/codedeploy/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddTagsToOnPremisesInstances struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToOnPremisesInstances) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpBatchGetApplicationRevisions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpBatchGetApplications) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpBatchGetDeploymentGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpBatchGetDeploymentInstances) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpBatchGetDeployments) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpBatchGetDeploymentTargets) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpBatchGetOnPremisesInstances) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpContinueDeployment) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpCreateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpCreateDeployment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpCreateDeploymentConfig) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpCreateDeploymentGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteDeploymentConfig) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteDeploymentGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDeleteGitHubAccountToken) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourcesByExternalId) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDeregisterOnPremisesInstance) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGetApplication) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpGetApplicationRevision) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpGetDeployment) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpGetDeploymentConfig) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpGetDeploymentGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpGetDeploymentInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpGetDeploymentTarget) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpGetOnPremisesInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListApplicationRevisions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListApplications) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListDeploymentConfigs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListDeploymentGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListDeploymentInstances) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListDeployments) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListDeploymentTargets) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListGitHubAccountTokenNames) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpListOnPremisesInstances) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpPutLifecycleEventHookExecutionStatus) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpRegisterApplicationRevision) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpRegisterOnPremisesInstance) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromOnPremisesInstances) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpSkipWaitTimeForInstanceTermination) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpStopDeployment) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpUpdateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpUpdateDeploymentGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/codepipeline/serializers.go b/service/codepipeline/serializers.go index a8bcab97c34..18786d08f60 100644 --- a/service/codepipeline/serializers.go +++ b/service/codepipeline/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAcknowledgeJob struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAcknowledgeJob) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAcknowledgeThirdPartyJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateCustomActionType) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreatePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteCustomActionType) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeletePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteWebhook) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeregisterWebhookWithThirdParty) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDisableStageTransition) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpEnableStageTransition) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpGetActionType) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpGetJobDetails) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpGetPipeline) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpGetPipelineExecution) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpGetPipelineState) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpGetThirdPartyJobDetails) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpListActionExecutions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpListActionTypes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpListPipelineExecutions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpListPipelines) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpListWebhooks) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpPollForJobs) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpPollForThirdPartyJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpPutActionRevision) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpPutApprovalResult) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpPutJobFailureResult) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpPutJobSuccessResult) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpPutThirdPartyJobFailureResult) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpPutThirdPartyJobSuccessResult) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpPutWebhook) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpRegisterWebhookWithThirdParty) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpRetryStageExecution) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpStartPipelineExecution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpStopPipelineExecution) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpUpdateActionType) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpUpdatePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/codestar/serializers.go b/service/codestar/serializers.go index 652c2fe71c6..68830a92740 100644 --- a/service/codestar/serializers.go +++ b/service/codestar/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateTeamMember struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateTeamMember) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDeleteProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDescribeProject) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserProfile) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDisassociateTeamMember) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpListProjects) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpListResources) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpListTagsForProject) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpListTeamMembers) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpListUserProfiles) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpTagProject) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpUntagProject) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpUpdateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpUpdateTeamMember) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/codestarconnections/serializers.go b/service/codestarconnections/serializers.go index 308cf188863..f1da79591a3 100644 --- a/service/codestarconnections/serializers.go +++ b/service/codestarconnections/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCreateConnection struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpCreateHost) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpDeleteHost) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpGetConnection) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpGetHost) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpListConnections) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpListHosts) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson10_serializeOpUpdateHost) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cognitoidentity/serializers.go b/service/cognitoidentity/serializers.go index 0ff9dfb7ca7..61d6fefed18 100644 --- a/service/cognitoidentity/serializers.go +++ b/service/cognitoidentity/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateIdentityPool struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateIdentityPool) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpDeleteIdentities) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpDeleteIdentityPool) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDescribeIdentity) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDescribeIdentityPool) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpGetCredentialsForIdentity) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpGetId) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpGetIdentityPoolRoles) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpGetOpenIdToken) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpGetOpenIdTokenForDeveloperIdentity) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetPrincipalTagAttributeMap) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpListIdentities) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpListIdentityPools) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpLookupDeveloperIdentity) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpMergeDeveloperIdentities) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpSetIdentityPoolRoles) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpSetPrincipalTagAttributeMap) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpUnlinkDeveloperIdentity) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpUnlinkIdentity) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpUpdateIdentityPool) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/cognitoidentityprovider/serializers.go b/service/cognitoidentityprovider/serializers.go index 4754465d293..7b6c84d2aec 100644 --- a/service/cognitoidentityprovider/serializers.go +++ b/service/cognitoidentityprovider/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddCustomAttributes struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAddCustomAttributes) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAdminAddUserToGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpAdminConfirmSignUp) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpAdminCreateUser) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpAdminDeleteUser) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpAdminDeleteUserAttributes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpAdminDisableProviderForUser) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpAdminDisableUser) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpAdminEnableUser) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpAdminForgetDevice) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpAdminGetDevice) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpAdminGetUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpAdminInitiateAuth) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpAdminLinkProviderForUser) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpAdminListDevices) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpAdminListGroupsForUser) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpAdminListUserAuthEvents) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpAdminRemoveUserFromGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpAdminResetUserPassword) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpAdminRespondToAuthChallenge) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpAdminSetUserMFAPreference) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpAdminSetUserPassword) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpAdminSetUserSettings) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpAdminUpdateAuthEventFeedback) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpAdminUpdateDeviceStatus) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpAdminUpdateUserAttributes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpAdminUserGlobalSignOut) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpAssociateSoftwareToken) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpChangePassword) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpConfirmDevice) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpConfirmForgotPassword) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpConfirmSignUp) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpCreateGroup) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpCreateIdentityProvider) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpCreateResourceServer) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpCreateUserImportJob) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpCreateUserPool) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpCreateUserPoolClient) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpCreateUserPoolDomain) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpDeleteGroup) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpDeleteIdentityProvider) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourceServer) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserAttributes) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserPool) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolClient) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserPoolDomain) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpDescribeIdentityProvider) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpDescribeResourceServer) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpDescribeRiskConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserImportJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserPool) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserPoolClient) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserPoolDomain) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpForgetDevice) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpForgotPassword) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpGetCSVHeader) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpGetDevice) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpGetGroup) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpGetIdentityProviderByIdentifier) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpGetSigningCertificate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpGetUICustomization) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpGetUser) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2996,7 +3501,15 @@ func (m *awsAwsjson11_serializeOpGetUserAttributeVerificationCode) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3043,7 +3556,15 @@ func (m *awsAwsjson11_serializeOpGetUserPoolMfaConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3090,7 +3611,15 @@ func (m *awsAwsjson11_serializeOpGlobalSignOut) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3137,7 +3666,15 @@ func (m *awsAwsjson11_serializeOpInitiateAuth) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3184,7 +3721,15 @@ func (m *awsAwsjson11_serializeOpListDevices) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3231,7 +3776,15 @@ func (m *awsAwsjson11_serializeOpListGroups) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3278,7 +3831,15 @@ func (m *awsAwsjson11_serializeOpListIdentityProviders) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3325,7 +3886,15 @@ func (m *awsAwsjson11_serializeOpListResourceServers) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3372,7 +3941,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3419,7 +3996,15 @@ func (m *awsAwsjson11_serializeOpListUserImportJobs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3466,7 +4051,15 @@ func (m *awsAwsjson11_serializeOpListUserPoolClients) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3513,7 +4106,15 @@ func (m *awsAwsjson11_serializeOpListUserPools) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3560,7 +4161,15 @@ func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3607,7 +4216,15 @@ func (m *awsAwsjson11_serializeOpListUsersInGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3654,7 +4271,15 @@ func (m *awsAwsjson11_serializeOpResendConfirmationCode) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3701,7 +4326,15 @@ func (m *awsAwsjson11_serializeOpRespondToAuthChallenge) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3748,7 +4381,15 @@ func (m *awsAwsjson11_serializeOpRevokeToken) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3795,7 +4436,15 @@ func (m *awsAwsjson11_serializeOpSetRiskConfiguration) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3842,7 +4491,15 @@ func (m *awsAwsjson11_serializeOpSetUICustomization) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3889,7 +4546,15 @@ func (m *awsAwsjson11_serializeOpSetUserMFAPreference) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3936,7 +4601,15 @@ func (m *awsAwsjson11_serializeOpSetUserPoolMfaConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3983,7 +4656,15 @@ func (m *awsAwsjson11_serializeOpSetUserSettings) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4030,7 +4711,15 @@ func (m *awsAwsjson11_serializeOpSignUp) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4077,7 +4766,15 @@ func (m *awsAwsjson11_serializeOpStartUserImportJob) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4124,7 +4821,15 @@ func (m *awsAwsjson11_serializeOpStopUserImportJob) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4171,7 +4876,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4218,7 +4931,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4265,7 +4986,15 @@ func (m *awsAwsjson11_serializeOpUpdateAuthEventFeedback) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4312,7 +5041,15 @@ func (m *awsAwsjson11_serializeOpUpdateDeviceStatus) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4359,7 +5096,15 @@ func (m *awsAwsjson11_serializeOpUpdateGroup) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4406,7 +5151,15 @@ func (m *awsAwsjson11_serializeOpUpdateIdentityProvider) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4453,7 +5206,15 @@ func (m *awsAwsjson11_serializeOpUpdateResourceServer) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4500,7 +5261,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserAttributes) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4547,7 +5316,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserPool) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4594,7 +5371,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserPoolClient) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4641,7 +5426,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserPoolDomain) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4688,7 +5481,15 @@ func (m *awsAwsjson11_serializeOpVerifySoftwareToken) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4735,7 +5536,15 @@ func (m *awsAwsjson11_serializeOpVerifyUserAttribute) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/comprehend/serializers.go b/service/comprehend/serializers.go index e314b76c184..9c6c065ea95 100644 --- a/service/comprehend/serializers.go +++ b/service/comprehend/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpBatchDetectDominantLanguage struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpBatchDetectDominantLanguage) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpBatchDetectEntities) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpBatchDetectKeyPhrases) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpBatchDetectSentiment) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpBatchDetectSyntax) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpClassifyDocument) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpContainsPiiEntities) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateDocumentClassifier) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpCreateEntityRecognizer) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteDocumentClassifier) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteEntityRecognizer) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDescribeDocumentClassificationJob) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDescribeDocumentClassifier) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeDominantLanguageDetectionJob) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeEndpoint) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeEntitiesDetectionJob) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeEntityRecognizer) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventsDetectionJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribeKeyPhrasesDetectionJob) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribePiiEntitiesDetectionJob) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDescribeSentimentDetectionJob) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDescribeTopicsDetectionJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDetectDominantLanguage) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDetectEntities) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDetectKeyPhrases) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpDetectPiiEntities) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpDetectSentiment) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpDetectSyntax) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListDocumentClassificationJobs) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListDocumentClassifiers) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListDocumentClassifierSummaries) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListDominantLanguageDetectionJobs) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListEndpoints) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpListEntitiesDetectionJobs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpListEntityRecognizers) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpListEntityRecognizerSummaries) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpListEventsDetectionJobs) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpListKeyPhrasesDetectionJobs) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpListPiiEntitiesDetectionJobs) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpListSentimentDetectionJobs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpListTopicsDetectionJobs) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpStartDocumentClassificationJob) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpStartDominantLanguageDetectionJob) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpStartEntitiesDetectionJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpStartEventsDetectionJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpStartKeyPhrasesDetectionJob) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpStartPiiEntitiesDetectionJob) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpStartSentimentDetectionJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2433,7 +2842,15 @@ func (m *awsAwsjson11_serializeOpStartTopicsDetectionJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2480,7 +2897,15 @@ func (m *awsAwsjson11_serializeOpStopDominantLanguageDetectionJob) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2527,7 +2952,15 @@ func (m *awsAwsjson11_serializeOpStopEntitiesDetectionJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2574,7 +3007,15 @@ func (m *awsAwsjson11_serializeOpStopEventsDetectionJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2621,7 +3062,15 @@ func (m *awsAwsjson11_serializeOpStopKeyPhrasesDetectionJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3117,15 @@ func (m *awsAwsjson11_serializeOpStopPiiEntitiesDetectionJob) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2715,7 +3172,15 @@ func (m *awsAwsjson11_serializeOpStopSentimentDetectionJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2762,7 +3227,15 @@ func (m *awsAwsjson11_serializeOpStopTrainingDocumentClassifier) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2809,7 +3282,15 @@ func (m *awsAwsjson11_serializeOpStopTrainingEntityRecognizer) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2856,7 +3337,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2903,7 +3392,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2950,7 +3447,15 @@ func (m *awsAwsjson11_serializeOpUpdateEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/comprehendmedical/serializers.go b/service/comprehendmedical/serializers.go index 6b1c29b655d..225af302a9e 100644 --- a/service/comprehendmedical/serializers.go +++ b/service/comprehendmedical/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpDescribeEntitiesDetectionV2Job struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpDescribeEntitiesDetectionV2Job) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpDescribeICD10CMInferenceJob) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDescribePHIDetectionJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDescribeRxNormInferenceJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDetectEntities) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDetectEntitiesV2) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDetectPHI) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpInferICD10CM) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpInferRxNorm) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpListEntitiesDetectionV2Jobs) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpListICD10CMInferenceJobs) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpListPHIDetectionJobs) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpListRxNormInferenceJobs) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpStartEntitiesDetectionV2Job) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpStartICD10CMInferenceJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpStartPHIDetectionJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpStartRxNormInferenceJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpStopEntitiesDetectionV2Job) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpStopICD10CMInferenceJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpStopPHIDetectionJob) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpStopRxNormInferenceJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/computeoptimizer/serializers.go b/service/computeoptimizer/serializers.go index b70ccbc86e5..bba5391ff42 100644 --- a/service/computeoptimizer/serializers.go +++ b/service/computeoptimizer/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpDescribeRecommendationExportJobs struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson10_serializeOpDescribeRecommendationExportJobs) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson10_serializeOpExportAutoScalingGroupRecommendations) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson10_serializeOpExportEBSVolumeRecommendations) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson10_serializeOpExportEC2InstanceRecommendations) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson10_serializeOpExportLambdaFunctionRecommendations) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson10_serializeOpGetAutoScalingGroupRecommendations) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson10_serializeOpGetEBSVolumeRecommendations) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson10_serializeOpGetEC2InstanceRecommendations) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson10_serializeOpGetEC2RecommendationProjectedMetrics) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson10_serializeOpGetEnrollmentStatus) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson10_serializeOpGetEnrollmentStatusesForOrganization) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson10_serializeOpGetLambdaFunctionRecommendations) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson10_serializeOpGetRecommendationSummaries) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson10_serializeOpUpdateEnrollmentStatus) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/configservice/serializers.go b/service/configservice/serializers.go index 5146ea802aa..c56a73a0dae 100644 --- a/service/configservice/serializers.go +++ b/service/configservice/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpBatchGetAggregateResourceConfig) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpBatchGetResourceConfig) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpDeleteAggregationAuthorization) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpDeleteConfigRule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpDeleteConfigurationAggregator) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpDeleteConfigurationRecorder) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpDeleteConformancePack) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpDeleteDeliveryChannel) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpDeleteEvaluationResults) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDeleteOrganizationConfigRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDeleteOrganizationConformancePack) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDeletePendingAggregationRequest) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDeleteRemediationConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDeleteRemediationExceptions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourceConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpDeleteRetentionConfiguration) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDeleteStoredQuery) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpDeliverConfigSnapshot) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpDescribeAggregateComplianceByConfigRules) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpDescribeAggregateComplianceByConformancePacks) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpDescribeAggregationAuthorizations) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpDescribeComplianceByConfigRule) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpDescribeComplianceByResource) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpDescribeConfigRuleEvaluationStatus) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpDescribeConfigRules) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpDescribeConfigurationAggregators) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpDescribeConfigurationAggregatorSourcesStatus) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpDescribeConfigurationRecorders) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpDescribeConfigurationRecorderStatus) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpDescribeConformancePackCompliance) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpDescribeConformancePacks) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpDescribeConformancePackStatus) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpDescribeDeliveryChannels) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpDescribeDeliveryChannelStatus) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrganizationConfigRules) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrganizationConfigRuleStatuses) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrganizationConformancePacks) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrganizationConformancePackStatuses) Ha return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpDescribePendingAggregationRequests) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpDescribeRemediationConfigurations) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpDescribeRemediationExceptions) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpDescribeRemediationExecutionStatus) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpDescribeRetentionConfigurations) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpGetAggregateComplianceDetailsByConfigRule) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpGetAggregateConfigRuleComplianceSummary) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpGetAggregateConformancePackComplianceSummary) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpGetAggregateDiscoveredResourceCounts) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpGetAggregateResourceConfig) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpGetComplianceDetailsByConfigRule) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpGetComplianceDetailsByResource) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpGetComplianceSummaryByConfigRule) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2429,7 +2838,15 @@ func (m *awsAwsjson11_serializeOpGetComplianceSummaryByResourceType) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2476,7 +2893,15 @@ func (m *awsAwsjson11_serializeOpGetConformancePackComplianceDetails) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2523,7 +2948,15 @@ func (m *awsAwsjson11_serializeOpGetConformancePackComplianceSummary) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2570,7 +3003,15 @@ func (m *awsAwsjson11_serializeOpGetDiscoveredResourceCounts) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2617,7 +3058,15 @@ func (m *awsAwsjson11_serializeOpGetOrganizationConfigRuleDetailedStatus) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2664,7 +3113,15 @@ func (m *awsAwsjson11_serializeOpGetOrganizationConformancePackDetailedStatus) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2711,7 +3168,15 @@ func (m *awsAwsjson11_serializeOpGetResourceConfigHistory) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2758,7 +3223,15 @@ func (m *awsAwsjson11_serializeOpGetStoredQuery) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2805,7 +3278,15 @@ func (m *awsAwsjson11_serializeOpListAggregateDiscoveredResources) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2852,7 +3333,15 @@ func (m *awsAwsjson11_serializeOpListDiscoveredResources) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2899,7 +3388,15 @@ func (m *awsAwsjson11_serializeOpListStoredQueries) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2946,7 +3443,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2993,7 +3498,15 @@ func (m *awsAwsjson11_serializeOpPutAggregationAuthorization) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3040,7 +3553,15 @@ func (m *awsAwsjson11_serializeOpPutConfigRule) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3087,7 +3608,15 @@ func (m *awsAwsjson11_serializeOpPutConfigurationAggregator) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3134,7 +3663,15 @@ func (m *awsAwsjson11_serializeOpPutConfigurationRecorder) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3181,7 +3718,15 @@ func (m *awsAwsjson11_serializeOpPutConformancePack) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3228,7 +3773,15 @@ func (m *awsAwsjson11_serializeOpPutDeliveryChannel) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3275,7 +3828,15 @@ func (m *awsAwsjson11_serializeOpPutEvaluations) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3322,7 +3883,15 @@ func (m *awsAwsjson11_serializeOpPutExternalEvaluation) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3369,7 +3938,15 @@ func (m *awsAwsjson11_serializeOpPutOrganizationConfigRule) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3416,7 +3993,15 @@ func (m *awsAwsjson11_serializeOpPutOrganizationConformancePack) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3463,7 +4048,15 @@ func (m *awsAwsjson11_serializeOpPutRemediationConfigurations) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3510,7 +4103,15 @@ func (m *awsAwsjson11_serializeOpPutRemediationExceptions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3557,7 +4158,15 @@ func (m *awsAwsjson11_serializeOpPutResourceConfig) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3604,7 +4213,15 @@ func (m *awsAwsjson11_serializeOpPutRetentionConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3651,7 +4268,15 @@ func (m *awsAwsjson11_serializeOpPutStoredQuery) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3698,7 +4323,15 @@ func (m *awsAwsjson11_serializeOpSelectAggregateResourceConfig) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3745,7 +4378,15 @@ func (m *awsAwsjson11_serializeOpSelectResourceConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3792,7 +4433,15 @@ func (m *awsAwsjson11_serializeOpStartConfigRulesEvaluation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3839,7 +4488,15 @@ func (m *awsAwsjson11_serializeOpStartConfigurationRecorder) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3886,7 +4543,15 @@ func (m *awsAwsjson11_serializeOpStartRemediationExecution) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3933,7 +4598,15 @@ func (m *awsAwsjson11_serializeOpStopConfigurationRecorder) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3980,7 +4653,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4027,7 +4708,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/costandusagereportservice/serializers.go b/service/costandusagereportservice/serializers.go index be9cae94495..9d9ffa4c54a 100644 --- a/service/costandusagereportservice/serializers.go +++ b/service/costandusagereportservice/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpDeleteReportDefinition struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpDeleteReportDefinition) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpDescribeReportDefinitions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpModifyReportDefinition) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpPutReportDefinition) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/costexplorer/serializers.go b/service/costexplorer/serializers.go index a3a3dbdd6f4..cd87d48eb09 100644 --- a/service/costexplorer/serializers.go +++ b/service/costexplorer/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateAnomalyMonitor struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateAnomalyMonitor) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateAnomalySubscription) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateCostCategoryDefinition) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDeleteAnomalyMonitor) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteAnomalySubscription) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeleteCostCategoryDefinition) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDescribeCostCategoryDefinition) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpGetAnomalies) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpGetAnomalyMonitors) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpGetAnomalySubscriptions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpGetCostAndUsage) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpGetCostAndUsageWithResources) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpGetCostCategories) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpGetCostForecast) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpGetDimensionValues) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpGetReservationCoverage) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpGetReservationPurchaseRecommendation) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpGetReservationUtilization) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpGetRightsizingRecommendation) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGetSavingsPlansCoverage) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpGetSavingsPlansPurchaseRecommendation) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpGetSavingsPlansUtilization) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpGetSavingsPlansUtilizationDetails) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpGetTags) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpGetUsageForecast) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListCostCategoryDefinitions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpProvideAnomalyFeedback) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpUpdateAnomalyMonitor) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpUpdateAnomalySubscription) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpUpdateCostCategoryDefinition) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/databasemigrationservice/serializers.go b/service/databasemigrationservice/serializers.go index e1df33b1e5a..0f18a392f48 100644 --- a/service/databasemigrationservice/serializers.go +++ b/service/databasemigrationservice/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddTagsToResource struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpApplyPendingMaintenanceAction) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCancelReplicationTaskAssessmentRun) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateEventSubscription) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateReplicationInstance) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateReplicationSubnetGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateReplicationTask) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteEventSubscription) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteReplicationInstance) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteReplicationSubnetGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteReplicationTask) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteReplicationTaskAssessmentRun) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccountAttributes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeApplicableIndividualAssessments) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeCertificates) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnections) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribeEndpoints) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribeEndpointSettings) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDescribeEndpointTypes) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventCategories) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDescribeEvents) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventSubscriptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrderableReplicationInstances) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpDescribePendingMaintenanceActions) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpDescribeRefreshSchemasStatus) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplicationInstances) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplicationInstanceTaskLogs) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplicationSubnetGroups) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplicationTaskAssessmentResults) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplicationTaskAssessmentRuns) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplicationTaskIndividualAssessments) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplicationTasks) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpDescribeSchemas) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpDescribeTableStatistics) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpImportCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpModifyEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpModifyEventSubscription) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpModifyReplicationInstance) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpModifyReplicationSubnetGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpModifyReplicationTask) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpMoveReplicationTask) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpRebootReplicationInstance) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpRefreshSchemas) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpReloadTables) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpStartReplicationTask) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2433,7 +2842,15 @@ func (m *awsAwsjson11_serializeOpStartReplicationTaskAssessment) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2480,7 +2897,15 @@ func (m *awsAwsjson11_serializeOpStartReplicationTaskAssessmentRun) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2527,7 +2952,15 @@ func (m *awsAwsjson11_serializeOpStopReplicationTask) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2574,7 +3007,15 @@ func (m *awsAwsjson11_serializeOpTestConnection) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/datapipeline/serializers.go b/service/datapipeline/serializers.go index 4437ac12a82..b2b181557f0 100644 --- a/service/datapipeline/serializers.go +++ b/service/datapipeline/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpActivatePipeline struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpActivatePipeline) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAddTags) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreatePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDeactivatePipeline) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeletePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDescribeObjects) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDescribePipelines) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpEvaluateExpression) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpGetPipelineDefinition) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpListPipelines) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpPollForTask) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpPutPipelineDefinition) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpQueryObjects) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpRemoveTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpReportTaskProgress) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpReportTaskRunnerHeartbeat) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpSetStatus) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpSetTaskStatus) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpValidatePipelineDefinition) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/datasync/serializers.go b/service/datasync/serializers.go index 6d66c36d29d..fdeacfd8364 100644 --- a/service/datasync/serializers.go +++ b/service/datasync/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCancelTaskExecution struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCancelTaskExecution) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateAgent) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateLocationEfs) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateLocationFsxWindows) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateLocationHdfs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateLocationNfs) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateLocationObjectStorage) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateLocationS3) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateLocationSmb) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateTask) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDeleteAgent) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDeleteLocation) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDeleteTask) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDescribeAgent) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocationEfs) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocationFsxWindows) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocationHdfs) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocationNfs) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocationObjectStorage) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocationS3) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocationSmb) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDescribeTask) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDescribeTaskExecution) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpListAgents) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpListLocations) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpListTaskExecutions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpListTasks) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpStartTaskExecution) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpUpdateAgent) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpUpdateLocationHdfs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpUpdateLocationNfs) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpUpdateLocationObjectStorage) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpUpdateLocationSmb) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpUpdateTask) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpUpdateTaskExecution) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/dax/serializers.go b/service/dax/serializers.go index 882e795c9d2..2a7f0f96f8e 100644 --- a/service/dax/serializers.go +++ b/service/dax/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateCluster struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateSubnetGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDecreaseReplicationFactor) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeleteParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteSubnetGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDescribeClusters) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDescribeDefaultParameters) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDescribeEvents) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDescribeParameterGroups) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDescribeParameters) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDescribeSubnetGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpIncreaseReplicationFactor) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpRebootNode) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpUpdateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpUpdateParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpUpdateSubnetGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/devicefarm/serializers.go b/service/devicefarm/serializers.go index fe520b088c8..6bf724f9b39 100644 --- a/service/devicefarm/serializers.go +++ b/service/devicefarm/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateDevicePool struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpCreateDevicePool) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpCreateInstanceProfile) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpCreateNetworkProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpCreateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpCreateRemoteAccessSession) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpCreateTestGridProject) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpCreateTestGridUrl) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpCreateUpload) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpCreateVPCEConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDeleteDevicePool) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDeleteInstanceProfile) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDeleteNetworkProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDeleteProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDeleteRemoteAccessSession) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpDeleteRun) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpDeleteTestGridProject) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDeleteUpload) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpDeleteVPCEConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpGetAccountSettings) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpGetDevice) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpGetDeviceInstance) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpGetDevicePool) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpGetDevicePoolCompatibility) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpGetInstanceProfile) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpGetJob) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpGetNetworkProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpGetOfferingStatus) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpGetProject) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpGetRemoteAccessSession) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpGetRun) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpGetSuite) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpGetTest) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpGetTestGridProject) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpGetTestGridSession) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpGetUpload) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpGetVPCEConfiguration) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpInstallToRemoteAccessSession) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpListArtifacts) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpListDeviceInstances) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpListDevicePools) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpListDevices) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpListInstanceProfiles) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpListJobs) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpListNetworkProfiles) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpListOfferingPromotions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpListOfferings) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpListOfferingTransactions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpListProjects) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpListRemoteAccessSessions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpListRuns) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpListSamples) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2434,7 +2843,15 @@ func (m *awsAwsjson11_serializeOpListSuites) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2481,7 +2898,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2528,7 +2953,15 @@ func (m *awsAwsjson11_serializeOpListTestGridProjects) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2575,7 +3008,15 @@ func (m *awsAwsjson11_serializeOpListTestGridSessionActions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2622,7 +3063,15 @@ func (m *awsAwsjson11_serializeOpListTestGridSessionArtifacts) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2669,7 +3118,15 @@ func (m *awsAwsjson11_serializeOpListTestGridSessions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2716,7 +3173,15 @@ func (m *awsAwsjson11_serializeOpListTests) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2763,7 +3228,15 @@ func (m *awsAwsjson11_serializeOpListUniqueProblems) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2810,7 +3283,15 @@ func (m *awsAwsjson11_serializeOpListUploads) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2857,7 +3338,15 @@ func (m *awsAwsjson11_serializeOpListVPCEConfigurations) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2904,7 +3393,15 @@ func (m *awsAwsjson11_serializeOpPurchaseOffering) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2951,7 +3448,15 @@ func (m *awsAwsjson11_serializeOpRenewOffering) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2998,7 +3503,15 @@ func (m *awsAwsjson11_serializeOpScheduleRun) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3045,7 +3558,15 @@ func (m *awsAwsjson11_serializeOpStopJob) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3092,7 +3613,15 @@ func (m *awsAwsjson11_serializeOpStopRemoteAccessSession) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3139,7 +3668,15 @@ func (m *awsAwsjson11_serializeOpStopRun) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3186,7 +3723,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3233,7 +3778,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3280,7 +3833,15 @@ func (m *awsAwsjson11_serializeOpUpdateDeviceInstance) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3327,7 +3888,15 @@ func (m *awsAwsjson11_serializeOpUpdateDevicePool) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3374,7 +3943,15 @@ func (m *awsAwsjson11_serializeOpUpdateInstanceProfile) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3421,7 +3998,15 @@ func (m *awsAwsjson11_serializeOpUpdateNetworkProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3468,7 +4053,15 @@ func (m *awsAwsjson11_serializeOpUpdateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3515,7 +4108,15 @@ func (m *awsAwsjson11_serializeOpUpdateTestGridProject) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3562,7 +4163,15 @@ func (m *awsAwsjson11_serializeOpUpdateUpload) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3609,7 +4218,15 @@ func (m *awsAwsjson11_serializeOpUpdateVPCEConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/directconnect/serializers.go b/service/directconnect/serializers.go index 9c073e56200..2570e3ed825 100644 --- a/service/directconnect/serializers.go +++ b/service/directconnect/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAcceptDirectConnectGatewayAssociationProposal) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAllocateConnectionOnInterconnect) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpAllocateHostedConnection) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpAllocatePrivateVirtualInterface) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpAllocatePublicVirtualInterface) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpAllocateTransitVirtualInterface) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpAssociateConnectionWithLag) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpAssociateHostedConnection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpAssociateMacSecKey) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpAssociateVirtualInterface) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpConfirmConnection) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpConfirmCustomerAgreement) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpConfirmPrivateVirtualInterface) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpConfirmPublicVirtualInterface) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpConfirmTransitVirtualInterface) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpCreateBGPPeer) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpCreateDirectConnectGateway) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpCreateDirectConnectGatewayAssociation) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpCreateDirectConnectGatewayAssociationProposal) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpCreateInterconnect) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpCreateLag) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpCreatePrivateVirtualInterface) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpCreatePublicVirtualInterface) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpCreateTransitVirtualInterface) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDeleteBGPPeer) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpDeleteDirectConnectGateway) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpDeleteDirectConnectGatewayAssociation) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpDeleteDirectConnectGatewayAssociationProposal) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpDeleteInterconnect) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpDeleteLag) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpDeleteVirtualInterface) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnectionLoa) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnections) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnectionsOnInterconnect) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpDescribeCustomerMetadata) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1770,7 +2067,15 @@ func (m *awsAwsjson11_serializeOpDescribeDirectConnectGatewayAssociationProposal return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1817,7 +2122,15 @@ func (m *awsAwsjson11_serializeOpDescribeDirectConnectGatewayAssociations) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1864,7 +2177,15 @@ func (m *awsAwsjson11_serializeOpDescribeDirectConnectGatewayAttachments) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1911,7 +2232,15 @@ func (m *awsAwsjson11_serializeOpDescribeDirectConnectGateways) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1958,7 +2287,15 @@ func (m *awsAwsjson11_serializeOpDescribeHostedConnections) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2005,7 +2342,15 @@ func (m *awsAwsjson11_serializeOpDescribeInterconnectLoa) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2397,15 @@ func (m *awsAwsjson11_serializeOpDescribeInterconnects) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2099,7 +2452,15 @@ func (m *awsAwsjson11_serializeOpDescribeLags) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2146,7 +2507,15 @@ func (m *awsAwsjson11_serializeOpDescribeLoa) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2193,7 +2562,15 @@ func (m *awsAwsjson11_serializeOpDescribeLocations) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2235,7 +2612,15 @@ func (m *awsAwsjson11_serializeOpDescribeRouterConfiguration) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2282,7 +2667,15 @@ func (m *awsAwsjson11_serializeOpDescribeTags) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2329,7 +2722,15 @@ func (m *awsAwsjson11_serializeOpDescribeVirtualGateways) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2371,7 +2772,15 @@ func (m *awsAwsjson11_serializeOpDescribeVirtualInterfaces) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2418,7 +2827,15 @@ func (m *awsAwsjson11_serializeOpDisassociateConnectionFromLag) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2465,7 +2882,15 @@ func (m *awsAwsjson11_serializeOpDisassociateMacSecKey) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2512,7 +2937,15 @@ func (m *awsAwsjson11_serializeOpListVirtualInterfaceTestHistory) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2559,7 +2992,15 @@ func (m *awsAwsjson11_serializeOpStartBgpFailoverTest) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2606,7 +3047,15 @@ func (m *awsAwsjson11_serializeOpStopBgpFailoverTest) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2653,7 +3102,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2700,7 +3157,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2747,7 +3212,15 @@ func (m *awsAwsjson11_serializeOpUpdateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2794,7 +3267,15 @@ func (m *awsAwsjson11_serializeOpUpdateDirectConnectGateway) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2841,7 +3322,15 @@ func (m *awsAwsjson11_serializeOpUpdateDirectConnectGatewayAssociation) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2888,7 +3377,15 @@ func (m *awsAwsjson11_serializeOpUpdateLag) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2935,7 +3432,15 @@ func (m *awsAwsjson11_serializeOpUpdateVirtualInterfaceAttributes) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/directoryservice/serializers.go b/service/directoryservice/serializers.go index 0863bb95b24..bab0abdc25e 100644 --- a/service/directoryservice/serializers.go +++ b/service/directoryservice/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAcceptSharedDirectory struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAcceptSharedDirectory) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAddIpRoutes) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpAddRegion) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCancelSchemaExtension) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpConnectDirectory) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateComputer) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateConditionalForwarder) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateDirectory) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpCreateLogSubscription) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpCreateMicrosoftAD) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpCreateSnapshot) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpCreateTrust) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDeleteConditionalForwarder) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDeleteDirectory) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDeleteLogSubscription) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDeleteSnapshot) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDeleteTrust) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDeregisterCertificate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDeregisterEventTopic) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDescribeCertificate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDescribeClientAuthenticationSettings) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpDescribeConditionalForwarders) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpDescribeDirectories) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpDescribeDomainControllers) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventTopics) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpDescribeLDAPSSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpDescribeRegions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpDescribeSharedDirectories) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpDescribeSnapshots) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrusts) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpDisableClientAuthentication) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpDisableLDAPS) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpDisableRadius) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpDisableSso) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpEnableClientAuthentication) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpEnableLDAPS) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpEnableRadius) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpEnableSso) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpGetDirectoryLimits) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpGetSnapshotLimits) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpListCertificates) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpListIpRoutes) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpListLogSubscriptions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpListSchemaExtensions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpRegisterCertificate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpRegisterEventTopic) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpRejectSharedDirectory) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpRemoveIpRoutes) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpRemoveRegion) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpResetUserPassword) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpRestoreFromSnapshot) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpShareDirectory) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpStartSchemaExtension) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpUnshareDirectory) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpUpdateConditionalForwarder) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpUpdateNumberOfDomainControllers) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpUpdateRadius) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpUpdateTrust) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpVerifyTrust) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/docdb/serializers.go b/service/docdb/serializers.go index 036de8bb633..76b9dd26198 100644 --- a/service/docdb/serializers.go +++ b/service/docdb/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAddSourceIdentifierToSubscription struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAddSourceIdentifierToSubscription) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpAddTagsToResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpApplyPendingMaintenanceAction) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpCopyDBClusterParameterGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpCopyDBClusterSnapshot) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCreateDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpCreateDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpCreateDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpCreateEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpCreateGlobalCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpDeleteDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpDeleteDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpDeleteDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpDeleteEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpDeleteGlobalCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpDescribeCertificates) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterParameterGroups) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterParameters) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1268,7 +1445,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusters) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1324,7 +1509,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1380,7 +1573,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshots) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1436,7 +1637,15 @@ func (m *awsAwsquery_serializeOpDescribeDBEngineVersions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1701,15 @@ func (m *awsAwsquery_serializeOpDescribeDBInstances) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1548,7 +1765,15 @@ func (m *awsAwsquery_serializeOpDescribeDBSubnetGroups) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1604,7 +1829,15 @@ func (m *awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1660,7 +1893,15 @@ func (m *awsAwsquery_serializeOpDescribeEventCategories) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1716,7 +1957,15 @@ func (m *awsAwsquery_serializeOpDescribeEvents) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1772,7 +2021,15 @@ func (m *awsAwsquery_serializeOpDescribeEventSubscriptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1828,7 +2085,15 @@ func (m *awsAwsquery_serializeOpDescribeGlobalClusters) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1884,7 +2149,15 @@ func (m *awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1940,7 +2213,15 @@ func (m *awsAwsquery_serializeOpDescribePendingMaintenanceActions) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1996,7 +2277,15 @@ func (m *awsAwsquery_serializeOpFailoverDBCluster) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2341,15 @@ func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2108,7 +2405,15 @@ func (m *awsAwsquery_serializeOpModifyDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2164,7 +2469,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2220,7 +2533,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2276,7 +2597,15 @@ func (m *awsAwsquery_serializeOpModifyDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2332,7 +2661,15 @@ func (m *awsAwsquery_serializeOpModifyDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2388,7 +2725,15 @@ func (m *awsAwsquery_serializeOpModifyEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2444,7 +2789,15 @@ func (m *awsAwsquery_serializeOpModifyGlobalCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2500,7 +2853,15 @@ func (m *awsAwsquery_serializeOpRebootDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2556,7 +2917,15 @@ func (m *awsAwsquery_serializeOpRemoveFromGlobalCluster) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2612,7 +2981,15 @@ func (m *awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3045,15 @@ func (m *awsAwsquery_serializeOpRemoveTagsFromResource) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2724,7 +3109,15 @@ func (m *awsAwsquery_serializeOpResetDBClusterParameterGroup) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2780,7 +3173,15 @@ func (m *awsAwsquery_serializeOpRestoreDBClusterFromSnapshot) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2836,7 +3237,15 @@ func (m *awsAwsquery_serializeOpRestoreDBClusterToPointInTime) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2892,7 +3301,15 @@ func (m *awsAwsquery_serializeOpStartDBCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2948,7 +3365,15 @@ func (m *awsAwsquery_serializeOpStopDBCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/dynamodb/serializers.go b/service/dynamodb/serializers.go index f870abd40d7..f1f1b2174a1 100644 --- a/service/dynamodb/serializers.go +++ b/service/dynamodb/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson10_serializeOpBatchExecuteStatement struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson10_serializeOpBatchExecuteStatement) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson10_serializeOpBatchGetItem) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson10_serializeOpBatchWriteItem) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson10_serializeOpCreateBackup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson10_serializeOpCreateGlobalTable) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson10_serializeOpCreateTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson10_serializeOpDeleteBackup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson10_serializeOpDeleteItem) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson10_serializeOpDeleteTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson10_serializeOpDescribeBackup) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson10_serializeOpDescribeContinuousBackups) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson10_serializeOpDescribeContributorInsights) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson10_serializeOpDescribeEndpoints) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson10_serializeOpDescribeExport) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson10_serializeOpDescribeGlobalTable) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson10_serializeOpDescribeGlobalTableSettings) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson10_serializeOpDescribeKinesisStreamingDestination) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson10_serializeOpDescribeLimits) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson10_serializeOpDescribeTable) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson10_serializeOpDescribeTableReplicaAutoScaling) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson10_serializeOpDescribeTimeToLive) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson10_serializeOpDisableKinesisStreamingDestination) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson10_serializeOpEnableKinesisStreamingDestination) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson10_serializeOpExecuteStatement) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson10_serializeOpExecuteTransaction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson10_serializeOpExportTableToPointInTime) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson10_serializeOpGetItem) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson10_serializeOpListBackups) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson10_serializeOpListContributorInsights) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson10_serializeOpListExports) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson10_serializeOpListGlobalTables) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson10_serializeOpListTables) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson10_serializeOpListTagsOfResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson10_serializeOpPutItem) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson10_serializeOpQuery) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson10_serializeOpRestoreTableFromBackup) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson10_serializeOpRestoreTableToPointInTime) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson10_serializeOpScan) HandleSerialize(ctx context.Context, in m return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson10_serializeOpTransactGetItems) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson10_serializeOpTransactWriteItems) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson10_serializeOpUpdateContinuousBackups) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson10_serializeOpUpdateContributorInsights) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson10_serializeOpUpdateGlobalTable) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson10_serializeOpUpdateGlobalTableSettings) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson10_serializeOpUpdateItem) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson10_serializeOpUpdateTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson10_serializeOpUpdateTableReplicaAutoScaling) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson10_serializeOpUpdateTimeToLive) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/dynamodbstreams/serializers.go b/service/dynamodbstreams/serializers.go index eef45cb68cb..f03e04e66d7 100644 --- a/service/dynamodbstreams/serializers.go +++ b/service/dynamodbstreams/serializers.go @@ -11,6 +11,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpDescribeStream struct { @@ -34,7 +35,15 @@ func (m *awsAwsjson10_serializeOpDescribeStream) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -81,7 +90,15 @@ func (m *awsAwsjson10_serializeOpGetRecords) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -128,7 +145,15 @@ func (m *awsAwsjson10_serializeOpGetShardIterator) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -175,7 +200,15 @@ func (m *awsAwsjson10_serializeOpListStreams) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index a68a7a57b8a..dc045fb8d7c 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote struct { @@ -37,7 +38,15 @@ func (m *awsEc2query_serializeOpAcceptReservedInstancesExchangeQuote) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -93,7 +102,15 @@ func (m *awsEc2query_serializeOpAcceptTransitGatewayMulticastDomainAssociations) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -149,7 +166,15 @@ func (m *awsEc2query_serializeOpAcceptTransitGatewayPeeringAttachment) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -205,7 +230,15 @@ func (m *awsEc2query_serializeOpAcceptTransitGatewayVpcAttachment) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -261,7 +294,15 @@ func (m *awsEc2query_serializeOpAcceptVpcEndpointConnections) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +358,15 @@ func (m *awsEc2query_serializeOpAcceptVpcPeeringConnection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -373,7 +422,15 @@ func (m *awsEc2query_serializeOpAdvertiseByoipCidr) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -429,7 +486,15 @@ func (m *awsEc2query_serializeOpAllocateAddress) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -485,7 +550,15 @@ func (m *awsEc2query_serializeOpAllocateHosts) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -541,7 +614,15 @@ func (m *awsEc2query_serializeOpApplySecurityGroupsToClientVpnTargetNetwork) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -597,7 +678,15 @@ func (m *awsEc2query_serializeOpAssignIpv6Addresses) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -653,7 +742,15 @@ func (m *awsEc2query_serializeOpAssignPrivateIpAddresses) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -709,7 +806,15 @@ func (m *awsEc2query_serializeOpAssociateAddress) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -765,7 +870,15 @@ func (m *awsEc2query_serializeOpAssociateClientVpnTargetNetwork) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -821,7 +934,15 @@ func (m *awsEc2query_serializeOpAssociateDhcpOptions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -877,7 +998,15 @@ func (m *awsEc2query_serializeOpAssociateEnclaveCertificateIamRole) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -933,7 +1062,15 @@ func (m *awsEc2query_serializeOpAssociateIamInstanceProfile) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -989,7 +1126,15 @@ func (m *awsEc2query_serializeOpAssociateInstanceEventWindow) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1045,7 +1190,15 @@ func (m *awsEc2query_serializeOpAssociateRouteTable) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1101,7 +1254,15 @@ func (m *awsEc2query_serializeOpAssociateSubnetCidrBlock) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1157,7 +1318,15 @@ func (m *awsEc2query_serializeOpAssociateTransitGatewayMulticastDomain) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1213,7 +1382,15 @@ func (m *awsEc2query_serializeOpAssociateTransitGatewayRouteTable) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1269,7 +1446,15 @@ func (m *awsEc2query_serializeOpAssociateTrunkInterface) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1325,7 +1510,15 @@ func (m *awsEc2query_serializeOpAssociateVpcCidrBlock) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1381,7 +1574,15 @@ func (m *awsEc2query_serializeOpAttachClassicLinkVpc) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1437,7 +1638,15 @@ func (m *awsEc2query_serializeOpAttachInternetGateway) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1702,15 @@ func (m *awsEc2query_serializeOpAttachNetworkInterface) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1549,7 +1766,15 @@ func (m *awsEc2query_serializeOpAttachVolume) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1605,7 +1830,15 @@ func (m *awsEc2query_serializeOpAttachVpnGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1661,7 +1894,15 @@ func (m *awsEc2query_serializeOpAuthorizeClientVpnIngress) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1717,7 +1958,15 @@ func (m *awsEc2query_serializeOpAuthorizeSecurityGroupEgress) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1773,7 +2022,15 @@ func (m *awsEc2query_serializeOpAuthorizeSecurityGroupIngress) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1829,7 +2086,15 @@ func (m *awsEc2query_serializeOpBundleInstance) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1885,7 +2150,15 @@ func (m *awsEc2query_serializeOpCancelBundleTask) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1941,7 +2214,15 @@ func (m *awsEc2query_serializeOpCancelCapacityReservation) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1997,7 +2278,15 @@ func (m *awsEc2query_serializeOpCancelCapacityReservationFleets) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2053,7 +2342,15 @@ func (m *awsEc2query_serializeOpCancelConversionTask) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2109,7 +2406,15 @@ func (m *awsEc2query_serializeOpCancelExportTask) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2165,7 +2470,15 @@ func (m *awsEc2query_serializeOpCancelImportTask) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2221,7 +2534,15 @@ func (m *awsEc2query_serializeOpCancelReservedInstancesListing) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2277,7 +2598,15 @@ func (m *awsEc2query_serializeOpCancelSpotFleetRequests) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2333,7 +2662,15 @@ func (m *awsEc2query_serializeOpCancelSpotInstanceRequests) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2389,7 +2726,15 @@ func (m *awsEc2query_serializeOpConfirmProductInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2445,7 +2790,15 @@ func (m *awsEc2query_serializeOpCopyFpgaImage) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2501,7 +2854,15 @@ func (m *awsEc2query_serializeOpCopyImage) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2557,7 +2918,15 @@ func (m *awsEc2query_serializeOpCopySnapshot) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2613,7 +2982,15 @@ func (m *awsEc2query_serializeOpCreateCapacityReservation) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2669,7 +3046,15 @@ func (m *awsEc2query_serializeOpCreateCapacityReservationFleet) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2725,7 +3110,15 @@ func (m *awsEc2query_serializeOpCreateCarrierGateway) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2781,7 +3174,15 @@ func (m *awsEc2query_serializeOpCreateClientVpnEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2837,7 +3238,15 @@ func (m *awsEc2query_serializeOpCreateClientVpnRoute) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2893,7 +3302,15 @@ func (m *awsEc2query_serializeOpCreateCustomerGateway) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3366,15 @@ func (m *awsEc2query_serializeOpCreateDefaultSubnet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3005,7 +3430,15 @@ func (m *awsEc2query_serializeOpCreateDefaultVpc) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3061,7 +3494,15 @@ func (m *awsEc2query_serializeOpCreateDhcpOptions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3117,7 +3558,15 @@ func (m *awsEc2query_serializeOpCreateEgressOnlyInternetGateway) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3173,7 +3622,15 @@ func (m *awsEc2query_serializeOpCreateFleet) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3229,7 +3686,15 @@ func (m *awsEc2query_serializeOpCreateFlowLogs) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3285,7 +3750,15 @@ func (m *awsEc2query_serializeOpCreateFpgaImage) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3341,7 +3814,15 @@ func (m *awsEc2query_serializeOpCreateImage) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3397,7 +3878,15 @@ func (m *awsEc2query_serializeOpCreateInstanceEventWindow) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3453,7 +3942,15 @@ func (m *awsEc2query_serializeOpCreateInstanceExportTask) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3509,7 +4006,15 @@ func (m *awsEc2query_serializeOpCreateInternetGateway) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3565,7 +4070,15 @@ func (m *awsEc2query_serializeOpCreateKeyPair) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3621,7 +4134,15 @@ func (m *awsEc2query_serializeOpCreateLaunchTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3677,7 +4198,15 @@ func (m *awsEc2query_serializeOpCreateLaunchTemplateVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3733,7 +4262,15 @@ func (m *awsEc2query_serializeOpCreateLocalGatewayRoute) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3789,7 +4326,15 @@ func (m *awsEc2query_serializeOpCreateLocalGatewayRouteTableVpcAssociation) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3845,7 +4390,15 @@ func (m *awsEc2query_serializeOpCreateManagedPrefixList) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3901,7 +4454,15 @@ func (m *awsEc2query_serializeOpCreateNatGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3957,7 +4518,15 @@ func (m *awsEc2query_serializeOpCreateNetworkAcl) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4013,7 +4582,15 @@ func (m *awsEc2query_serializeOpCreateNetworkAclEntry) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4069,7 +4646,15 @@ func (m *awsEc2query_serializeOpCreateNetworkInsightsPath) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4125,7 +4710,15 @@ func (m *awsEc2query_serializeOpCreateNetworkInterface) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4181,7 +4774,15 @@ func (m *awsEc2query_serializeOpCreateNetworkInterfacePermission) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4237,7 +4838,15 @@ func (m *awsEc2query_serializeOpCreatePlacementGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4293,7 +4902,15 @@ func (m *awsEc2query_serializeOpCreateReplaceRootVolumeTask) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4349,7 +4966,15 @@ func (m *awsEc2query_serializeOpCreateReservedInstancesListing) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4405,7 +5030,15 @@ func (m *awsEc2query_serializeOpCreateRestoreImageTask) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4461,7 +5094,15 @@ func (m *awsEc2query_serializeOpCreateRoute) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4517,7 +5158,15 @@ func (m *awsEc2query_serializeOpCreateRouteTable) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4573,7 +5222,15 @@ func (m *awsEc2query_serializeOpCreateSecurityGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4629,7 +5286,15 @@ func (m *awsEc2query_serializeOpCreateSnapshot) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4685,7 +5350,15 @@ func (m *awsEc2query_serializeOpCreateSnapshots) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4741,7 +5414,15 @@ func (m *awsEc2query_serializeOpCreateSpotDatafeedSubscription) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4797,7 +5478,15 @@ func (m *awsEc2query_serializeOpCreateStoreImageTask) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4853,7 +5542,15 @@ func (m *awsEc2query_serializeOpCreateSubnet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4909,7 +5606,15 @@ func (m *awsEc2query_serializeOpCreateSubnetCidrReservation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4965,7 +5670,15 @@ func (m *awsEc2query_serializeOpCreateTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5021,7 +5734,15 @@ func (m *awsEc2query_serializeOpCreateTrafficMirrorFilter) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5077,7 +5798,15 @@ func (m *awsEc2query_serializeOpCreateTrafficMirrorFilterRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5133,7 +5862,15 @@ func (m *awsEc2query_serializeOpCreateTrafficMirrorSession) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5189,7 +5926,15 @@ func (m *awsEc2query_serializeOpCreateTrafficMirrorTarget) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5245,7 +5990,15 @@ func (m *awsEc2query_serializeOpCreateTransitGateway) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5301,7 +6054,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayConnect) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5357,7 +6118,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayConnectPeer) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5413,7 +6182,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayMulticastDomain) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5469,7 +6246,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayPeeringAttachment) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5525,7 +6310,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayPrefixListReference) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5581,7 +6374,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayRoute) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5637,7 +6438,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayRouteTable) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5693,7 +6502,15 @@ func (m *awsEc2query_serializeOpCreateTransitGatewayVpcAttachment) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5749,7 +6566,15 @@ func (m *awsEc2query_serializeOpCreateVolume) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5805,7 +6630,15 @@ func (m *awsEc2query_serializeOpCreateVpc) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5861,7 +6694,15 @@ func (m *awsEc2query_serializeOpCreateVpcEndpoint) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5917,7 +6758,15 @@ func (m *awsEc2query_serializeOpCreateVpcEndpointConnectionNotification) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5973,7 +6822,15 @@ func (m *awsEc2query_serializeOpCreateVpcEndpointServiceConfiguration) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6029,7 +6886,15 @@ func (m *awsEc2query_serializeOpCreateVpcPeeringConnection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6085,7 +6950,15 @@ func (m *awsEc2query_serializeOpCreateVpnConnection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6141,7 +7014,15 @@ func (m *awsEc2query_serializeOpCreateVpnConnectionRoute) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6197,7 +7078,15 @@ func (m *awsEc2query_serializeOpCreateVpnGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6253,7 +7142,15 @@ func (m *awsEc2query_serializeOpDeleteCarrierGateway) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6309,7 +7206,15 @@ func (m *awsEc2query_serializeOpDeleteClientVpnEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6365,7 +7270,15 @@ func (m *awsEc2query_serializeOpDeleteClientVpnRoute) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6421,7 +7334,15 @@ func (m *awsEc2query_serializeOpDeleteCustomerGateway) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6477,7 +7398,15 @@ func (m *awsEc2query_serializeOpDeleteDhcpOptions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6533,7 +7462,15 @@ func (m *awsEc2query_serializeOpDeleteEgressOnlyInternetGateway) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6589,7 +7526,15 @@ func (m *awsEc2query_serializeOpDeleteFleets) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6645,7 +7590,15 @@ func (m *awsEc2query_serializeOpDeleteFlowLogs) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6701,7 +7654,15 @@ func (m *awsEc2query_serializeOpDeleteFpgaImage) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6757,7 +7718,15 @@ func (m *awsEc2query_serializeOpDeleteInstanceEventWindow) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6813,7 +7782,15 @@ func (m *awsEc2query_serializeOpDeleteInternetGateway) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6869,7 +7846,15 @@ func (m *awsEc2query_serializeOpDeleteKeyPair) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6925,7 +7910,15 @@ func (m *awsEc2query_serializeOpDeleteLaunchTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6981,7 +7974,15 @@ func (m *awsEc2query_serializeOpDeleteLaunchTemplateVersions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7037,7 +8038,15 @@ func (m *awsEc2query_serializeOpDeleteLocalGatewayRoute) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7093,7 +8102,15 @@ func (m *awsEc2query_serializeOpDeleteLocalGatewayRouteTableVpcAssociation) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7149,7 +8166,15 @@ func (m *awsEc2query_serializeOpDeleteManagedPrefixList) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7205,7 +8230,15 @@ func (m *awsEc2query_serializeOpDeleteNatGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7261,7 +8294,15 @@ func (m *awsEc2query_serializeOpDeleteNetworkAcl) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7317,7 +8358,15 @@ func (m *awsEc2query_serializeOpDeleteNetworkAclEntry) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7373,7 +8422,15 @@ func (m *awsEc2query_serializeOpDeleteNetworkInsightsAnalysis) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7429,7 +8486,15 @@ func (m *awsEc2query_serializeOpDeleteNetworkInsightsPath) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7485,7 +8550,15 @@ func (m *awsEc2query_serializeOpDeleteNetworkInterface) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7541,7 +8614,15 @@ func (m *awsEc2query_serializeOpDeleteNetworkInterfacePermission) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7597,7 +8678,15 @@ func (m *awsEc2query_serializeOpDeletePlacementGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7653,7 +8742,15 @@ func (m *awsEc2query_serializeOpDeleteQueuedReservedInstances) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7709,7 +8806,15 @@ func (m *awsEc2query_serializeOpDeleteRoute) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7765,7 +8870,15 @@ func (m *awsEc2query_serializeOpDeleteRouteTable) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7821,7 +8934,15 @@ func (m *awsEc2query_serializeOpDeleteSecurityGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7877,7 +8998,15 @@ func (m *awsEc2query_serializeOpDeleteSnapshot) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7933,7 +9062,15 @@ func (m *awsEc2query_serializeOpDeleteSpotDatafeedSubscription) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7989,7 +9126,15 @@ func (m *awsEc2query_serializeOpDeleteSubnet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8045,7 +9190,15 @@ func (m *awsEc2query_serializeOpDeleteSubnetCidrReservation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8101,7 +9254,15 @@ func (m *awsEc2query_serializeOpDeleteTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8157,7 +9318,15 @@ func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilter) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8213,7 +9382,15 @@ func (m *awsEc2query_serializeOpDeleteTrafficMirrorFilterRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8269,7 +9446,15 @@ func (m *awsEc2query_serializeOpDeleteTrafficMirrorSession) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8325,7 +9510,15 @@ func (m *awsEc2query_serializeOpDeleteTrafficMirrorTarget) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8381,7 +9574,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGateway) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8437,7 +9638,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayConnect) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8493,7 +9702,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayConnectPeer) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8549,7 +9766,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayMulticastDomain) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8605,7 +9830,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayPeeringAttachment) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8661,7 +9894,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayPrefixListReference) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8717,7 +9958,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayRoute) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8773,7 +10022,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayRouteTable) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8829,7 +10086,15 @@ func (m *awsEc2query_serializeOpDeleteTransitGatewayVpcAttachment) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8885,7 +10150,15 @@ func (m *awsEc2query_serializeOpDeleteVolume) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8941,7 +10214,15 @@ func (m *awsEc2query_serializeOpDeleteVpc) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8997,7 +10278,15 @@ func (m *awsEc2query_serializeOpDeleteVpcEndpointConnectionNotifications) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9053,7 +10342,15 @@ func (m *awsEc2query_serializeOpDeleteVpcEndpoints) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9109,7 +10406,15 @@ func (m *awsEc2query_serializeOpDeleteVpcEndpointServiceConfigurations) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9165,7 +10470,15 @@ func (m *awsEc2query_serializeOpDeleteVpcPeeringConnection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9221,7 +10534,15 @@ func (m *awsEc2query_serializeOpDeleteVpnConnection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9277,7 +10598,15 @@ func (m *awsEc2query_serializeOpDeleteVpnConnectionRoute) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9333,7 +10662,15 @@ func (m *awsEc2query_serializeOpDeleteVpnGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9389,7 +10726,15 @@ func (m *awsEc2query_serializeOpDeprovisionByoipCidr) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9445,7 +10790,15 @@ func (m *awsEc2query_serializeOpDeregisterImage) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9501,7 +10854,15 @@ func (m *awsEc2query_serializeOpDeregisterInstanceEventNotificationAttributes) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9557,7 +10918,15 @@ func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupMembers) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9613,7 +10982,15 @@ func (m *awsEc2query_serializeOpDeregisterTransitGatewayMulticastGroupSources) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9669,7 +11046,15 @@ func (m *awsEc2query_serializeOpDescribeAccountAttributes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9725,7 +11110,15 @@ func (m *awsEc2query_serializeOpDescribeAddresses) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9781,7 +11174,15 @@ func (m *awsEc2query_serializeOpDescribeAddressesAttribute) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9837,7 +11238,15 @@ func (m *awsEc2query_serializeOpDescribeAggregateIdFormat) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9893,7 +11302,15 @@ func (m *awsEc2query_serializeOpDescribeAvailabilityZones) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9949,7 +11366,15 @@ func (m *awsEc2query_serializeOpDescribeBundleTasks) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10005,7 +11430,15 @@ func (m *awsEc2query_serializeOpDescribeByoipCidrs) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10061,7 +11494,15 @@ func (m *awsEc2query_serializeOpDescribeCapacityReservationFleets) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10117,7 +11558,15 @@ func (m *awsEc2query_serializeOpDescribeCapacityReservations) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10173,7 +11622,15 @@ func (m *awsEc2query_serializeOpDescribeCarrierGateways) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10229,7 +11686,15 @@ func (m *awsEc2query_serializeOpDescribeClassicLinkInstances) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10285,7 +11750,15 @@ func (m *awsEc2query_serializeOpDescribeClientVpnAuthorizationRules) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10341,7 +11814,15 @@ func (m *awsEc2query_serializeOpDescribeClientVpnConnections) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10397,7 +11878,15 @@ func (m *awsEc2query_serializeOpDescribeClientVpnEndpoints) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10453,7 +11942,15 @@ func (m *awsEc2query_serializeOpDescribeClientVpnRoutes) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10509,7 +12006,15 @@ func (m *awsEc2query_serializeOpDescribeClientVpnTargetNetworks) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10565,7 +12070,15 @@ func (m *awsEc2query_serializeOpDescribeCoipPools) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10621,7 +12134,15 @@ func (m *awsEc2query_serializeOpDescribeConversionTasks) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10677,7 +12198,15 @@ func (m *awsEc2query_serializeOpDescribeCustomerGateways) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10733,7 +12262,15 @@ func (m *awsEc2query_serializeOpDescribeDhcpOptions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10789,7 +12326,15 @@ func (m *awsEc2query_serializeOpDescribeEgressOnlyInternetGateways) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10845,7 +12390,15 @@ func (m *awsEc2query_serializeOpDescribeElasticGpus) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10901,7 +12454,15 @@ func (m *awsEc2query_serializeOpDescribeExportImageTasks) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10957,7 +12518,15 @@ func (m *awsEc2query_serializeOpDescribeExportTasks) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11013,7 +12582,15 @@ func (m *awsEc2query_serializeOpDescribeFastSnapshotRestores) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11069,7 +12646,15 @@ func (m *awsEc2query_serializeOpDescribeFleetHistory) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11125,7 +12710,15 @@ func (m *awsEc2query_serializeOpDescribeFleetInstances) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11181,7 +12774,15 @@ func (m *awsEc2query_serializeOpDescribeFleets) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11237,7 +12838,15 @@ func (m *awsEc2query_serializeOpDescribeFlowLogs) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11293,7 +12902,15 @@ func (m *awsEc2query_serializeOpDescribeFpgaImageAttribute) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11349,7 +12966,15 @@ func (m *awsEc2query_serializeOpDescribeFpgaImages) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11405,7 +13030,15 @@ func (m *awsEc2query_serializeOpDescribeHostReservationOfferings) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11461,7 +13094,15 @@ func (m *awsEc2query_serializeOpDescribeHostReservations) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11517,7 +13158,15 @@ func (m *awsEc2query_serializeOpDescribeHosts) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11573,7 +13222,15 @@ func (m *awsEc2query_serializeOpDescribeIamInstanceProfileAssociations) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11629,7 +13286,15 @@ func (m *awsEc2query_serializeOpDescribeIdentityIdFormat) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11685,7 +13350,15 @@ func (m *awsEc2query_serializeOpDescribeIdFormat) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11741,7 +13414,15 @@ func (m *awsEc2query_serializeOpDescribeImageAttribute) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11797,7 +13478,15 @@ func (m *awsEc2query_serializeOpDescribeImages) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11853,7 +13542,15 @@ func (m *awsEc2query_serializeOpDescribeImportImageTasks) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11909,7 +13606,15 @@ func (m *awsEc2query_serializeOpDescribeImportSnapshotTasks) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11965,7 +13670,15 @@ func (m *awsEc2query_serializeOpDescribeInstanceAttribute) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12021,7 +13734,15 @@ func (m *awsEc2query_serializeOpDescribeInstanceCreditSpecifications) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12077,7 +13798,15 @@ func (m *awsEc2query_serializeOpDescribeInstanceEventNotificationAttributes) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12133,7 +13862,15 @@ func (m *awsEc2query_serializeOpDescribeInstanceEventWindows) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12189,7 +13926,15 @@ func (m *awsEc2query_serializeOpDescribeInstances) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12245,7 +13990,15 @@ func (m *awsEc2query_serializeOpDescribeInstanceStatus) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12301,7 +14054,15 @@ func (m *awsEc2query_serializeOpDescribeInstanceTypeOfferings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12357,7 +14118,15 @@ func (m *awsEc2query_serializeOpDescribeInstanceTypes) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12413,7 +14182,15 @@ func (m *awsEc2query_serializeOpDescribeInternetGateways) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12469,7 +14246,15 @@ func (m *awsEc2query_serializeOpDescribeIpv6Pools) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12525,7 +14310,15 @@ func (m *awsEc2query_serializeOpDescribeKeyPairs) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12581,7 +14374,15 @@ func (m *awsEc2query_serializeOpDescribeLaunchTemplates) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12637,7 +14438,15 @@ func (m *awsEc2query_serializeOpDescribeLaunchTemplateVersions) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12693,7 +14502,15 @@ func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTables) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12749,7 +14566,15 @@ func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVirtualInterfaceGr return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12805,7 +14630,15 @@ func (m *awsEc2query_serializeOpDescribeLocalGatewayRouteTableVpcAssociations) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12861,7 +14694,15 @@ func (m *awsEc2query_serializeOpDescribeLocalGateways) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12917,7 +14758,15 @@ func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaceGroups) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -12973,7 +14822,15 @@ func (m *awsEc2query_serializeOpDescribeLocalGatewayVirtualInterfaces) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13029,7 +14886,15 @@ func (m *awsEc2query_serializeOpDescribeManagedPrefixLists) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13085,7 +14950,15 @@ func (m *awsEc2query_serializeOpDescribeMovingAddresses) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13141,7 +15014,15 @@ func (m *awsEc2query_serializeOpDescribeNatGateways) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13197,7 +15078,15 @@ func (m *awsEc2query_serializeOpDescribeNetworkAcls) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13253,7 +15142,15 @@ func (m *awsEc2query_serializeOpDescribeNetworkInsightsAnalyses) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13309,7 +15206,15 @@ func (m *awsEc2query_serializeOpDescribeNetworkInsightsPaths) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13365,7 +15270,15 @@ func (m *awsEc2query_serializeOpDescribeNetworkInterfaceAttribute) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13421,7 +15334,15 @@ func (m *awsEc2query_serializeOpDescribeNetworkInterfacePermissions) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13477,7 +15398,15 @@ func (m *awsEc2query_serializeOpDescribeNetworkInterfaces) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13533,7 +15462,15 @@ func (m *awsEc2query_serializeOpDescribePlacementGroups) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13589,7 +15526,15 @@ func (m *awsEc2query_serializeOpDescribePrefixLists) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13645,7 +15590,15 @@ func (m *awsEc2query_serializeOpDescribePrincipalIdFormat) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13701,7 +15654,15 @@ func (m *awsEc2query_serializeOpDescribePublicIpv4Pools) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13757,7 +15718,15 @@ func (m *awsEc2query_serializeOpDescribeRegions) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13813,7 +15782,15 @@ func (m *awsEc2query_serializeOpDescribeReplaceRootVolumeTasks) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13869,7 +15846,15 @@ func (m *awsEc2query_serializeOpDescribeReservedInstances) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13925,7 +15910,15 @@ func (m *awsEc2query_serializeOpDescribeReservedInstancesListings) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -13981,7 +15974,15 @@ func (m *awsEc2query_serializeOpDescribeReservedInstancesModifications) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14037,7 +16038,15 @@ func (m *awsEc2query_serializeOpDescribeReservedInstancesOfferings) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14093,7 +16102,15 @@ func (m *awsEc2query_serializeOpDescribeRouteTables) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14149,7 +16166,15 @@ func (m *awsEc2query_serializeOpDescribeScheduledInstanceAvailability) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14205,7 +16230,15 @@ func (m *awsEc2query_serializeOpDescribeScheduledInstances) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14261,7 +16294,15 @@ func (m *awsEc2query_serializeOpDescribeSecurityGroupReferences) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14317,7 +16358,15 @@ func (m *awsEc2query_serializeOpDescribeSecurityGroupRules) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14373,7 +16422,15 @@ func (m *awsEc2query_serializeOpDescribeSecurityGroups) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14429,7 +16486,15 @@ func (m *awsEc2query_serializeOpDescribeSnapshotAttribute) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14485,7 +16550,15 @@ func (m *awsEc2query_serializeOpDescribeSnapshots) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14541,7 +16614,15 @@ func (m *awsEc2query_serializeOpDescribeSpotDatafeedSubscription) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14597,7 +16678,15 @@ func (m *awsEc2query_serializeOpDescribeSpotFleetInstances) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14653,7 +16742,15 @@ func (m *awsEc2query_serializeOpDescribeSpotFleetRequestHistory) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14709,7 +16806,15 @@ func (m *awsEc2query_serializeOpDescribeSpotFleetRequests) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14765,7 +16870,15 @@ func (m *awsEc2query_serializeOpDescribeSpotInstanceRequests) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14821,7 +16934,15 @@ func (m *awsEc2query_serializeOpDescribeSpotPriceHistory) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14877,7 +16998,15 @@ func (m *awsEc2query_serializeOpDescribeStaleSecurityGroups) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14933,7 +17062,15 @@ func (m *awsEc2query_serializeOpDescribeStoreImageTasks) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -14989,7 +17126,15 @@ func (m *awsEc2query_serializeOpDescribeSubnets) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15045,7 +17190,15 @@ func (m *awsEc2query_serializeOpDescribeTags) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15101,7 +17254,15 @@ func (m *awsEc2query_serializeOpDescribeTrafficMirrorFilters) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15157,7 +17318,15 @@ func (m *awsEc2query_serializeOpDescribeTrafficMirrorSessions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15213,7 +17382,15 @@ func (m *awsEc2query_serializeOpDescribeTrafficMirrorTargets) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15269,7 +17446,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGatewayAttachments) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15325,7 +17510,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGatewayConnectPeers) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15381,7 +17574,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGatewayConnects) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15437,7 +17638,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGatewayMulticastDomains) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15493,7 +17702,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGatewayPeeringAttachments) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15549,7 +17766,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGatewayRouteTables) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15605,7 +17830,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGateways) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15661,7 +17894,15 @@ func (m *awsEc2query_serializeOpDescribeTransitGatewayVpcAttachments) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15717,7 +17958,15 @@ func (m *awsEc2query_serializeOpDescribeTrunkInterfaceAssociations) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15773,7 +18022,15 @@ func (m *awsEc2query_serializeOpDescribeVolumeAttribute) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15829,7 +18086,15 @@ func (m *awsEc2query_serializeOpDescribeVolumes) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15885,7 +18150,15 @@ func (m *awsEc2query_serializeOpDescribeVolumesModifications) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15941,7 +18214,15 @@ func (m *awsEc2query_serializeOpDescribeVolumeStatus) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -15997,7 +18278,15 @@ func (m *awsEc2query_serializeOpDescribeVpcAttribute) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16053,7 +18342,15 @@ func (m *awsEc2query_serializeOpDescribeVpcClassicLink) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16109,7 +18406,15 @@ func (m *awsEc2query_serializeOpDescribeVpcClassicLinkDnsSupport) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16165,7 +18470,15 @@ func (m *awsEc2query_serializeOpDescribeVpcEndpointConnectionNotifications) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16221,7 +18534,15 @@ func (m *awsEc2query_serializeOpDescribeVpcEndpointConnections) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16277,7 +18598,15 @@ func (m *awsEc2query_serializeOpDescribeVpcEndpoints) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16333,7 +18662,15 @@ func (m *awsEc2query_serializeOpDescribeVpcEndpointServiceConfigurations) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16389,7 +18726,15 @@ func (m *awsEc2query_serializeOpDescribeVpcEndpointServicePermissions) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16445,7 +18790,15 @@ func (m *awsEc2query_serializeOpDescribeVpcEndpointServices) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16501,7 +18854,15 @@ func (m *awsEc2query_serializeOpDescribeVpcPeeringConnections) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16557,7 +18918,15 @@ func (m *awsEc2query_serializeOpDescribeVpcs) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16613,7 +18982,15 @@ func (m *awsEc2query_serializeOpDescribeVpnConnections) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16669,7 +19046,15 @@ func (m *awsEc2query_serializeOpDescribeVpnGateways) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16725,7 +19110,15 @@ func (m *awsEc2query_serializeOpDetachClassicLinkVpc) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16781,7 +19174,15 @@ func (m *awsEc2query_serializeOpDetachInternetGateway) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16837,7 +19238,15 @@ func (m *awsEc2query_serializeOpDetachNetworkInterface) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16893,7 +19302,15 @@ func (m *awsEc2query_serializeOpDetachVolume) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -16949,7 +19366,15 @@ func (m *awsEc2query_serializeOpDetachVpnGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17005,7 +19430,15 @@ func (m *awsEc2query_serializeOpDisableEbsEncryptionByDefault) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17061,7 +19494,15 @@ func (m *awsEc2query_serializeOpDisableFastSnapshotRestores) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17117,7 +19558,15 @@ func (m *awsEc2query_serializeOpDisableImageDeprecation) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17173,7 +19622,15 @@ func (m *awsEc2query_serializeOpDisableSerialConsoleAccess) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17229,7 +19686,15 @@ func (m *awsEc2query_serializeOpDisableTransitGatewayRouteTablePropagation) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17285,7 +19750,15 @@ func (m *awsEc2query_serializeOpDisableVgwRoutePropagation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17341,7 +19814,15 @@ func (m *awsEc2query_serializeOpDisableVpcClassicLink) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17397,7 +19878,15 @@ func (m *awsEc2query_serializeOpDisableVpcClassicLinkDnsSupport) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17453,7 +19942,15 @@ func (m *awsEc2query_serializeOpDisassociateAddress) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17509,7 +20006,15 @@ func (m *awsEc2query_serializeOpDisassociateClientVpnTargetNetwork) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17565,7 +20070,15 @@ func (m *awsEc2query_serializeOpDisassociateEnclaveCertificateIamRole) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17621,7 +20134,15 @@ func (m *awsEc2query_serializeOpDisassociateIamInstanceProfile) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17677,7 +20198,15 @@ func (m *awsEc2query_serializeOpDisassociateInstanceEventWindow) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17733,7 +20262,15 @@ func (m *awsEc2query_serializeOpDisassociateRouteTable) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17789,7 +20326,15 @@ func (m *awsEc2query_serializeOpDisassociateSubnetCidrBlock) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17845,7 +20390,15 @@ func (m *awsEc2query_serializeOpDisassociateTransitGatewayMulticastDomain) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17901,7 +20454,15 @@ func (m *awsEc2query_serializeOpDisassociateTransitGatewayRouteTable) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -17957,7 +20518,15 @@ func (m *awsEc2query_serializeOpDisassociateTrunkInterface) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18013,7 +20582,15 @@ func (m *awsEc2query_serializeOpDisassociateVpcCidrBlock) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18069,7 +20646,15 @@ func (m *awsEc2query_serializeOpEnableEbsEncryptionByDefault) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18125,7 +20710,15 @@ func (m *awsEc2query_serializeOpEnableFastSnapshotRestores) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18181,7 +20774,15 @@ func (m *awsEc2query_serializeOpEnableImageDeprecation) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18237,7 +20838,15 @@ func (m *awsEc2query_serializeOpEnableSerialConsoleAccess) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18293,7 +20902,15 @@ func (m *awsEc2query_serializeOpEnableTransitGatewayRouteTablePropagation) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18349,7 +20966,15 @@ func (m *awsEc2query_serializeOpEnableVgwRoutePropagation) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18405,7 +21030,15 @@ func (m *awsEc2query_serializeOpEnableVolumeIO) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18461,7 +21094,15 @@ func (m *awsEc2query_serializeOpEnableVpcClassicLink) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18517,7 +21158,15 @@ func (m *awsEc2query_serializeOpEnableVpcClassicLinkDnsSupport) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18573,7 +21222,15 @@ func (m *awsEc2query_serializeOpExportClientVpnClientCertificateRevocationList) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18629,7 +21286,15 @@ func (m *awsEc2query_serializeOpExportClientVpnClientConfiguration) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18685,7 +21350,15 @@ func (m *awsEc2query_serializeOpExportImage) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18741,7 +21414,15 @@ func (m *awsEc2query_serializeOpExportTransitGatewayRoutes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18797,7 +21478,15 @@ func (m *awsEc2query_serializeOpGetAssociatedEnclaveCertificateIamRoles) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18853,7 +21542,15 @@ func (m *awsEc2query_serializeOpGetAssociatedIpv6PoolCidrs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18909,7 +21606,15 @@ func (m *awsEc2query_serializeOpGetCapacityReservationUsage) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -18965,7 +21670,15 @@ func (m *awsEc2query_serializeOpGetCoipPoolUsage) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19021,7 +21734,15 @@ func (m *awsEc2query_serializeOpGetConsoleOutput) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19077,7 +21798,15 @@ func (m *awsEc2query_serializeOpGetConsoleScreenshot) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19133,7 +21862,15 @@ func (m *awsEc2query_serializeOpGetDefaultCreditSpecification) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19189,7 +21926,15 @@ func (m *awsEc2query_serializeOpGetEbsDefaultKmsKeyId) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19245,7 +21990,15 @@ func (m *awsEc2query_serializeOpGetEbsEncryptionByDefault) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19301,7 +22054,15 @@ func (m *awsEc2query_serializeOpGetFlowLogsIntegrationTemplate) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19357,7 +22118,15 @@ func (m *awsEc2query_serializeOpGetGroupsForCapacityReservation) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19413,7 +22182,15 @@ func (m *awsEc2query_serializeOpGetHostReservationPurchasePreview) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19469,7 +22246,15 @@ func (m *awsEc2query_serializeOpGetInstanceTypesFromInstanceRequirements) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19525,7 +22310,15 @@ func (m *awsEc2query_serializeOpGetLaunchTemplateData) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19581,7 +22374,15 @@ func (m *awsEc2query_serializeOpGetManagedPrefixListAssociations) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19637,7 +22438,15 @@ func (m *awsEc2query_serializeOpGetManagedPrefixListEntries) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19693,7 +22502,15 @@ func (m *awsEc2query_serializeOpGetPasswordData) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19749,7 +22566,15 @@ func (m *awsEc2query_serializeOpGetReservedInstancesExchangeQuote) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19805,7 +22630,15 @@ func (m *awsEc2query_serializeOpGetSerialConsoleAccessStatus) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19861,7 +22694,15 @@ func (m *awsEc2query_serializeOpGetSpotPlacementScores) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19917,7 +22758,15 @@ func (m *awsEc2query_serializeOpGetSubnetCidrReservations) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -19973,7 +22822,15 @@ func (m *awsEc2query_serializeOpGetTransitGatewayAttachmentPropagations) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20029,7 +22886,15 @@ func (m *awsEc2query_serializeOpGetTransitGatewayMulticastDomainAssociations) Ha return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20085,7 +22950,15 @@ func (m *awsEc2query_serializeOpGetTransitGatewayPrefixListReferences) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20141,7 +23014,15 @@ func (m *awsEc2query_serializeOpGetTransitGatewayRouteTableAssociations) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20197,7 +23078,15 @@ func (m *awsEc2query_serializeOpGetTransitGatewayRouteTablePropagations) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20253,7 +23142,15 @@ func (m *awsEc2query_serializeOpGetVpnConnectionDeviceSampleConfiguration) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20309,7 +23206,15 @@ func (m *awsEc2query_serializeOpGetVpnConnectionDeviceTypes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20365,7 +23270,15 @@ func (m *awsEc2query_serializeOpImportClientVpnClientCertificateRevocationList) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20421,7 +23334,15 @@ func (m *awsEc2query_serializeOpImportImage) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20477,7 +23398,15 @@ func (m *awsEc2query_serializeOpImportInstance) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20533,7 +23462,15 @@ func (m *awsEc2query_serializeOpImportKeyPair) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20589,7 +23526,15 @@ func (m *awsEc2query_serializeOpImportSnapshot) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20645,7 +23590,15 @@ func (m *awsEc2query_serializeOpImportVolume) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20701,7 +23654,15 @@ func (m *awsEc2query_serializeOpModifyAddressAttribute) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20757,7 +23718,15 @@ func (m *awsEc2query_serializeOpModifyAvailabilityZoneGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20813,7 +23782,15 @@ func (m *awsEc2query_serializeOpModifyCapacityReservation) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20869,7 +23846,15 @@ func (m *awsEc2query_serializeOpModifyCapacityReservationFleet) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20925,7 +23910,15 @@ func (m *awsEc2query_serializeOpModifyClientVpnEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -20981,7 +23974,15 @@ func (m *awsEc2query_serializeOpModifyDefaultCreditSpecification) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21037,7 +24038,15 @@ func (m *awsEc2query_serializeOpModifyEbsDefaultKmsKeyId) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21093,7 +24102,15 @@ func (m *awsEc2query_serializeOpModifyFleet) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21149,7 +24166,15 @@ func (m *awsEc2query_serializeOpModifyFpgaImageAttribute) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21205,7 +24230,15 @@ func (m *awsEc2query_serializeOpModifyHosts) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21261,7 +24294,15 @@ func (m *awsEc2query_serializeOpModifyIdentityIdFormat) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21317,7 +24358,15 @@ func (m *awsEc2query_serializeOpModifyIdFormat) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21373,7 +24422,15 @@ func (m *awsEc2query_serializeOpModifyImageAttribute) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21429,7 +24486,15 @@ func (m *awsEc2query_serializeOpModifyInstanceAttribute) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21485,7 +24550,15 @@ func (m *awsEc2query_serializeOpModifyInstanceCapacityReservationAttributes) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21541,7 +24614,15 @@ func (m *awsEc2query_serializeOpModifyInstanceCreditSpecification) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21597,7 +24678,15 @@ func (m *awsEc2query_serializeOpModifyInstanceEventStartTime) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21653,7 +24742,15 @@ func (m *awsEc2query_serializeOpModifyInstanceEventWindow) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21709,7 +24806,15 @@ func (m *awsEc2query_serializeOpModifyInstanceMetadataOptions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21765,7 +24870,15 @@ func (m *awsEc2query_serializeOpModifyInstancePlacement) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21821,7 +24934,15 @@ func (m *awsEc2query_serializeOpModifyLaunchTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21877,7 +24998,15 @@ func (m *awsEc2query_serializeOpModifyManagedPrefixList) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21933,7 +25062,15 @@ func (m *awsEc2query_serializeOpModifyNetworkInterfaceAttribute) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -21989,7 +25126,15 @@ func (m *awsEc2query_serializeOpModifyReservedInstances) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22045,7 +25190,15 @@ func (m *awsEc2query_serializeOpModifySecurityGroupRules) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22101,7 +25254,15 @@ func (m *awsEc2query_serializeOpModifySnapshotAttribute) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22157,7 +25318,15 @@ func (m *awsEc2query_serializeOpModifySpotFleetRequest) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22213,7 +25382,15 @@ func (m *awsEc2query_serializeOpModifySubnetAttribute) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22269,7 +25446,15 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterNetworkServices) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22325,7 +25510,15 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorFilterRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22381,7 +25574,15 @@ func (m *awsEc2query_serializeOpModifyTrafficMirrorSession) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22437,7 +25638,15 @@ func (m *awsEc2query_serializeOpModifyTransitGateway) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22493,7 +25702,15 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayPrefixListReference) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22549,7 +25766,15 @@ func (m *awsEc2query_serializeOpModifyTransitGatewayVpcAttachment) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22605,7 +25830,15 @@ func (m *awsEc2query_serializeOpModifyVolume) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22661,7 +25894,15 @@ func (m *awsEc2query_serializeOpModifyVolumeAttribute) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22717,7 +25958,15 @@ func (m *awsEc2query_serializeOpModifyVpcAttribute) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22773,7 +26022,15 @@ func (m *awsEc2query_serializeOpModifyVpcEndpoint) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22829,7 +26086,15 @@ func (m *awsEc2query_serializeOpModifyVpcEndpointConnectionNotification) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22885,7 +26150,15 @@ func (m *awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22941,7 +26214,15 @@ func (m *awsEc2query_serializeOpModifyVpcEndpointServicePermissions) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -22997,7 +26278,15 @@ func (m *awsEc2query_serializeOpModifyVpcPeeringConnectionOptions) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23053,7 +26342,15 @@ func (m *awsEc2query_serializeOpModifyVpcTenancy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23109,7 +26406,15 @@ func (m *awsEc2query_serializeOpModifyVpnConnection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23165,7 +26470,15 @@ func (m *awsEc2query_serializeOpModifyVpnConnectionOptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23221,7 +26534,15 @@ func (m *awsEc2query_serializeOpModifyVpnTunnelCertificate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23277,7 +26598,15 @@ func (m *awsEc2query_serializeOpModifyVpnTunnelOptions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23333,7 +26662,15 @@ func (m *awsEc2query_serializeOpMonitorInstances) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23389,7 +26726,15 @@ func (m *awsEc2query_serializeOpMoveAddressToVpc) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23445,7 +26790,15 @@ func (m *awsEc2query_serializeOpProvisionByoipCidr) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23501,7 +26854,15 @@ func (m *awsEc2query_serializeOpPurchaseHostReservation) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23557,7 +26918,15 @@ func (m *awsEc2query_serializeOpPurchaseReservedInstancesOffering) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23613,7 +26982,15 @@ func (m *awsEc2query_serializeOpPurchaseScheduledInstances) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23669,7 +27046,15 @@ func (m *awsEc2query_serializeOpRebootInstances) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23725,7 +27110,15 @@ func (m *awsEc2query_serializeOpRegisterImage) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23781,7 +27174,15 @@ func (m *awsEc2query_serializeOpRegisterInstanceEventNotificationAttributes) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23837,7 +27238,15 @@ func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupMembers) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23893,7 +27302,15 @@ func (m *awsEc2query_serializeOpRegisterTransitGatewayMulticastGroupSources) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -23949,7 +27366,15 @@ func (m *awsEc2query_serializeOpRejectTransitGatewayMulticastDomainAssociations) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24005,7 +27430,15 @@ func (m *awsEc2query_serializeOpRejectTransitGatewayPeeringAttachment) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24061,7 +27494,15 @@ func (m *awsEc2query_serializeOpRejectTransitGatewayVpcAttachment) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24117,7 +27558,15 @@ func (m *awsEc2query_serializeOpRejectVpcEndpointConnections) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24173,7 +27622,15 @@ func (m *awsEc2query_serializeOpRejectVpcPeeringConnection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24229,7 +27686,15 @@ func (m *awsEc2query_serializeOpReleaseAddress) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24285,7 +27750,15 @@ func (m *awsEc2query_serializeOpReleaseHosts) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24341,7 +27814,15 @@ func (m *awsEc2query_serializeOpReplaceIamInstanceProfileAssociation) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24397,7 +27878,15 @@ func (m *awsEc2query_serializeOpReplaceNetworkAclAssociation) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24453,7 +27942,15 @@ func (m *awsEc2query_serializeOpReplaceNetworkAclEntry) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24509,7 +28006,15 @@ func (m *awsEc2query_serializeOpReplaceRoute) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24565,7 +28070,15 @@ func (m *awsEc2query_serializeOpReplaceRouteTableAssociation) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24621,7 +28134,15 @@ func (m *awsEc2query_serializeOpReplaceTransitGatewayRoute) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24677,7 +28198,15 @@ func (m *awsEc2query_serializeOpReportInstanceStatus) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24733,7 +28262,15 @@ func (m *awsEc2query_serializeOpRequestSpotFleet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24789,7 +28326,15 @@ func (m *awsEc2query_serializeOpRequestSpotInstances) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24845,7 +28390,15 @@ func (m *awsEc2query_serializeOpResetAddressAttribute) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24901,7 +28454,15 @@ func (m *awsEc2query_serializeOpResetEbsDefaultKmsKeyId) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -24957,7 +28518,15 @@ func (m *awsEc2query_serializeOpResetFpgaImageAttribute) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25013,7 +28582,15 @@ func (m *awsEc2query_serializeOpResetImageAttribute) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25069,7 +28646,15 @@ func (m *awsEc2query_serializeOpResetInstanceAttribute) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25125,7 +28710,15 @@ func (m *awsEc2query_serializeOpResetNetworkInterfaceAttribute) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25181,7 +28774,15 @@ func (m *awsEc2query_serializeOpResetSnapshotAttribute) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25237,7 +28838,15 @@ func (m *awsEc2query_serializeOpRestoreAddressToClassic) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25293,7 +28902,15 @@ func (m *awsEc2query_serializeOpRestoreManagedPrefixListVersion) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25349,7 +28966,15 @@ func (m *awsEc2query_serializeOpRevokeClientVpnIngress) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25405,7 +29030,15 @@ func (m *awsEc2query_serializeOpRevokeSecurityGroupEgress) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25461,7 +29094,15 @@ func (m *awsEc2query_serializeOpRevokeSecurityGroupIngress) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25517,7 +29158,15 @@ func (m *awsEc2query_serializeOpRunInstances) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25573,7 +29222,15 @@ func (m *awsEc2query_serializeOpRunScheduledInstances) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25629,7 +29286,15 @@ func (m *awsEc2query_serializeOpSearchLocalGatewayRoutes) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25685,7 +29350,15 @@ func (m *awsEc2query_serializeOpSearchTransitGatewayMulticastGroups) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25741,7 +29414,15 @@ func (m *awsEc2query_serializeOpSearchTransitGatewayRoutes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25797,7 +29478,15 @@ func (m *awsEc2query_serializeOpSendDiagnosticInterrupt) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25853,7 +29542,15 @@ func (m *awsEc2query_serializeOpStartInstances) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25909,7 +29606,15 @@ func (m *awsEc2query_serializeOpStartNetworkInsightsAnalysis) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -25965,7 +29670,15 @@ func (m *awsEc2query_serializeOpStartVpcEndpointServicePrivateDnsVerification) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26021,7 +29734,15 @@ func (m *awsEc2query_serializeOpStopInstances) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26077,7 +29798,15 @@ func (m *awsEc2query_serializeOpTerminateClientVpnConnections) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26133,7 +29862,15 @@ func (m *awsEc2query_serializeOpTerminateInstances) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26189,7 +29926,15 @@ func (m *awsEc2query_serializeOpUnassignIpv6Addresses) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26245,7 +29990,15 @@ func (m *awsEc2query_serializeOpUnassignPrivateIpAddresses) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26301,7 +30054,15 @@ func (m *awsEc2query_serializeOpUnmonitorInstances) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26357,7 +30118,15 @@ func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsEgress) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26413,7 +30182,15 @@ func (m *awsEc2query_serializeOpUpdateSecurityGroupRuleDescriptionsIngress) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -26469,7 +30246,15 @@ func (m *awsEc2query_serializeOpWithdrawByoipCidr) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ec2instanceconnect/serializers.go b/service/ec2instanceconnect/serializers.go index 794a28927d2..c0a94f1db3b 100644 --- a/service/ec2instanceconnect/serializers.go +++ b/service/ec2instanceconnect/serializers.go @@ -11,6 +11,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpSendSerialConsoleSSHPublicKey struct { @@ -34,7 +35,15 @@ func (m *awsAwsjson11_serializeOpSendSerialConsoleSSHPublicKey) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -81,7 +90,15 @@ func (m *awsAwsjson11_serializeOpSendSSHPublicKey) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ecr/serializers.go b/service/ecr/serializers.go index 2811ba4a01d..0bce308e269 100644 --- a/service/ecr/serializers.go +++ b/service/ecr/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpBatchCheckLayerAvailability struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpBatchCheckLayerAvailability) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteImage) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpBatchGetImage) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCompleteLayerUpload) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateRepository) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteLifecyclePolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDeleteRegistryPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDeleteRepository) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDeleteRepositoryPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeImageReplicationStatus) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDescribeImages) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDescribeImageScanFindings) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDescribeRegistry) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDescribeRepositories) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpGetAuthorizationToken) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpGetDownloadUrlForLayer) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpGetLifecyclePolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpGetLifecyclePolicyPreview) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpGetRegistryPolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpGetRepositoryPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpInitiateLayerUpload) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpListImages) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpPutImage) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpPutImageScanningConfiguration) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpPutImageTagMutability) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpPutLifecyclePolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpPutRegistryPolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpPutReplicationConfiguration) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpSetRepositoryPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpStartImageScan) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpStartLifecyclePolicyPreview) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpUploadLayerPart) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ecrpublic/serializers.go b/service/ecrpublic/serializers.go index 53950f801a9..742c7d2d0ab 100644 --- a/service/ecrpublic/serializers.go +++ b/service/ecrpublic/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpBatchCheckLayerAvailability struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpBatchCheckLayerAvailability) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteImage) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCompleteLayerUpload) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateRepository) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteRepository) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteRepositoryPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeImages) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDescribeImageTags) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDescribeRegistries) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeRepositories) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetAuthorizationToken) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpGetRegistryCatalogData) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpGetRepositoryCatalogData) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpGetRepositoryPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpInitiateLayerUpload) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpPutImage) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpPutRegistryCatalogData) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpPutRepositoryCatalogData) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpSetRepositoryPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpUploadLayerPart) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ecs/serializers.go b/service/ecs/serializers.go index 7df8c7e0e70..fe558530ffe 100644 --- a/service/ecs/serializers.go +++ b/service/ecs/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateCapacityProvider struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpCreateCapacityProvider) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpCreateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpCreateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpCreateTaskSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpDeleteAccountSetting) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpDeleteAttributes) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpDeleteCapacityProvider) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpDeleteCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpDeleteService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDeleteTaskSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDeregisterContainerInstance) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDeregisterTaskDefinition) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDescribeCapacityProviders) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDescribeClusters) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpDescribeContainerInstances) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpDescribeServices) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDescribeTaskDefinition) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpDescribeTasks) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpDescribeTaskSets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpDiscoverPollEndpoint) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpExecuteCommand) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpListAccountSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpListAttributes) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpListClusters) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpListContainerInstances) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpListServices) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpListTaskDefinitionFamilies) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpListTaskDefinitions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpListTasks) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpPutAccountSetting) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpPutAccountSettingDefault) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpPutAttributes) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpPutClusterCapacityProviders) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpRegisterContainerInstance) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpRegisterTaskDefinition) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpRunTask) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpStartTask) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpStopTask) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpSubmitAttachmentStateChanges) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpSubmitContainerStateChange) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpSubmitTaskStateChange) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpUpdateCapacityProvider) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpUpdateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpUpdateClusterSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpUpdateContainerAgent) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpUpdateContainerInstancesState) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpUpdateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpUpdateServicePrimaryTaskSet) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2434,7 +2843,15 @@ func (m *awsAwsjson11_serializeOpUpdateTaskSet) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/elasticache/serializers.go b/service/elasticache/serializers.go index afc048b25c9..9c607abbb36 100644 --- a/service/elasticache/serializers.go +++ b/service/elasticache/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAddTagsToResource struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAddTagsToResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpAuthorizeCacheSecurityGroupIngress) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpBatchApplyUpdateAction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpBatchStopUpdateAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpCompleteMigration) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCopySnapshot) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpCreateCacheCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpCreateCacheParameterGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpCreateCacheSecurityGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpCreateCacheSubnetGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpCreateGlobalReplicationGroup) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpCreateReplicationGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpCreateSnapshot) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpCreateUser) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpCreateUserGroup) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpDecreaseNodeGroupsInGlobalReplicationGroup) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpDecreaseReplicaCount) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpDeleteCacheCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpDeleteCacheParameterGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpDeleteCacheSecurityGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpDeleteCacheSubnetGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpDeleteGlobalReplicationGroup) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1268,7 +1445,15 @@ func (m *awsAwsquery_serializeOpDeleteReplicationGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1324,7 +1509,15 @@ func (m *awsAwsquery_serializeOpDeleteSnapshot) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1380,7 +1573,15 @@ func (m *awsAwsquery_serializeOpDeleteUser) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1436,7 +1637,15 @@ func (m *awsAwsquery_serializeOpDeleteUserGroup) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1701,15 @@ func (m *awsAwsquery_serializeOpDescribeCacheClusters) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1548,7 +1765,15 @@ func (m *awsAwsquery_serializeOpDescribeCacheEngineVersions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1604,7 +1829,15 @@ func (m *awsAwsquery_serializeOpDescribeCacheParameterGroups) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1660,7 +1893,15 @@ func (m *awsAwsquery_serializeOpDescribeCacheParameters) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1716,7 +1957,15 @@ func (m *awsAwsquery_serializeOpDescribeCacheSecurityGroups) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1772,7 +2021,15 @@ func (m *awsAwsquery_serializeOpDescribeCacheSubnetGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1828,7 +2085,15 @@ func (m *awsAwsquery_serializeOpDescribeEngineDefaultParameters) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1884,7 +2149,15 @@ func (m *awsAwsquery_serializeOpDescribeEvents) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1940,7 +2213,15 @@ func (m *awsAwsquery_serializeOpDescribeGlobalReplicationGroups) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1996,7 +2277,15 @@ func (m *awsAwsquery_serializeOpDescribeReplicationGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2341,15 @@ func (m *awsAwsquery_serializeOpDescribeReservedCacheNodes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2108,7 +2405,15 @@ func (m *awsAwsquery_serializeOpDescribeReservedCacheNodesOfferings) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2164,7 +2469,15 @@ func (m *awsAwsquery_serializeOpDescribeServiceUpdates) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2220,7 +2533,15 @@ func (m *awsAwsquery_serializeOpDescribeSnapshots) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2276,7 +2597,15 @@ func (m *awsAwsquery_serializeOpDescribeUpdateActions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2332,7 +2661,15 @@ func (m *awsAwsquery_serializeOpDescribeUserGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2388,7 +2725,15 @@ func (m *awsAwsquery_serializeOpDescribeUsers) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2444,7 +2789,15 @@ func (m *awsAwsquery_serializeOpDisassociateGlobalReplicationGroup) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2500,7 +2853,15 @@ func (m *awsAwsquery_serializeOpFailoverGlobalReplicationGroup) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2556,7 +2917,15 @@ func (m *awsAwsquery_serializeOpIncreaseNodeGroupsInGlobalReplicationGroup) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2612,7 +2981,15 @@ func (m *awsAwsquery_serializeOpIncreaseReplicaCount) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3045,15 @@ func (m *awsAwsquery_serializeOpListAllowedNodeTypeModifications) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2724,7 +3109,15 @@ func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2780,7 +3173,15 @@ func (m *awsAwsquery_serializeOpModifyCacheCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2836,7 +3237,15 @@ func (m *awsAwsquery_serializeOpModifyCacheParameterGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2892,7 +3301,15 @@ func (m *awsAwsquery_serializeOpModifyCacheSubnetGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2948,7 +3365,15 @@ func (m *awsAwsquery_serializeOpModifyGlobalReplicationGroup) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3004,7 +3429,15 @@ func (m *awsAwsquery_serializeOpModifyReplicationGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3060,7 +3493,15 @@ func (m *awsAwsquery_serializeOpModifyReplicationGroupShardConfiguration) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3116,7 +3557,15 @@ func (m *awsAwsquery_serializeOpModifyUser) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3172,7 +3621,15 @@ func (m *awsAwsquery_serializeOpModifyUserGroup) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3228,7 +3685,15 @@ func (m *awsAwsquery_serializeOpPurchaseReservedCacheNodesOffering) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3284,7 +3749,15 @@ func (m *awsAwsquery_serializeOpRebalanceSlotsInGlobalReplicationGroup) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3340,7 +3813,15 @@ func (m *awsAwsquery_serializeOpRebootCacheCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3396,7 +3877,15 @@ func (m *awsAwsquery_serializeOpRemoveTagsFromResource) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3452,7 +3941,15 @@ func (m *awsAwsquery_serializeOpResetCacheParameterGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3508,7 +4005,15 @@ func (m *awsAwsquery_serializeOpRevokeCacheSecurityGroupIngress) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3564,7 +4069,15 @@ func (m *awsAwsquery_serializeOpStartMigration) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3620,7 +4133,15 @@ func (m *awsAwsquery_serializeOpTestFailover) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/elasticbeanstalk/serializers.go b/service/elasticbeanstalk/serializers.go index 5fc04c067f1..d2e98e97e79 100644 --- a/service/elasticbeanstalk/serializers.go +++ b/service/elasticbeanstalk/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAbortEnvironmentUpdate struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAbortEnvironmentUpdate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpApplyEnvironmentManagedAction) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpAssociateEnvironmentOperationsRole) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpCheckDNSAvailability) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpComposeEnvironments) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCreateApplication) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpCreateApplicationVersion) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpCreateConfigurationTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpCreateEnvironment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpCreatePlatformVersion) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpCreateStorageLocation) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +737,15 @@ func (m *awsAwsquery_serializeOpDeleteApplication) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -704,7 +801,15 @@ func (m *awsAwsquery_serializeOpDeleteApplicationVersion) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -760,7 +865,15 @@ func (m *awsAwsquery_serializeOpDeleteConfigurationTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -816,7 +929,15 @@ func (m *awsAwsquery_serializeOpDeleteEnvironmentConfiguration) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -872,7 +993,15 @@ func (m *awsAwsquery_serializeOpDeletePlatformVersion) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1057,15 @@ func (m *awsAwsquery_serializeOpDescribeAccountAttributes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -980,7 +1117,15 @@ func (m *awsAwsquery_serializeOpDescribeApplications) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1036,7 +1181,15 @@ func (m *awsAwsquery_serializeOpDescribeApplicationVersions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1092,7 +1245,15 @@ func (m *awsAwsquery_serializeOpDescribeConfigurationOptions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1148,7 +1309,15 @@ func (m *awsAwsquery_serializeOpDescribeConfigurationSettings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1204,7 +1373,15 @@ func (m *awsAwsquery_serializeOpDescribeEnvironmentHealth) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1260,7 +1437,15 @@ func (m *awsAwsquery_serializeOpDescribeEnvironmentManagedActionHistory) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1316,7 +1501,15 @@ func (m *awsAwsquery_serializeOpDescribeEnvironmentManagedActions) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1372,7 +1565,15 @@ func (m *awsAwsquery_serializeOpDescribeEnvironmentResources) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1428,7 +1629,15 @@ func (m *awsAwsquery_serializeOpDescribeEnvironments) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1484,7 +1693,15 @@ func (m *awsAwsquery_serializeOpDescribeEvents) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1757,15 @@ func (m *awsAwsquery_serializeOpDescribeInstancesHealth) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1596,7 +1821,15 @@ func (m *awsAwsquery_serializeOpDescribePlatformVersion) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1652,7 +1885,15 @@ func (m *awsAwsquery_serializeOpDisassociateEnvironmentOperationsRole) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1708,7 +1949,15 @@ func (m *awsAwsquery_serializeOpListAvailableSolutionStacks) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1760,7 +2009,15 @@ func (m *awsAwsquery_serializeOpListPlatformBranches) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1816,7 +2073,15 @@ func (m *awsAwsquery_serializeOpListPlatformVersions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1872,7 +2137,15 @@ func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1928,7 +2201,15 @@ func (m *awsAwsquery_serializeOpRebuildEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1984,7 +2265,15 @@ func (m *awsAwsquery_serializeOpRequestEnvironmentInfo) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2040,7 +2329,15 @@ func (m *awsAwsquery_serializeOpRestartAppServer) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2096,7 +2393,15 @@ func (m *awsAwsquery_serializeOpRetrieveEnvironmentInfo) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2457,15 @@ func (m *awsAwsquery_serializeOpSwapEnvironmentCNAMEs) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2208,7 +2521,15 @@ func (m *awsAwsquery_serializeOpTerminateEnvironment) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2264,7 +2585,15 @@ func (m *awsAwsquery_serializeOpUpdateApplication) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2320,7 +2649,15 @@ func (m *awsAwsquery_serializeOpUpdateApplicationResourceLifecycle) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2376,7 +2713,15 @@ func (m *awsAwsquery_serializeOpUpdateApplicationVersion) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2777,15 @@ func (m *awsAwsquery_serializeOpUpdateConfigurationTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2488,7 +2841,15 @@ func (m *awsAwsquery_serializeOpUpdateEnvironment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2544,7 +2905,15 @@ func (m *awsAwsquery_serializeOpUpdateTagsForResource) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2600,7 +2969,15 @@ func (m *awsAwsquery_serializeOpValidateConfigurationSettings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/elasticloadbalancing/serializers.go b/service/elasticloadbalancing/serializers.go index 0068a8ab66a..6b81f3999e0 100644 --- a/service/elasticloadbalancing/serializers.go +++ b/service/elasticloadbalancing/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAddTags struct { @@ -35,7 +36,15 @@ func (m *awsAwsquery_serializeOpAddTags) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -91,7 +100,15 @@ func (m *awsAwsquery_serializeOpApplySecurityGroupsToLoadBalancer) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -147,7 +164,15 @@ func (m *awsAwsquery_serializeOpAttachLoadBalancerToSubnets) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -203,7 +228,15 @@ func (m *awsAwsquery_serializeOpConfigureHealthCheck) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -259,7 +292,15 @@ func (m *awsAwsquery_serializeOpCreateAppCookieStickinessPolicy) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -315,7 +356,15 @@ func (m *awsAwsquery_serializeOpCreateLBCookieStickinessPolicy) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -371,7 +420,15 @@ func (m *awsAwsquery_serializeOpCreateLoadBalancer) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -427,7 +484,15 @@ func (m *awsAwsquery_serializeOpCreateLoadBalancerListeners) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -483,7 +548,15 @@ func (m *awsAwsquery_serializeOpCreateLoadBalancerPolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -539,7 +612,15 @@ func (m *awsAwsquery_serializeOpDeleteLoadBalancer) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -595,7 +676,15 @@ func (m *awsAwsquery_serializeOpDeleteLoadBalancerListeners) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -651,7 +740,15 @@ func (m *awsAwsquery_serializeOpDeleteLoadBalancerPolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -707,7 +804,15 @@ func (m *awsAwsquery_serializeOpDeregisterInstancesFromLoadBalancer) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -763,7 +868,15 @@ func (m *awsAwsquery_serializeOpDescribeAccountLimits) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -819,7 +932,15 @@ func (m *awsAwsquery_serializeOpDescribeInstanceHealth) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -875,7 +996,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancerAttributes) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -931,7 +1060,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancerPolicies) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -987,7 +1124,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancerPolicyTypes) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1043,7 +1188,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancers) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1099,7 +1252,15 @@ func (m *awsAwsquery_serializeOpDescribeTags) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1155,7 +1316,15 @@ func (m *awsAwsquery_serializeOpDetachLoadBalancerFromSubnets) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1380,15 @@ func (m *awsAwsquery_serializeOpDisableAvailabilityZonesForLoadBalancer) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1267,7 +1444,15 @@ func (m *awsAwsquery_serializeOpEnableAvailabilityZonesForLoadBalancer) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1323,7 +1508,15 @@ func (m *awsAwsquery_serializeOpModifyLoadBalancerAttributes) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1379,7 +1572,15 @@ func (m *awsAwsquery_serializeOpRegisterInstancesWithLoadBalancer) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1435,7 +1636,15 @@ func (m *awsAwsquery_serializeOpRemoveTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1491,7 +1700,15 @@ func (m *awsAwsquery_serializeOpSetLoadBalancerListenerSSLCertificate) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1547,7 +1764,15 @@ func (m *awsAwsquery_serializeOpSetLoadBalancerPoliciesForBackendServer) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1603,7 +1828,15 @@ func (m *awsAwsquery_serializeOpSetLoadBalancerPoliciesOfListener) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/elasticloadbalancingv2/serializers.go b/service/elasticloadbalancingv2/serializers.go index fc16c889442..877244da965 100644 --- a/service/elasticloadbalancingv2/serializers.go +++ b/service/elasticloadbalancingv2/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "sort" ) @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAddListenerCertificates) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpAddTags) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpCreateListener) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpCreateLoadBalancer) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpCreateRule) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCreateTargetGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpDeleteListener) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpDeleteLoadBalancer) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpDeleteRule) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpDeleteTargetGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpDeregisterTargets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpDescribeAccountLimits) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpDescribeListenerCertificates) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpDescribeListeners) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancerAttributes) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpDescribeLoadBalancers) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpDescribeRules) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpDescribeSSLPolicies) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpDescribeTags) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpDescribeTargetGroupAttributes) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpDescribeTargetGroups) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpDescribeTargetHealth) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1268,7 +1445,15 @@ func (m *awsAwsquery_serializeOpModifyListener) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1324,7 +1509,15 @@ func (m *awsAwsquery_serializeOpModifyLoadBalancerAttributes) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1380,7 +1573,15 @@ func (m *awsAwsquery_serializeOpModifyRule) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1436,7 +1637,15 @@ func (m *awsAwsquery_serializeOpModifyTargetGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1701,15 @@ func (m *awsAwsquery_serializeOpModifyTargetGroupAttributes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1548,7 +1765,15 @@ func (m *awsAwsquery_serializeOpRegisterTargets) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1604,7 +1829,15 @@ func (m *awsAwsquery_serializeOpRemoveListenerCertificates) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1660,7 +1893,15 @@ func (m *awsAwsquery_serializeOpRemoveTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1716,7 +1957,15 @@ func (m *awsAwsquery_serializeOpSetIpAddressType) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1772,7 +2021,15 @@ func (m *awsAwsquery_serializeOpSetRulePriorities) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1828,7 +2085,15 @@ func (m *awsAwsquery_serializeOpSetSecurityGroups) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1884,7 +2149,15 @@ func (m *awsAwsquery_serializeOpSetSubnets) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/emr/serializers.go b/service/emr/serializers.go index 3651dc213e4..537bad084cc 100644 --- a/service/emr/serializers.go +++ b/service/emr/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAddInstanceFleet struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpAddInstanceFleet) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpAddInstanceGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpAddJobFlowSteps) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpAddTags) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpCancelSteps) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpCreateSecurityConfiguration) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpCreateStudio) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpCreateStudioSessionMapping) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpDeleteSecurityConfiguration) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDeleteStudio) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDeleteStudioSessionMapping) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDescribeCluster) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDescribeJobFlows) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDescribeNotebookExecution) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpDescribeReleaseLabel) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpDescribeSecurityConfiguration) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDescribeStep) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpDescribeStudio) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpGetAutoTerminationPolicy) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpGetBlockPublicAccessConfiguration) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpGetManagedScalingPolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpGetStudioSessionMapping) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpListBootstrapActions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpListClusters) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpListInstanceFleets) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpListInstanceGroups) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpListInstances) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpListNotebookExecutions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpListReleaseLabels) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpListSecurityConfigurations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpListSteps) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpListStudios) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpListStudioSessionMappings) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpModifyCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpModifyInstanceFleet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpModifyInstanceGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpPutAutoScalingPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpPutAutoTerminationPolicy) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpPutBlockPublicAccessConfiguration) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpPutManagedScalingPolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpRemoveAutoScalingPolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpRemoveAutoTerminationPolicy) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpRemoveManagedScalingPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpRemoveTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpRunJobFlow) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpSetTerminationProtection) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpSetVisibleToAllUsers) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpStartNotebookExecution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpStopNotebookExecution) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpTerminateJobFlows) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpUpdateStudio) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2434,7 +2843,15 @@ func (m *awsAwsjson11_serializeOpUpdateStudioSessionMapping) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/eventbridge/serializers.go b/service/eventbridge/serializers.go index e4a3c95834c..d1a860ae661 100644 --- a/service/eventbridge/serializers.go +++ b/service/eventbridge/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpActivateEventSource struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpActivateEventSource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCancelReplay) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateApiDestination) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateArchive) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateEventBus) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreatePartnerEventSource) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeactivateEventSource) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeauthorizeConnection) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteApiDestination) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteArchive) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteEventBus) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeletePartnerEventSource) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeApiDestination) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeArchive) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventBus) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventSource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribePartnerEventSource) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribeReplay) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDescribeRule) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDisableRule) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpEnableRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListApiDestinations) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListArchives) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListConnections) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListEventBuses) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListEventSources) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListPartnerEventSourceAccounts) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListPartnerEventSources) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListReplays) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListRuleNamesByTarget) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListRules) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpListTargetsByRule) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpPutEvents) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpPutPartnerEvents) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpPutPermission) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpPutRule) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpPutTargets) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpRemovePermission) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpRemoveTargets) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpStartReplay) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpTestEventPattern) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpUpdateApiDestination) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpUpdateArchive) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpUpdateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/firehose/serializers.go b/service/firehose/serializers.go index 2f67a061c4b..1d900e759e7 100644 --- a/service/firehose/serializers.go +++ b/service/firehose/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateDeliveryStream struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateDeliveryStream) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpDeleteDeliveryStream) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDescribeDeliveryStream) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpListDeliveryStreams) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpListTagsForDeliveryStream) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpPutRecord) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpPutRecordBatch) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpStartDeliveryStreamEncryption) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpStopDeliveryStreamEncryption) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpTagDeliveryStream) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpUntagDeliveryStream) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpUpdateDestination) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/fms/serializers.go b/service/fms/serializers.go index 69c1fb6a572..bc405a344f3 100644 --- a/service/fms/serializers.go +++ b/service/fms/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateAdminAccount struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateAdminAccount) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpDeleteAppsList) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDeleteNotificationChannel) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDeletePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteProtocolsList) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDisassociateAdminAccount) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpGetAdminAccount) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpGetAppsList) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpGetComplianceDetail) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpGetNotificationChannel) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpGetPolicy) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpGetProtectionStatus) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpGetProtocolsList) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpGetViolationDetails) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListAppsLists) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpListComplianceStatus) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpListMemberAccounts) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpListPolicies) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpListProtocolsLists) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpPutAppsList) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpPutNotificationChannel) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpPutPolicy) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpPutProtocolsList) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/forecast/serializers.go b/service/forecast/serializers.go index f276e770deb..95b1a62c830 100644 --- a/service/forecast/serializers.go +++ b/service/forecast/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateDataset struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateDatasetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateDatasetImportJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateForecast) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateForecastExportJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreatePredictor) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreatePredictorBacktestExportJob) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteDatasetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteDatasetImportJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteForecast) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteForecastExportJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeletePredictor) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeletePredictorBacktestExportJob) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourceTree) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeDataset) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeDatasetGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeDatasetImportJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeForecast) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeForecastExportJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribePredictor) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribePredictorBacktestExportJob) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpGetAccuracyMetrics) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpListDatasetGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpListDatasetImportJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListDatasets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListForecastExportJobs) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListForecasts) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListPredictorBacktestExportJobs) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListPredictors) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpStopResource) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpUpdateDatasetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/forecastquery/serializers.go b/service/forecastquery/serializers.go index 84713ba04b0..c7f9df8daf8 100644 --- a/service/forecastquery/serializers.go +++ b/service/forecastquery/serializers.go @@ -11,6 +11,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpQueryForecast struct { @@ -34,7 +35,15 @@ func (m *awsAwsjson11_serializeOpQueryForecast) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/frauddetector/serializers.go b/service/frauddetector/serializers.go index ad190c7b604..be1b0532565 100644 --- a/service/frauddetector/serializers.go +++ b/service/frauddetector/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpBatchCreateVariable) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpBatchGetVariable) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCancelBatchImportJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCancelBatchPredictionJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateBatchImportJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateBatchPredictionJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateDetectorVersion) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateModel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateModelVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpCreateRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpCreateVariable) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteBatchImportJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteBatchPredictionJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteDetector) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteDetectorVersion) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteEntityType) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDeleteEvent) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDeleteEventsByEventType) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDeleteEventType) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDeleteExternalModel) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDeleteLabel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDeleteModel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDeleteModelVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDeleteOutcome) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDeleteRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDeleteVariable) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDescribeDetector) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpDescribeModelVersions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpGetBatchImportJobs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpGetBatchPredictionJobs) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpGetDeleteEventsByEventTypeStatus) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpGetDetectors) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpGetDetectorVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpGetEntityTypes) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpGetEvent) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpGetEventPrediction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpGetEventTypes) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpGetExternalModels) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpGetKMSEncryptionKey) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1864,7 +2177,15 @@ func (m *awsAwsjson11_serializeOpGetLabels) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1911,7 +2232,15 @@ func (m *awsAwsjson11_serializeOpGetModels) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1958,7 +2287,15 @@ func (m *awsAwsjson11_serializeOpGetModelVersion) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2005,7 +2342,15 @@ func (m *awsAwsjson11_serializeOpGetOutcomes) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2397,15 @@ func (m *awsAwsjson11_serializeOpGetRules) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2099,7 +2452,15 @@ func (m *awsAwsjson11_serializeOpGetVariables) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2146,7 +2507,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2193,7 +2562,15 @@ func (m *awsAwsjson11_serializeOpPutDetector) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2240,7 +2617,15 @@ func (m *awsAwsjson11_serializeOpPutEntityType) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2287,7 +2672,15 @@ func (m *awsAwsjson11_serializeOpPutEventType) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2334,7 +2727,15 @@ func (m *awsAwsjson11_serializeOpPutExternalModel) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2381,7 +2782,15 @@ func (m *awsAwsjson11_serializeOpPutKMSEncryptionKey) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2428,7 +2837,15 @@ func (m *awsAwsjson11_serializeOpPutLabel) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2475,7 +2892,15 @@ func (m *awsAwsjson11_serializeOpPutOutcome) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2522,7 +2947,15 @@ func (m *awsAwsjson11_serializeOpSendEvent) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2569,7 +3002,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2616,7 +3057,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2663,7 +3112,15 @@ func (m *awsAwsjson11_serializeOpUpdateDetectorVersion) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2710,7 +3167,15 @@ func (m *awsAwsjson11_serializeOpUpdateDetectorVersionMetadata) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2757,7 +3222,15 @@ func (m *awsAwsjson11_serializeOpUpdateDetectorVersionStatus) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2804,7 +3277,15 @@ func (m *awsAwsjson11_serializeOpUpdateEventLabel) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2851,7 +3332,15 @@ func (m *awsAwsjson11_serializeOpUpdateModel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2898,7 +3387,15 @@ func (m *awsAwsjson11_serializeOpUpdateModelVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2945,7 +3442,15 @@ func (m *awsAwsjson11_serializeOpUpdateModelVersionStatus) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2992,7 +3497,15 @@ func (m *awsAwsjson11_serializeOpUpdateRuleMetadata) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3039,7 +3552,15 @@ func (m *awsAwsjson11_serializeOpUpdateRuleVersion) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3086,7 +3607,15 @@ func (m *awsAwsjson11_serializeOpUpdateVariable) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/fsx/serializers.go b/service/fsx/serializers.go index 406ae3da609..12e4f02ee1e 100644 --- a/service/fsx/serializers.go +++ b/service/fsx/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateFileSystemAliases struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateFileSystemAliases) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCancelDataRepositoryTask) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCopyBackup) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateBackup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateDataRepositoryTask) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateFileSystem) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateFileSystemFromBackup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateStorageVirtualMachine) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateVolumeFromBackup) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDeleteBackup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDeleteFileSystem) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDeleteStorageVirtualMachine) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDeleteVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDescribeBackups) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDescribeDataRepositoryTasks) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDescribeFileSystemAliases) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDescribeFileSystems) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDescribeStorageVirtualMachines) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDescribeVolumes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDisassociateFileSystemAliases) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpUpdateFileSystem) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpUpdateStorageVirtualMachine) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpUpdateVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/gamelift/serializers.go b/service/gamelift/serializers.go index 96cf0d69418..0fb351dd472 100644 --- a/service/gamelift/serializers.go +++ b/service/gamelift/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAcceptMatch struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpAcceptMatch) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpClaimGameServer) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpCreateAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpCreateBuild) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpCreateFleet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpCreateFleetLocations) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpCreateGameServerGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpCreateGameSession) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpCreateGameSessionQueue) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpCreateMatchmakingConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpCreateMatchmakingRuleSet) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpCreatePlayerSession) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpCreatePlayerSessions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpCreateScript) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpCreateVpcPeeringAuthorization) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpCreateVpcPeeringConnection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDeleteAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpDeleteBuild) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpDeleteFleet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpDeleteFleetLocations) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpDeleteGameServerGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpDeleteGameSessionQueue) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpDeleteMatchmakingConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpDeleteMatchmakingRuleSet) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpDeleteScalingPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpDeleteScript) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpDeleteVpcPeeringAuthorization) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpDeleteVpcPeeringConnection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpDeregisterGameServer) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpDescribeAlias) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpDescribeBuild) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpDescribeEC2InstanceLimits) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetAttributes) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetCapacity) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetEvents) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetLocationAttributes) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetLocationCapacity) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetLocationUtilization) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetPortSettings) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpDescribeFleetUtilization) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpDescribeGameServer) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpDescribeGameServerGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpDescribeGameServerInstances) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpDescribeGameSessionDetails) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpDescribeGameSessionPlacement) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpDescribeGameSessionQueues) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpDescribeGameSessions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstances) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpDescribeMatchmaking) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpDescribeMatchmakingConfigurations) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpDescribeMatchmakingRuleSets) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2434,7 +2843,15 @@ func (m *awsAwsjson11_serializeOpDescribePlayerSessions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2481,7 +2898,15 @@ func (m *awsAwsjson11_serializeOpDescribeRuntimeConfiguration) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2528,7 +2953,15 @@ func (m *awsAwsjson11_serializeOpDescribeScalingPolicies) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2575,7 +3008,15 @@ func (m *awsAwsjson11_serializeOpDescribeScript) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2622,7 +3063,15 @@ func (m *awsAwsjson11_serializeOpDescribeVpcPeeringAuthorizations) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2669,7 +3118,15 @@ func (m *awsAwsjson11_serializeOpDescribeVpcPeeringConnections) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2716,7 +3173,15 @@ func (m *awsAwsjson11_serializeOpGetGameSessionLogUrl) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2763,7 +3228,15 @@ func (m *awsAwsjson11_serializeOpGetInstanceAccess) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2810,7 +3283,15 @@ func (m *awsAwsjson11_serializeOpListAliases) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2857,7 +3338,15 @@ func (m *awsAwsjson11_serializeOpListBuilds) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2904,7 +3393,15 @@ func (m *awsAwsjson11_serializeOpListFleets) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2951,7 +3448,15 @@ func (m *awsAwsjson11_serializeOpListGameServerGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2998,7 +3503,15 @@ func (m *awsAwsjson11_serializeOpListGameServers) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3045,7 +3558,15 @@ func (m *awsAwsjson11_serializeOpListScripts) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3092,7 +3613,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3139,7 +3668,15 @@ func (m *awsAwsjson11_serializeOpPutScalingPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3186,7 +3723,15 @@ func (m *awsAwsjson11_serializeOpRegisterGameServer) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3233,7 +3778,15 @@ func (m *awsAwsjson11_serializeOpRequestUploadCredentials) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3280,7 +3833,15 @@ func (m *awsAwsjson11_serializeOpResolveAlias) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3327,7 +3888,15 @@ func (m *awsAwsjson11_serializeOpResumeGameServerGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3374,7 +3943,15 @@ func (m *awsAwsjson11_serializeOpSearchGameSessions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3421,7 +3998,15 @@ func (m *awsAwsjson11_serializeOpStartFleetActions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3468,7 +4053,15 @@ func (m *awsAwsjson11_serializeOpStartGameSessionPlacement) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3515,7 +4108,15 @@ func (m *awsAwsjson11_serializeOpStartMatchBackfill) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3562,7 +4163,15 @@ func (m *awsAwsjson11_serializeOpStartMatchmaking) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3609,7 +4218,15 @@ func (m *awsAwsjson11_serializeOpStopFleetActions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3656,7 +4273,15 @@ func (m *awsAwsjson11_serializeOpStopGameSessionPlacement) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3703,7 +4328,15 @@ func (m *awsAwsjson11_serializeOpStopMatchmaking) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3750,7 +4383,15 @@ func (m *awsAwsjson11_serializeOpSuspendGameServerGroup) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3797,7 +4438,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3844,7 +4493,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3891,7 +4548,15 @@ func (m *awsAwsjson11_serializeOpUpdateAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3938,7 +4603,15 @@ func (m *awsAwsjson11_serializeOpUpdateBuild) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3985,7 +4658,15 @@ func (m *awsAwsjson11_serializeOpUpdateFleetAttributes) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4032,7 +4713,15 @@ func (m *awsAwsjson11_serializeOpUpdateFleetCapacity) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4079,7 +4768,15 @@ func (m *awsAwsjson11_serializeOpUpdateFleetPortSettings) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4126,7 +4823,15 @@ func (m *awsAwsjson11_serializeOpUpdateGameServer) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4173,7 +4878,15 @@ func (m *awsAwsjson11_serializeOpUpdateGameServerGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4220,7 +4933,15 @@ func (m *awsAwsjson11_serializeOpUpdateGameSession) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4267,7 +4988,15 @@ func (m *awsAwsjson11_serializeOpUpdateGameSessionQueue) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4314,7 +5043,15 @@ func (m *awsAwsjson11_serializeOpUpdateMatchmakingConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4361,7 +5098,15 @@ func (m *awsAwsjson11_serializeOpUpdateRuntimeConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4408,7 +5153,15 @@ func (m *awsAwsjson11_serializeOpUpdateScript) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4455,7 +5208,15 @@ func (m *awsAwsjson11_serializeOpValidateMatchmakingRuleSet) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/glacier/serializers.go b/service/glacier/serializers.go index 4e0d561193e..e89a44d1ef1 100644 --- a/service/glacier/serializers.go +++ b/service/glacier/serializers.go @@ -1272,11 +1272,11 @@ func (m *awsRestjson1_serializeOpInitiateJob) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.JobParameters != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.JobParameters != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentJobParameters(input.JobParameters, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -1285,6 +1285,14 @@ func (m *awsRestjson1_serializeOpInitiateJob) HandleSerialize(ctx context.Contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -1431,11 +1439,11 @@ func (m *awsRestjson1_serializeOpInitiateVaultLock) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if input.Policy != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.Policy != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentVaultLockPolicy(input.Policy, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -1444,6 +1452,14 @@ func (m *awsRestjson1_serializeOpInitiateVaultLock) HandleSerialize(ctx context. if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -2179,11 +2195,11 @@ func (m *awsRestjson1_serializeOpSetVaultAccessPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if input.Policy != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.Policy != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentVaultAccessPolicy(input.Policy, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -2192,6 +2208,14 @@ func (m *awsRestjson1_serializeOpSetVaultAccessPolicy) HandleSerialize(ctx conte if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -2261,11 +2285,11 @@ func (m *awsRestjson1_serializeOpSetVaultNotifications) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.VaultNotificationConfig != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.VaultNotificationConfig != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentVaultNotificationConfig(input.VaultNotificationConfig, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -2274,6 +2298,14 @@ func (m *awsRestjson1_serializeOpSetVaultNotifications) HandleSerialize(ctx cont if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { diff --git a/service/globalaccelerator/serializers.go b/service/globalaccelerator/serializers.go index dc6f351fb68..da0c9a9e546 100644 --- a/service/globalaccelerator/serializers.go +++ b/service/globalaccelerator/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAddCustomRoutingEndpoints struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddCustomRoutingEndpoints) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAdvertiseByoipCidr) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpAllowCustomRoutingTraffic) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateAccelerator) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateCustomRoutingAccelerator) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateCustomRoutingEndpointGroup) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateCustomRoutingListener) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateEndpointGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateListener) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteAccelerator) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteCustomRoutingAccelerator) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteCustomRoutingEndpointGroup) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteCustomRoutingListener) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteEndpointGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteListener) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDenyCustomRoutingTraffic) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDeprovisionByoipCidr) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccelerator) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeAcceleratorAttributes) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeCustomRoutingAccelerator) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribeCustomRoutingAcceleratorAttributes) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribeCustomRoutingEndpointGroup) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDescribeCustomRoutingListener) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDescribeEndpointGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDescribeListener) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListAccelerators) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListByoipCidrs) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListCustomRoutingAccelerators) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListCustomRoutingEndpointGroups) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListCustomRoutingListeners) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListCustomRoutingPortMappings) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListCustomRoutingPortMappingsByDestination) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListEndpointGroups) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListListeners) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpProvisionByoipCidr) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpRemoveCustomRoutingEndpoints) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpUpdateAccelerator) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpUpdateAcceleratorAttributes) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpUpdateCustomRoutingAccelerator) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpUpdateCustomRoutingAcceleratorAttributes) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpUpdateCustomRoutingListener) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpUpdateEndpointGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpUpdateListener) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpWithdrawByoipCidr) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/glue/serializers.go b/service/glue/serializers.go index e4284c85eee..57012eea593 100644 --- a/service/glue/serializers.go +++ b/service/glue/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpBatchCreatePartition struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpBatchCreatePartition) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteConnection) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpBatchDeletePartition) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteTable) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteTableVersion) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpBatchGetBlueprints) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpBatchGetCrawlers) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpBatchGetDevEndpoints) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpBatchGetJobs) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpBatchGetPartition) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpBatchGetTriggers) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpBatchGetWorkflows) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpBatchStopJobRun) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpBatchUpdatePartition) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpCancelMLTaskRun) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpCheckSchemaVersionValidity) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpCreateBlueprint) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpCreateClassifier) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpCreateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpCreateCrawler) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpCreateDatabase) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpCreateDevEndpoint) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpCreateJob) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpCreateMLTransform) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpCreatePartition) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpCreatePartitionIndex) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpCreateRegistry) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpCreateSchema) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpCreateScript) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpCreateSecurityConfiguration) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpCreateTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpCreateTrigger) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpCreateUserDefinedFunction) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkflow) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpDeleteBlueprint) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpDeleteClassifier) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpDeleteColumnStatisticsForPartition) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpDeleteColumnStatisticsForTable) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpDeleteConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpDeleteCrawler) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpDeleteDatabase) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpDeleteDevEndpoint) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpDeleteJob) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpDeleteMLTransform) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpDeletePartition) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpDeletePartitionIndex) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpDeleteRegistry) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpDeleteSchema) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpDeleteSchemaVersions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpDeleteSecurityConfiguration) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2434,7 +2843,15 @@ func (m *awsAwsjson11_serializeOpDeleteTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2481,7 +2898,15 @@ func (m *awsAwsjson11_serializeOpDeleteTableVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2528,7 +2953,15 @@ func (m *awsAwsjson11_serializeOpDeleteTrigger) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2575,7 +3008,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserDefinedFunction) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2622,7 +3063,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkflow) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2669,7 +3118,15 @@ func (m *awsAwsjson11_serializeOpGetBlueprint) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2716,7 +3173,15 @@ func (m *awsAwsjson11_serializeOpGetBlueprintRun) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2763,7 +3228,15 @@ func (m *awsAwsjson11_serializeOpGetBlueprintRuns) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2810,7 +3283,15 @@ func (m *awsAwsjson11_serializeOpGetCatalogImportStatus) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2857,7 +3338,15 @@ func (m *awsAwsjson11_serializeOpGetClassifier) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2904,7 +3393,15 @@ func (m *awsAwsjson11_serializeOpGetClassifiers) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2951,7 +3448,15 @@ func (m *awsAwsjson11_serializeOpGetColumnStatisticsForPartition) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2998,7 +3503,15 @@ func (m *awsAwsjson11_serializeOpGetColumnStatisticsForTable) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3045,7 +3558,15 @@ func (m *awsAwsjson11_serializeOpGetConnection) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3092,7 +3613,15 @@ func (m *awsAwsjson11_serializeOpGetConnections) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3139,7 +3668,15 @@ func (m *awsAwsjson11_serializeOpGetCrawler) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3186,7 +3723,15 @@ func (m *awsAwsjson11_serializeOpGetCrawlerMetrics) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3233,7 +3778,15 @@ func (m *awsAwsjson11_serializeOpGetCrawlers) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3280,7 +3833,15 @@ func (m *awsAwsjson11_serializeOpGetDatabase) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3327,7 +3888,15 @@ func (m *awsAwsjson11_serializeOpGetDatabases) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3374,7 +3943,15 @@ func (m *awsAwsjson11_serializeOpGetDataCatalogEncryptionSettings) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3421,7 +3998,15 @@ func (m *awsAwsjson11_serializeOpGetDataflowGraph) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3468,7 +4053,15 @@ func (m *awsAwsjson11_serializeOpGetDevEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3515,7 +4108,15 @@ func (m *awsAwsjson11_serializeOpGetDevEndpoints) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3562,7 +4163,15 @@ func (m *awsAwsjson11_serializeOpGetJob) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3609,7 +4218,15 @@ func (m *awsAwsjson11_serializeOpGetJobBookmark) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3656,7 +4273,15 @@ func (m *awsAwsjson11_serializeOpGetJobRun) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3703,7 +4328,15 @@ func (m *awsAwsjson11_serializeOpGetJobRuns) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3750,7 +4383,15 @@ func (m *awsAwsjson11_serializeOpGetJobs) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3797,7 +4438,15 @@ func (m *awsAwsjson11_serializeOpGetMapping) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3844,7 +4493,15 @@ func (m *awsAwsjson11_serializeOpGetMLTaskRun) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3891,7 +4548,15 @@ func (m *awsAwsjson11_serializeOpGetMLTaskRuns) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3938,7 +4603,15 @@ func (m *awsAwsjson11_serializeOpGetMLTransform) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3985,7 +4658,15 @@ func (m *awsAwsjson11_serializeOpGetMLTransforms) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4032,7 +4713,15 @@ func (m *awsAwsjson11_serializeOpGetPartition) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4079,7 +4768,15 @@ func (m *awsAwsjson11_serializeOpGetPartitionIndexes) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4126,7 +4823,15 @@ func (m *awsAwsjson11_serializeOpGetPartitions) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4173,7 +4878,15 @@ func (m *awsAwsjson11_serializeOpGetPlan) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4220,7 +4933,15 @@ func (m *awsAwsjson11_serializeOpGetRegistry) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4267,7 +4988,15 @@ func (m *awsAwsjson11_serializeOpGetResourcePolicies) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4314,7 +5043,15 @@ func (m *awsAwsjson11_serializeOpGetResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4361,7 +5098,15 @@ func (m *awsAwsjson11_serializeOpGetSchema) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4408,7 +5153,15 @@ func (m *awsAwsjson11_serializeOpGetSchemaByDefinition) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4455,7 +5208,15 @@ func (m *awsAwsjson11_serializeOpGetSchemaVersion) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4502,7 +5263,15 @@ func (m *awsAwsjson11_serializeOpGetSchemaVersionsDiff) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4549,7 +5318,15 @@ func (m *awsAwsjson11_serializeOpGetSecurityConfiguration) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4596,7 +5373,15 @@ func (m *awsAwsjson11_serializeOpGetSecurityConfigurations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4643,7 +5428,15 @@ func (m *awsAwsjson11_serializeOpGetTable) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4690,7 +5483,15 @@ func (m *awsAwsjson11_serializeOpGetTables) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4737,7 +5538,15 @@ func (m *awsAwsjson11_serializeOpGetTableVersion) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4784,7 +5593,15 @@ func (m *awsAwsjson11_serializeOpGetTableVersions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4831,7 +5648,15 @@ func (m *awsAwsjson11_serializeOpGetTags) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4878,7 +5703,15 @@ func (m *awsAwsjson11_serializeOpGetTrigger) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4925,7 +5758,15 @@ func (m *awsAwsjson11_serializeOpGetTriggers) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4972,7 +5813,15 @@ func (m *awsAwsjson11_serializeOpGetUserDefinedFunction) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5019,7 +5868,15 @@ func (m *awsAwsjson11_serializeOpGetUserDefinedFunctions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5066,7 +5923,15 @@ func (m *awsAwsjson11_serializeOpGetWorkflow) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5113,7 +5978,15 @@ func (m *awsAwsjson11_serializeOpGetWorkflowRun) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5160,7 +6033,15 @@ func (m *awsAwsjson11_serializeOpGetWorkflowRunProperties) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5207,7 +6088,15 @@ func (m *awsAwsjson11_serializeOpGetWorkflowRuns) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5254,7 +6143,15 @@ func (m *awsAwsjson11_serializeOpImportCatalogToGlue) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5301,7 +6198,15 @@ func (m *awsAwsjson11_serializeOpListBlueprints) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5348,7 +6253,15 @@ func (m *awsAwsjson11_serializeOpListCrawlers) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5395,7 +6308,15 @@ func (m *awsAwsjson11_serializeOpListDevEndpoints) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5442,7 +6363,15 @@ func (m *awsAwsjson11_serializeOpListJobs) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5489,7 +6418,15 @@ func (m *awsAwsjson11_serializeOpListMLTransforms) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5536,7 +6473,15 @@ func (m *awsAwsjson11_serializeOpListRegistries) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5583,7 +6528,15 @@ func (m *awsAwsjson11_serializeOpListSchemas) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5630,7 +6583,15 @@ func (m *awsAwsjson11_serializeOpListSchemaVersions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5677,7 +6638,15 @@ func (m *awsAwsjson11_serializeOpListTriggers) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5724,7 +6693,15 @@ func (m *awsAwsjson11_serializeOpListWorkflows) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5771,7 +6748,15 @@ func (m *awsAwsjson11_serializeOpPutDataCatalogEncryptionSettings) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5818,7 +6803,15 @@ func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5865,7 +6858,15 @@ func (m *awsAwsjson11_serializeOpPutSchemaVersionMetadata) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5912,7 +6913,15 @@ func (m *awsAwsjson11_serializeOpPutWorkflowRunProperties) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5959,7 +6968,15 @@ func (m *awsAwsjson11_serializeOpQuerySchemaVersionMetadata) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6006,7 +7023,15 @@ func (m *awsAwsjson11_serializeOpRegisterSchemaVersion) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6053,7 +7078,15 @@ func (m *awsAwsjson11_serializeOpRemoveSchemaVersionMetadata) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6100,7 +7133,15 @@ func (m *awsAwsjson11_serializeOpResetJobBookmark) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6147,7 +7188,15 @@ func (m *awsAwsjson11_serializeOpResumeWorkflowRun) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6194,7 +7243,15 @@ func (m *awsAwsjson11_serializeOpSearchTables) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6241,7 +7298,15 @@ func (m *awsAwsjson11_serializeOpStartBlueprintRun) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6288,7 +7353,15 @@ func (m *awsAwsjson11_serializeOpStartCrawler) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6335,7 +7408,15 @@ func (m *awsAwsjson11_serializeOpStartCrawlerSchedule) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6382,7 +7463,15 @@ func (m *awsAwsjson11_serializeOpStartExportLabelsTaskRun) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6429,7 +7518,15 @@ func (m *awsAwsjson11_serializeOpStartImportLabelsTaskRun) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6476,7 +7573,15 @@ func (m *awsAwsjson11_serializeOpStartJobRun) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6523,7 +7628,15 @@ func (m *awsAwsjson11_serializeOpStartMLEvaluationTaskRun) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6570,7 +7683,15 @@ func (m *awsAwsjson11_serializeOpStartMLLabelingSetGenerationTaskRun) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6617,7 +7738,15 @@ func (m *awsAwsjson11_serializeOpStartTrigger) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6664,7 +7793,15 @@ func (m *awsAwsjson11_serializeOpStartWorkflowRun) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6711,7 +7848,15 @@ func (m *awsAwsjson11_serializeOpStopCrawler) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6758,7 +7903,15 @@ func (m *awsAwsjson11_serializeOpStopCrawlerSchedule) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6805,7 +7958,15 @@ func (m *awsAwsjson11_serializeOpStopTrigger) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6852,7 +8013,15 @@ func (m *awsAwsjson11_serializeOpStopWorkflowRun) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6899,7 +8068,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6946,7 +8123,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6993,7 +8178,15 @@ func (m *awsAwsjson11_serializeOpUpdateBlueprint) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7040,7 +8233,15 @@ func (m *awsAwsjson11_serializeOpUpdateClassifier) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7087,7 +8288,15 @@ func (m *awsAwsjson11_serializeOpUpdateColumnStatisticsForPartition) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7134,7 +8343,15 @@ func (m *awsAwsjson11_serializeOpUpdateColumnStatisticsForTable) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7181,7 +8398,15 @@ func (m *awsAwsjson11_serializeOpUpdateConnection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7228,7 +8453,15 @@ func (m *awsAwsjson11_serializeOpUpdateCrawler) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7275,7 +8508,15 @@ func (m *awsAwsjson11_serializeOpUpdateCrawlerSchedule) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7322,7 +8563,15 @@ func (m *awsAwsjson11_serializeOpUpdateDatabase) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7369,7 +8618,15 @@ func (m *awsAwsjson11_serializeOpUpdateDevEndpoint) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7416,7 +8673,15 @@ func (m *awsAwsjson11_serializeOpUpdateJob) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7463,7 +8728,15 @@ func (m *awsAwsjson11_serializeOpUpdateMLTransform) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7510,7 +8783,15 @@ func (m *awsAwsjson11_serializeOpUpdatePartition) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7557,7 +8838,15 @@ func (m *awsAwsjson11_serializeOpUpdateRegistry) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7604,7 +8893,15 @@ func (m *awsAwsjson11_serializeOpUpdateSchema) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7651,7 +8948,15 @@ func (m *awsAwsjson11_serializeOpUpdateTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7698,7 +9003,15 @@ func (m *awsAwsjson11_serializeOpUpdateTrigger) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7745,7 +9058,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserDefinedFunction) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7792,7 +9113,15 @@ func (m *awsAwsjson11_serializeOpUpdateWorkflow) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/health/serializers.go b/service/health/serializers.go index b301889708a..10309ae2021 100644 --- a/service/health/serializers.go +++ b/service/health/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpDescribeAffectedAccountsForOrganization) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpDescribeAffectedEntities) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpDescribeAffectedEntitiesForOrganization) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpDescribeEntityAggregates) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventAggregates) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventDetails) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventDetailsForOrganization) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpDescribeEvents) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventsForOrganization) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventTypes) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDescribeHealthServiceStatusForOrganization) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -549,7 +638,15 @@ func (m *awsAwsjson11_serializeOpDisableHealthServiceAccessForOrganization) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -591,7 +688,15 @@ func (m *awsAwsjson11_serializeOpEnableHealthServiceAccessForOrganization) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/healthlake/serializers.go b/service/healthlake/serializers.go index 7ec18d2a83f..489e303480b 100644 --- a/service/healthlake/serializers.go +++ b/service/healthlake/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCreateFHIRDatastore struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson10_serializeOpCreateFHIRDatastore) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson10_serializeOpDeleteFHIRDatastore) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson10_serializeOpDescribeFHIRDatastore) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson10_serializeOpDescribeFHIRExportJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson10_serializeOpDescribeFHIRImportJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson10_serializeOpListFHIRDatastores) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson10_serializeOpListFHIRExportJobs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson10_serializeOpListFHIRImportJobs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson10_serializeOpStartFHIRExportJob) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson10_serializeOpStartFHIRImportJob) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/iam/serializers.go b/service/iam/serializers.go index 112979b93c2..5a07adc2adf 100644 --- a/service/iam/serializers.go +++ b/service/iam/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider struct { @@ -35,7 +36,15 @@ func (m *awsAwsquery_serializeOpAddClientIDToOpenIDConnectProvider) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -91,7 +100,15 @@ func (m *awsAwsquery_serializeOpAddRoleToInstanceProfile) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -147,7 +164,15 @@ func (m *awsAwsquery_serializeOpAddUserToGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -203,7 +228,15 @@ func (m *awsAwsquery_serializeOpAttachGroupPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -259,7 +292,15 @@ func (m *awsAwsquery_serializeOpAttachRolePolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -315,7 +356,15 @@ func (m *awsAwsquery_serializeOpAttachUserPolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -371,7 +420,15 @@ func (m *awsAwsquery_serializeOpChangePassword) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -427,7 +484,15 @@ func (m *awsAwsquery_serializeOpCreateAccessKey) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -483,7 +548,15 @@ func (m *awsAwsquery_serializeOpCreateAccountAlias) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -539,7 +612,15 @@ func (m *awsAwsquery_serializeOpCreateGroup) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -595,7 +676,15 @@ func (m *awsAwsquery_serializeOpCreateInstanceProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -651,7 +740,15 @@ func (m *awsAwsquery_serializeOpCreateLoginProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -707,7 +804,15 @@ func (m *awsAwsquery_serializeOpCreateOpenIDConnectProvider) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -763,7 +868,15 @@ func (m *awsAwsquery_serializeOpCreatePolicy) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -819,7 +932,15 @@ func (m *awsAwsquery_serializeOpCreatePolicyVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -875,7 +996,15 @@ func (m *awsAwsquery_serializeOpCreateRole) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -931,7 +1060,15 @@ func (m *awsAwsquery_serializeOpCreateSAMLProvider) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -987,7 +1124,15 @@ func (m *awsAwsquery_serializeOpCreateServiceLinkedRole) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1043,7 +1188,15 @@ func (m *awsAwsquery_serializeOpCreateServiceSpecificCredential) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1099,7 +1252,15 @@ func (m *awsAwsquery_serializeOpCreateUser) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1155,7 +1316,15 @@ func (m *awsAwsquery_serializeOpCreateVirtualMFADevice) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1380,15 @@ func (m *awsAwsquery_serializeOpDeactivateMFADevice) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1267,7 +1444,15 @@ func (m *awsAwsquery_serializeOpDeleteAccessKey) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1323,7 +1508,15 @@ func (m *awsAwsquery_serializeOpDeleteAccountAlias) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1379,7 +1572,15 @@ func (m *awsAwsquery_serializeOpDeleteAccountPasswordPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1431,7 +1632,15 @@ func (m *awsAwsquery_serializeOpDeleteGroup) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1487,7 +1696,15 @@ func (m *awsAwsquery_serializeOpDeleteGroupPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1543,7 +1760,15 @@ func (m *awsAwsquery_serializeOpDeleteInstanceProfile) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1599,7 +1824,15 @@ func (m *awsAwsquery_serializeOpDeleteLoginProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1655,7 +1888,15 @@ func (m *awsAwsquery_serializeOpDeleteOpenIDConnectProvider) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1711,7 +1952,15 @@ func (m *awsAwsquery_serializeOpDeletePolicy) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1767,7 +2016,15 @@ func (m *awsAwsquery_serializeOpDeletePolicyVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2080,15 @@ func (m *awsAwsquery_serializeOpDeleteRole) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1879,7 +2144,15 @@ func (m *awsAwsquery_serializeOpDeleteRolePermissionsBoundary) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1935,7 +2208,15 @@ func (m *awsAwsquery_serializeOpDeleteRolePolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1991,7 +2272,15 @@ func (m *awsAwsquery_serializeOpDeleteSAMLProvider) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2047,7 +2336,15 @@ func (m *awsAwsquery_serializeOpDeleteServerCertificate) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2400,15 @@ func (m *awsAwsquery_serializeOpDeleteServiceLinkedRole) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2159,7 +2464,15 @@ func (m *awsAwsquery_serializeOpDeleteServiceSpecificCredential) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2215,7 +2528,15 @@ func (m *awsAwsquery_serializeOpDeleteSigningCertificate) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2271,7 +2592,15 @@ func (m *awsAwsquery_serializeOpDeleteSSHPublicKey) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2327,7 +2656,15 @@ func (m *awsAwsquery_serializeOpDeleteUser) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2383,7 +2720,15 @@ func (m *awsAwsquery_serializeOpDeleteUserPermissionsBoundary) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2439,7 +2784,15 @@ func (m *awsAwsquery_serializeOpDeleteUserPolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2495,7 +2848,15 @@ func (m *awsAwsquery_serializeOpDeleteVirtualMFADevice) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2551,7 +2912,15 @@ func (m *awsAwsquery_serializeOpDetachGroupPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2607,7 +2976,15 @@ func (m *awsAwsquery_serializeOpDetachRolePolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2663,7 +3040,15 @@ func (m *awsAwsquery_serializeOpDetachUserPolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2719,7 +3104,15 @@ func (m *awsAwsquery_serializeOpEnableMFADevice) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2775,7 +3168,15 @@ func (m *awsAwsquery_serializeOpGenerateCredentialReport) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2827,7 +3228,15 @@ func (m *awsAwsquery_serializeOpGenerateOrganizationsAccessReport) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2883,7 +3292,15 @@ func (m *awsAwsquery_serializeOpGenerateServiceLastAccessedDetails) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2939,7 +3356,15 @@ func (m *awsAwsquery_serializeOpGetAccessKeyLastUsed) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2995,7 +3420,15 @@ func (m *awsAwsquery_serializeOpGetAccountAuthorizationDetails) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3051,7 +3484,15 @@ func (m *awsAwsquery_serializeOpGetAccountPasswordPolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3103,7 +3544,15 @@ func (m *awsAwsquery_serializeOpGetAccountSummary) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3155,7 +3604,15 @@ func (m *awsAwsquery_serializeOpGetContextKeysForCustomPolicy) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3211,7 +3668,15 @@ func (m *awsAwsquery_serializeOpGetContextKeysForPrincipalPolicy) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3267,7 +3732,15 @@ func (m *awsAwsquery_serializeOpGetCredentialReport) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3319,7 +3792,15 @@ func (m *awsAwsquery_serializeOpGetGroup) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3375,7 +3856,15 @@ func (m *awsAwsquery_serializeOpGetGroupPolicy) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3431,7 +3920,15 @@ func (m *awsAwsquery_serializeOpGetInstanceProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3487,7 +3984,15 @@ func (m *awsAwsquery_serializeOpGetLoginProfile) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3543,7 +4048,15 @@ func (m *awsAwsquery_serializeOpGetOpenIDConnectProvider) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3599,7 +4112,15 @@ func (m *awsAwsquery_serializeOpGetOrganizationsAccessReport) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3655,7 +4176,15 @@ func (m *awsAwsquery_serializeOpGetPolicy) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3711,7 +4240,15 @@ func (m *awsAwsquery_serializeOpGetPolicyVersion) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3767,7 +4304,15 @@ func (m *awsAwsquery_serializeOpGetRole) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3823,7 +4368,15 @@ func (m *awsAwsquery_serializeOpGetRolePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3879,7 +4432,15 @@ func (m *awsAwsquery_serializeOpGetSAMLProvider) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3935,7 +4496,15 @@ func (m *awsAwsquery_serializeOpGetServerCertificate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3991,7 +4560,15 @@ func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetails) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4047,7 +4624,15 @@ func (m *awsAwsquery_serializeOpGetServiceLastAccessedDetailsWithEntities) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4103,7 +4688,15 @@ func (m *awsAwsquery_serializeOpGetServiceLinkedRoleDeletionStatus) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4159,7 +4752,15 @@ func (m *awsAwsquery_serializeOpGetSSHPublicKey) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4215,7 +4816,15 @@ func (m *awsAwsquery_serializeOpGetUser) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4271,7 +4880,15 @@ func (m *awsAwsquery_serializeOpGetUserPolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4327,7 +4944,15 @@ func (m *awsAwsquery_serializeOpListAccessKeys) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4383,7 +5008,15 @@ func (m *awsAwsquery_serializeOpListAccountAliases) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4439,7 +5072,15 @@ func (m *awsAwsquery_serializeOpListAttachedGroupPolicies) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4495,7 +5136,15 @@ func (m *awsAwsquery_serializeOpListAttachedRolePolicies) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4551,7 +5200,15 @@ func (m *awsAwsquery_serializeOpListAttachedUserPolicies) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4607,7 +5264,15 @@ func (m *awsAwsquery_serializeOpListEntitiesForPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4663,7 +5328,15 @@ func (m *awsAwsquery_serializeOpListGroupPolicies) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4719,7 +5392,15 @@ func (m *awsAwsquery_serializeOpListGroups) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4775,7 +5456,15 @@ func (m *awsAwsquery_serializeOpListGroupsForUser) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4831,7 +5520,15 @@ func (m *awsAwsquery_serializeOpListInstanceProfiles) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4887,7 +5584,15 @@ func (m *awsAwsquery_serializeOpListInstanceProfilesForRole) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4943,7 +5648,15 @@ func (m *awsAwsquery_serializeOpListInstanceProfileTags) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4999,7 +5712,15 @@ func (m *awsAwsquery_serializeOpListMFADevices) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5055,7 +5776,15 @@ func (m *awsAwsquery_serializeOpListMFADeviceTags) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5111,7 +5840,15 @@ func (m *awsAwsquery_serializeOpListOpenIDConnectProviders) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5163,7 +5900,15 @@ func (m *awsAwsquery_serializeOpListOpenIDConnectProviderTags) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5219,7 +5964,15 @@ func (m *awsAwsquery_serializeOpListPolicies) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5275,7 +6028,15 @@ func (m *awsAwsquery_serializeOpListPoliciesGrantingServiceAccess) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5331,7 +6092,15 @@ func (m *awsAwsquery_serializeOpListPolicyTags) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5387,7 +6156,15 @@ func (m *awsAwsquery_serializeOpListPolicyVersions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5443,7 +6220,15 @@ func (m *awsAwsquery_serializeOpListRolePolicies) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5499,7 +6284,15 @@ func (m *awsAwsquery_serializeOpListRoles) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5555,7 +6348,15 @@ func (m *awsAwsquery_serializeOpListRoleTags) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5611,7 +6412,15 @@ func (m *awsAwsquery_serializeOpListSAMLProviders) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5663,7 +6472,15 @@ func (m *awsAwsquery_serializeOpListSAMLProviderTags) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5719,7 +6536,15 @@ func (m *awsAwsquery_serializeOpListServerCertificates) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5775,7 +6600,15 @@ func (m *awsAwsquery_serializeOpListServerCertificateTags) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5831,7 +6664,15 @@ func (m *awsAwsquery_serializeOpListServiceSpecificCredentials) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5887,7 +6728,15 @@ func (m *awsAwsquery_serializeOpListSigningCertificates) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5943,7 +6792,15 @@ func (m *awsAwsquery_serializeOpListSSHPublicKeys) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5999,7 +6856,15 @@ func (m *awsAwsquery_serializeOpListUserPolicies) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6055,7 +6920,15 @@ func (m *awsAwsquery_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6111,7 +6984,15 @@ func (m *awsAwsquery_serializeOpListUserTags) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6167,7 +7048,15 @@ func (m *awsAwsquery_serializeOpListVirtualMFADevices) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6223,7 +7112,15 @@ func (m *awsAwsquery_serializeOpPutGroupPolicy) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6279,7 +7176,15 @@ func (m *awsAwsquery_serializeOpPutRolePermissionsBoundary) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6335,7 +7240,15 @@ func (m *awsAwsquery_serializeOpPutRolePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6391,7 +7304,15 @@ func (m *awsAwsquery_serializeOpPutUserPermissionsBoundary) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6447,7 +7368,15 @@ func (m *awsAwsquery_serializeOpPutUserPolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6503,7 +7432,15 @@ func (m *awsAwsquery_serializeOpRemoveClientIDFromOpenIDConnectProvider) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6559,7 +7496,15 @@ func (m *awsAwsquery_serializeOpRemoveRoleFromInstanceProfile) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6615,7 +7560,15 @@ func (m *awsAwsquery_serializeOpRemoveUserFromGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6671,7 +7624,15 @@ func (m *awsAwsquery_serializeOpResetServiceSpecificCredential) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6727,7 +7688,15 @@ func (m *awsAwsquery_serializeOpResyncMFADevice) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6783,7 +7752,15 @@ func (m *awsAwsquery_serializeOpSetDefaultPolicyVersion) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6839,7 +7816,15 @@ func (m *awsAwsquery_serializeOpSetSecurityTokenServicePreferences) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6895,7 +7880,15 @@ func (m *awsAwsquery_serializeOpSimulateCustomPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6951,7 +7944,15 @@ func (m *awsAwsquery_serializeOpSimulatePrincipalPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7007,7 +8008,15 @@ func (m *awsAwsquery_serializeOpTagInstanceProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7063,7 +8072,15 @@ func (m *awsAwsquery_serializeOpTagMFADevice) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7119,7 +8136,15 @@ func (m *awsAwsquery_serializeOpTagOpenIDConnectProvider) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7175,7 +8200,15 @@ func (m *awsAwsquery_serializeOpTagPolicy) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7231,7 +8264,15 @@ func (m *awsAwsquery_serializeOpTagRole) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7287,7 +8328,15 @@ func (m *awsAwsquery_serializeOpTagSAMLProvider) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7343,7 +8392,15 @@ func (m *awsAwsquery_serializeOpTagServerCertificate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7399,7 +8456,15 @@ func (m *awsAwsquery_serializeOpTagUser) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7455,7 +8520,15 @@ func (m *awsAwsquery_serializeOpUntagInstanceProfile) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7511,7 +8584,15 @@ func (m *awsAwsquery_serializeOpUntagMFADevice) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7567,7 +8648,15 @@ func (m *awsAwsquery_serializeOpUntagOpenIDConnectProvider) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7623,7 +8712,15 @@ func (m *awsAwsquery_serializeOpUntagPolicy) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7679,7 +8776,15 @@ func (m *awsAwsquery_serializeOpUntagRole) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7735,7 +8840,15 @@ func (m *awsAwsquery_serializeOpUntagSAMLProvider) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7791,7 +8904,15 @@ func (m *awsAwsquery_serializeOpUntagServerCertificate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7847,7 +8968,15 @@ func (m *awsAwsquery_serializeOpUntagUser) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7903,7 +9032,15 @@ func (m *awsAwsquery_serializeOpUpdateAccessKey) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7959,7 +9096,15 @@ func (m *awsAwsquery_serializeOpUpdateAccountPasswordPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8015,7 +9160,15 @@ func (m *awsAwsquery_serializeOpUpdateAssumeRolePolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8071,7 +9224,15 @@ func (m *awsAwsquery_serializeOpUpdateGroup) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8127,7 +9288,15 @@ func (m *awsAwsquery_serializeOpUpdateLoginProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8183,7 +9352,15 @@ func (m *awsAwsquery_serializeOpUpdateOpenIDConnectProviderThumbprint) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8239,7 +9416,15 @@ func (m *awsAwsquery_serializeOpUpdateRole) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8295,7 +9480,15 @@ func (m *awsAwsquery_serializeOpUpdateRoleDescription) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8351,7 +9544,15 @@ func (m *awsAwsquery_serializeOpUpdateSAMLProvider) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8407,7 +9608,15 @@ func (m *awsAwsquery_serializeOpUpdateServerCertificate) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8463,7 +9672,15 @@ func (m *awsAwsquery_serializeOpUpdateServiceSpecificCredential) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8519,7 +9736,15 @@ func (m *awsAwsquery_serializeOpUpdateSigningCertificate) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8575,7 +9800,15 @@ func (m *awsAwsquery_serializeOpUpdateSSHPublicKey) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8631,7 +9864,15 @@ func (m *awsAwsquery_serializeOpUpdateUser) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8687,7 +9928,15 @@ func (m *awsAwsquery_serializeOpUploadServerCertificate) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8743,7 +9992,15 @@ func (m *awsAwsquery_serializeOpUploadSigningCertificate) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8799,7 +10056,15 @@ func (m *awsAwsquery_serializeOpUploadSSHPublicKey) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/identitystore/serializers.go b/service/identitystore/serializers.go index c495ab76e93..a75d421707e 100644 --- a/service/identitystore/serializers.go +++ b/service/identitystore/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpDescribeGroup struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpDescribeGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpDescribeUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpListGroups) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/inspector/serializers.go b/service/inspector/serializers.go index 4bec789edad..bbc5bc34a1d 100644 --- a/service/inspector/serializers.go +++ b/service/inspector/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpAddAttributesToFindings) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpCreateAssessmentTarget) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpCreateAssessmentTemplate) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpCreateExclusionsPreview) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpCreateResourceGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpDeleteAssessmentRun) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpDeleteAssessmentTarget) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpDeleteAssessmentTemplate) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpDescribeAssessmentRuns) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDescribeAssessmentTargets) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDescribeAssessmentTemplates) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDescribeCrossAccountAccessRole) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +693,15 @@ func (m *awsAwsjson11_serializeOpDescribeExclusions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -643,7 +748,15 @@ func (m *awsAwsjson11_serializeOpDescribeFindings) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -690,7 +803,15 @@ func (m *awsAwsjson11_serializeOpDescribeResourceGroups) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -737,7 +858,15 @@ func (m *awsAwsjson11_serializeOpDescribeRulesPackages) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -784,7 +913,15 @@ func (m *awsAwsjson11_serializeOpGetAssessmentReport) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -831,7 +968,15 @@ func (m *awsAwsjson11_serializeOpGetExclusionsPreview) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -878,7 +1023,15 @@ func (m *awsAwsjson11_serializeOpGetTelemetryMetadata) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -925,7 +1078,15 @@ func (m *awsAwsjson11_serializeOpListAssessmentRunAgents) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -972,7 +1133,15 @@ func (m *awsAwsjson11_serializeOpListAssessmentRuns) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1019,7 +1188,15 @@ func (m *awsAwsjson11_serializeOpListAssessmentTargets) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1066,7 +1243,15 @@ func (m *awsAwsjson11_serializeOpListAssessmentTemplates) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1113,7 +1298,15 @@ func (m *awsAwsjson11_serializeOpListEventSubscriptions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1160,7 +1353,15 @@ func (m *awsAwsjson11_serializeOpListExclusions) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1207,7 +1408,15 @@ func (m *awsAwsjson11_serializeOpListFindings) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1254,7 +1463,15 @@ func (m *awsAwsjson11_serializeOpListRulesPackages) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1301,7 +1518,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1348,7 +1573,15 @@ func (m *awsAwsjson11_serializeOpPreviewAgents) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1395,7 +1628,15 @@ func (m *awsAwsjson11_serializeOpRegisterCrossAccountAccessRole) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1442,7 +1683,15 @@ func (m *awsAwsjson11_serializeOpRemoveAttributesFromFindings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1489,7 +1738,15 @@ func (m *awsAwsjson11_serializeOpSetTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1536,7 +1793,15 @@ func (m *awsAwsjson11_serializeOpStartAssessmentRun) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1583,7 +1848,15 @@ func (m *awsAwsjson11_serializeOpStopAssessmentRun) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1630,7 +1903,15 @@ func (m *awsAwsjson11_serializeOpSubscribeToEvent) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1677,7 +1958,15 @@ func (m *awsAwsjson11_serializeOpUnsubscribeFromEvent) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1724,7 +2013,15 @@ func (m *awsAwsjson11_serializeOpUpdateAssessmentTarget) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/iot/serializers.go b/service/iot/serializers.go index e8a26624429..997deb8ee55 100644 --- a/service/iot/serializers.go +++ b/service/iot/serializers.go @@ -3772,11 +3772,11 @@ func (m *awsRestjson1_serializeOpCreateTopicRule) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if input.TopicRulePayload != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.TopicRulePayload != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentTopicRulePayload(input.TopicRulePayload, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -3785,6 +3785,14 @@ func (m *awsRestjson1_serializeOpCreateTopicRule) HandleSerialize(ctx context.Co if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -13387,11 +13395,11 @@ func (m *awsRestjson1_serializeOpReplaceTopicRule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.TopicRulePayload != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.TopicRulePayload != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentTopicRulePayload(input.TopicRulePayload, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -13400,6 +13408,14 @@ func (m *awsRestjson1_serializeOpReplaceTopicRule) HandleSerialize(ctx context.C if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -13679,11 +13695,11 @@ func (m *awsRestjson1_serializeOpSetLoggingOptions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if input.LoggingOptionsPayload != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.LoggingOptionsPayload != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentLoggingOptionsPayload(input.LoggingOptionsPayload, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -13692,6 +13708,14 @@ func (m *awsRestjson1_serializeOpSetLoggingOptions) HandleSerialize(ctx context. if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { diff --git a/service/iotsecuretunneling/serializers.go b/service/iotsecuretunneling/serializers.go index 42498c25b1f..cdf7dad441f 100644 --- a/service/iotsecuretunneling/serializers.go +++ b/service/iotsecuretunneling/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCloseTunnel struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCloseTunnel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpDescribeTunnel) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpListTunnels) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpOpenTunnel) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/iotthingsgraph/serializers.go b/service/iotthingsgraph/serializers.go index 55e788fa9a8..69652cefd05 100644 --- a/service/iotthingsgraph/serializers.go +++ b/service/iotthingsgraph/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateEntityToThing struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateEntityToThing) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateFlowTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateSystemInstance) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateSystemTemplate) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteFlowTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeleteNamespace) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteSystemInstance) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteSystemTemplate) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeploySystemInstance) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeprecateFlowTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeprecateSystemTemplate) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDescribeNamespace) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDissociateEntityFromThing) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpGetEntities) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpGetFlowTemplate) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpGetFlowTemplateRevisions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpGetNamespaceDeletionStatus) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpGetSystemInstance) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpGetSystemTemplate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGetSystemTemplateRevisions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpGetUploadStatus) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpListFlowExecutionMessages) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpSearchEntities) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpSearchFlowExecutions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpSearchFlowTemplates) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpSearchSystemInstances) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpSearchSystemTemplates) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpSearchThings) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpUndeploySystemInstance) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpUpdateFlowTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpUpdateSystemTemplate) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpUploadEntityDefinitions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/kendra/serializers.go b/service/kendra/serializers.go index b2ea1bf5729..2c7fdd42b75 100644 --- a/service/kendra/serializers.go +++ b/service/kendra/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpBatchDeleteDocument struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpBatchDeleteDocument) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpBatchGetDocumentStatus) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpBatchPutDocument) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpClearQuerySuggestions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpCreateDataSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpCreateFaq) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpCreateIndex) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpCreateQuerySuggestionsBlockList) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpCreateThesaurus) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpDeleteDataSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpDeleteFaq) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDeleteIndex) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDeletePrincipalMapping) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDeleteQuerySuggestionsBlockList) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpDeleteThesaurus) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpDescribeDataSource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDescribeFaq) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpDescribeIndex) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpDescribePrincipalMapping) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpDescribeQuerySuggestionsBlockList) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpDescribeQuerySuggestionsConfig) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpDescribeThesaurus) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpGetQuerySuggestions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpListDataSources) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpListDataSourceSyncJobs) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpListFaqs) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpListGroupsOlderThanOrderingId) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpListIndices) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpListQuerySuggestionsBlockLists) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpListThesauri) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpPutPrincipalMapping) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpQuery) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpStartDataSourceSyncJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpStopDataSourceSyncJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpSubmitFeedback) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpUpdateDataSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpUpdateIndex) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpUpdateQuerySuggestionsBlockList) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpUpdateQuerySuggestionsConfig) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpUpdateThesaurus) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/kinesis/serializers.go b/service/kinesis/serializers.go index 818bbf6a329..3200fcc4473 100644 --- a/service/kinesis/serializers.go +++ b/service/kinesis/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddTagsToStream struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToStream) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateStream) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDecreaseStreamRetentionPeriod) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDeleteStream) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeregisterStreamConsumer) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDescribeLimits) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDescribeStream) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDescribeStreamConsumer) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDescribeStreamSummary) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDisableEnhancedMonitoring) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpEnableEnhancedMonitoring) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpGetRecords) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpGetShardIterator) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpIncreaseStreamRetentionPeriod) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListShards) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpListStreamConsumers) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpListStreams) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpListTagsForStream) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpMergeShards) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpPutRecord) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpPutRecords) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpRegisterStreamConsumer) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromStream) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpSplitShard) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpStartStreamEncryption) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpStopStreamEncryption) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpSubscribeToShard) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpUpdateShardCount) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/kinesisanalytics/serializers.go b/service/kinesisanalytics/serializers.go index 60d3c3fdc45..2173ab1148a 100644 --- a/service/kinesisanalytics/serializers.go +++ b/service/kinesisanalytics/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddApplicationCloudWatchLoggingOption struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationCloudWatchLoggingOption) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationInput) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationInputProcessingConfiguration) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationOutput) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationReferenceDataSource) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationCloudWatchLoggingOption) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationInputProcessingConfiguration) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationOutput) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationReferenceDataSource) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDescribeApplication) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDiscoverInputSchema) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpListApplications) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpStartApplication) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpStopApplication) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpUpdateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/kinesisanalyticsv2/serializers.go b/service/kinesisanalyticsv2/serializers.go index 3e9c853ea1c..fc9ac98eafe 100644 --- a/service/kinesisanalyticsv2/serializers.go +++ b/service/kinesisanalyticsv2/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddApplicationCloudWatchLoggingOption struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationCloudWatchLoggingOption) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationInput) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationInputProcessingConfiguration) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationOutput) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationReferenceDataSource) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpAddApplicationVpcConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateApplicationPresignedUrl) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateApplicationSnapshot) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationCloudWatchLoggingOption) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationInputProcessingConfiguration) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationOutput) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationReferenceDataSource) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationSnapshot) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteApplicationVpcConfiguration) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeApplication) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeApplicationSnapshot) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeApplicationVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDiscoverInputSchema) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpListApplications) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpListApplicationSnapshots) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpListApplicationVersions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpRollbackApplication) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpStartApplication) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpStopApplication) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpUpdateApplication) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpUpdateApplicationMaintenanceConfiguration) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/kms/serializers.go b/service/kms/serializers.go index 63293f55eb1..8927792ea99 100644 --- a/service/kms/serializers.go +++ b/service/kms/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCancelKeyDeletion struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCancelKeyDeletion) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpConnectCustomKeyStore) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateCustomKeyStore) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateGrant) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateKey) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDecrypt) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteCustomKeyStore) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteImportedKeyMaterial) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDescribeCustomKeyStores) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDescribeKey) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDisableKey) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDisableKeyRotation) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDisconnectCustomKeyStore) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpEnableKey) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpEnableKeyRotation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpEncrypt) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpGenerateDataKey) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGenerateDataKeyPair) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpGenerateDataKeyPairWithoutPlaintext) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpGenerateDataKeyWithoutPlaintext) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpGenerateRandom) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpGetKeyPolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpGetKeyRotationStatus) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpGetParametersForImport) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpGetPublicKey) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpImportKeyMaterial) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListAliases) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListGrants) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListKeyPolicies) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListKeys) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListResourceTags) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListRetirableGrants) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpPutKeyPolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpReEncrypt) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpReplicateKey) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpRetireGrant) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpRevokeGrant) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpScheduleKeyDeletion) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpSign) HandleSerialize(ctx context.Context, in m return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpUpdateAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpUpdateCustomKeyStore) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpUpdateKeyDescription) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpUpdatePrimaryRegion) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpVerify) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/lakeformation/serializers.go b/service/lakeformation/serializers.go index f88497ed7de..b079c0d37c1 100644 --- a/service/lakeformation/serializers.go +++ b/service/lakeformation/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddLFTagsToResource struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAddLFTagsToResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpBatchGrantPermissions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpBatchRevokePermissions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateLFTag) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteLFTag) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeregisterResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpGetDataLakeSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpGetEffectivePermissionsForPath) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpGetLFTag) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetResourceLFTags) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpGrantPermissions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpListLFTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpListPermissions) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpListResources) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpPutDataLakeSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpRegisterResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpRemoveLFTagsFromResource) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpRevokePermissions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpSearchDatabasesByLFTags) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpSearchTablesByLFTags) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpUpdateLFTag) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpUpdateResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/licensemanager/serializers.go b/service/licensemanager/serializers.go index 7486a744575..10d9c4d0c4d 100644 --- a/service/licensemanager/serializers.go +++ b/service/licensemanager/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAcceptGrant struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAcceptGrant) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCheckInLicense) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCheckoutBorrowLicense) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCheckoutLicense) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateGrant) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateGrantVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateLicense) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateLicenseConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateLicenseConversionTaskForResource) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateLicenseManagerReportGenerator) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpCreateLicenseVersion) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpCreateToken) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDeleteGrant) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDeleteLicense) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDeleteLicenseConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDeleteLicenseManagerReportGenerator) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDeleteToken) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpExtendLicenseConsumption) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpGetAccessToken) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpGetGrant) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpGetLicense) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpGetLicenseConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpGetLicenseConversionTask) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpGetLicenseManagerReportGenerator) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpGetLicenseUsage) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpGetServiceSettings) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpListAssociationsForLicenseConfiguration) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpListDistributedGrants) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpListFailuresForLicenseConfigurationOperations) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpListLicenseConfigurations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpListLicenseConversionTasks) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpListLicenseManagerReportGenerators) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpListLicenses) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpListLicenseSpecificationsForResource) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpListLicenseVersions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpListReceivedGrants) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpListReceivedLicenses) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpListResourceInventory) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpListTokens) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpListUsageForLicenseConfiguration) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpRejectGrant) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpUpdateLicenseConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpUpdateLicenseManagerReportGenerator) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpUpdateLicenseSpecificationsForResource) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpUpdateServiceSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/lightsail/serializers.go b/service/lightsail/serializers.go index 8aeadd47803..498212fd54e 100644 --- a/service/lightsail/serializers.go +++ b/service/lightsail/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAllocateStaticIp struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpAllocateStaticIp) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpAttachCertificateToDistribution) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpAttachDisk) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpAttachInstancesToLoadBalancer) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpAttachLoadBalancerTlsCertificate) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpAttachStaticIp) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpCloseInstancePublicPorts) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpCopySnapshot) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpCreateBucket) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpCreateBucketAccessKey) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpCreateCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpCreateCloudFormationStack) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpCreateContactMethod) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpCreateContainerService) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpCreateContainerServiceDeployment) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpCreateContainerServiceRegistryLogin) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpCreateDisk) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpCreateDiskFromSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpCreateDiskSnapshot) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpCreateDistribution) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpCreateDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpCreateDomainEntry) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpCreateInstances) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpCreateInstancesFromSnapshot) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpCreateInstanceSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpCreateKeyPair) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpCreateLoadBalancer) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpCreateLoadBalancerTlsCertificate) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpCreateRelationalDatabase) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpCreateRelationalDatabaseFromSnapshot) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpCreateRelationalDatabaseSnapshot) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpDeleteAlarm) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpDeleteAutoSnapshot) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpDeleteBucket) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpDeleteBucketAccessKey) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpDeleteCertificate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpDeleteContactMethod) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpDeleteContainerImage) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpDeleteContainerService) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpDeleteDisk) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpDeleteDiskSnapshot) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpDeleteDistribution) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpDeleteDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpDeleteDomainEntry) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpDeleteInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpDeleteInstanceSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpDeleteKeyPair) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpDeleteKnownHostKeys) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpDeleteLoadBalancer) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpDeleteLoadBalancerTlsCertificate) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpDeleteRelationalDatabase) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2434,7 +2843,15 @@ func (m *awsAwsjson11_serializeOpDeleteRelationalDatabaseSnapshot) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2481,7 +2898,15 @@ func (m *awsAwsjson11_serializeOpDetachCertificateFromDistribution) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2528,7 +2953,15 @@ func (m *awsAwsjson11_serializeOpDetachDisk) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2575,7 +3008,15 @@ func (m *awsAwsjson11_serializeOpDetachInstancesFromLoadBalancer) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2622,7 +3063,15 @@ func (m *awsAwsjson11_serializeOpDetachStaticIp) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2669,7 +3118,15 @@ func (m *awsAwsjson11_serializeOpDisableAddOn) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2716,7 +3173,15 @@ func (m *awsAwsjson11_serializeOpDownloadDefaultKeyPair) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2763,7 +3228,15 @@ func (m *awsAwsjson11_serializeOpEnableAddOn) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2810,7 +3283,15 @@ func (m *awsAwsjson11_serializeOpExportSnapshot) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2857,7 +3338,15 @@ func (m *awsAwsjson11_serializeOpGetActiveNames) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2904,7 +3393,15 @@ func (m *awsAwsjson11_serializeOpGetAlarms) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2951,7 +3448,15 @@ func (m *awsAwsjson11_serializeOpGetAutoSnapshots) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2998,7 +3503,15 @@ func (m *awsAwsjson11_serializeOpGetBlueprints) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3045,7 +3558,15 @@ func (m *awsAwsjson11_serializeOpGetBucketAccessKeys) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3092,7 +3613,15 @@ func (m *awsAwsjson11_serializeOpGetBucketBundles) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3139,7 +3668,15 @@ func (m *awsAwsjson11_serializeOpGetBucketMetricData) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3186,7 +3723,15 @@ func (m *awsAwsjson11_serializeOpGetBuckets) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3233,7 +3778,15 @@ func (m *awsAwsjson11_serializeOpGetBundles) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3280,7 +3833,15 @@ func (m *awsAwsjson11_serializeOpGetCertificates) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3327,7 +3888,15 @@ func (m *awsAwsjson11_serializeOpGetCloudFormationStackRecords) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3374,7 +3943,15 @@ func (m *awsAwsjson11_serializeOpGetContactMethods) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3421,7 +3998,15 @@ func (m *awsAwsjson11_serializeOpGetContainerAPIMetadata) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3468,7 +4053,15 @@ func (m *awsAwsjson11_serializeOpGetContainerImages) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3515,7 +4108,15 @@ func (m *awsAwsjson11_serializeOpGetContainerLog) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3562,7 +4163,15 @@ func (m *awsAwsjson11_serializeOpGetContainerServiceDeployments) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3609,7 +4218,15 @@ func (m *awsAwsjson11_serializeOpGetContainerServiceMetricData) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3656,7 +4273,15 @@ func (m *awsAwsjson11_serializeOpGetContainerServicePowers) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3703,7 +4328,15 @@ func (m *awsAwsjson11_serializeOpGetContainerServices) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3750,7 +4383,15 @@ func (m *awsAwsjson11_serializeOpGetDisk) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3797,7 +4438,15 @@ func (m *awsAwsjson11_serializeOpGetDisks) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3844,7 +4493,15 @@ func (m *awsAwsjson11_serializeOpGetDiskSnapshot) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3891,7 +4548,15 @@ func (m *awsAwsjson11_serializeOpGetDiskSnapshots) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3938,7 +4603,15 @@ func (m *awsAwsjson11_serializeOpGetDistributionBundles) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3985,7 +4658,15 @@ func (m *awsAwsjson11_serializeOpGetDistributionLatestCacheReset) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4032,7 +4713,15 @@ func (m *awsAwsjson11_serializeOpGetDistributionMetricData) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4079,7 +4768,15 @@ func (m *awsAwsjson11_serializeOpGetDistributions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4126,7 +4823,15 @@ func (m *awsAwsjson11_serializeOpGetDomain) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4173,7 +4878,15 @@ func (m *awsAwsjson11_serializeOpGetDomains) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4220,7 +4933,15 @@ func (m *awsAwsjson11_serializeOpGetExportSnapshotRecords) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4267,7 +4988,15 @@ func (m *awsAwsjson11_serializeOpGetInstance) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4314,7 +5043,15 @@ func (m *awsAwsjson11_serializeOpGetInstanceAccessDetails) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4361,7 +5098,15 @@ func (m *awsAwsjson11_serializeOpGetInstanceMetricData) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4408,7 +5153,15 @@ func (m *awsAwsjson11_serializeOpGetInstancePortStates) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4455,7 +5208,15 @@ func (m *awsAwsjson11_serializeOpGetInstances) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4502,7 +5263,15 @@ func (m *awsAwsjson11_serializeOpGetInstanceSnapshot) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4549,7 +5318,15 @@ func (m *awsAwsjson11_serializeOpGetInstanceSnapshots) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4596,7 +5373,15 @@ func (m *awsAwsjson11_serializeOpGetInstanceState) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4643,7 +5428,15 @@ func (m *awsAwsjson11_serializeOpGetKeyPair) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4690,7 +5483,15 @@ func (m *awsAwsjson11_serializeOpGetKeyPairs) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4737,7 +5538,15 @@ func (m *awsAwsjson11_serializeOpGetLoadBalancer) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4784,7 +5593,15 @@ func (m *awsAwsjson11_serializeOpGetLoadBalancerMetricData) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4831,7 +5648,15 @@ func (m *awsAwsjson11_serializeOpGetLoadBalancers) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4878,7 +5703,15 @@ func (m *awsAwsjson11_serializeOpGetLoadBalancerTlsCertificates) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4925,7 +5758,15 @@ func (m *awsAwsjson11_serializeOpGetOperation) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4972,7 +5813,15 @@ func (m *awsAwsjson11_serializeOpGetOperations) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5019,7 +5868,15 @@ func (m *awsAwsjson11_serializeOpGetOperationsForResource) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5066,7 +5923,15 @@ func (m *awsAwsjson11_serializeOpGetRegions) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5113,7 +5978,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabase) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5160,7 +6033,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseBlueprints) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5207,7 +6088,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseBundles) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5254,7 +6143,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseEvents) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5301,7 +6198,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseLogEvents) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5348,7 +6253,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseLogStreams) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5395,7 +6308,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseMasterUserPassword) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5442,7 +6363,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseMetricData) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5489,7 +6418,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseParameters) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5536,7 +6473,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabases) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5583,7 +6528,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseSnapshot) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5630,7 +6583,15 @@ func (m *awsAwsjson11_serializeOpGetRelationalDatabaseSnapshots) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5677,7 +6638,15 @@ func (m *awsAwsjson11_serializeOpGetStaticIp) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5724,7 +6693,15 @@ func (m *awsAwsjson11_serializeOpGetStaticIps) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5771,7 +6748,15 @@ func (m *awsAwsjson11_serializeOpImportKeyPair) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5818,7 +6803,15 @@ func (m *awsAwsjson11_serializeOpIsVpcPeered) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5865,7 +6858,15 @@ func (m *awsAwsjson11_serializeOpOpenInstancePublicPorts) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5912,7 +6913,15 @@ func (m *awsAwsjson11_serializeOpPeerVpc) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5959,7 +6968,15 @@ func (m *awsAwsjson11_serializeOpPutAlarm) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6006,7 +7023,15 @@ func (m *awsAwsjson11_serializeOpPutInstancePublicPorts) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6053,7 +7078,15 @@ func (m *awsAwsjson11_serializeOpRebootInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6100,7 +7133,15 @@ func (m *awsAwsjson11_serializeOpRebootRelationalDatabase) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6147,7 +7188,15 @@ func (m *awsAwsjson11_serializeOpRegisterContainerImage) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6194,7 +7243,15 @@ func (m *awsAwsjson11_serializeOpReleaseStaticIp) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6241,7 +7298,15 @@ func (m *awsAwsjson11_serializeOpResetDistributionCache) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6288,7 +7353,15 @@ func (m *awsAwsjson11_serializeOpSendContactMethodVerification) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6335,7 +7408,15 @@ func (m *awsAwsjson11_serializeOpSetIpAddressType) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6382,7 +7463,15 @@ func (m *awsAwsjson11_serializeOpSetResourceAccessForBucket) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6429,7 +7518,15 @@ func (m *awsAwsjson11_serializeOpStartInstance) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6476,7 +7573,15 @@ func (m *awsAwsjson11_serializeOpStartRelationalDatabase) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6523,7 +7628,15 @@ func (m *awsAwsjson11_serializeOpStopInstance) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6570,7 +7683,15 @@ func (m *awsAwsjson11_serializeOpStopRelationalDatabase) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6617,7 +7738,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6664,7 +7793,15 @@ func (m *awsAwsjson11_serializeOpTestAlarm) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6711,7 +7848,15 @@ func (m *awsAwsjson11_serializeOpUnpeerVpc) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6758,7 +7903,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6805,7 +7958,15 @@ func (m *awsAwsjson11_serializeOpUpdateBucket) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6852,7 +8013,15 @@ func (m *awsAwsjson11_serializeOpUpdateBucketBundle) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6899,7 +8068,15 @@ func (m *awsAwsjson11_serializeOpUpdateContainerService) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6946,7 +8123,15 @@ func (m *awsAwsjson11_serializeOpUpdateDistribution) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6993,7 +8178,15 @@ func (m *awsAwsjson11_serializeOpUpdateDistributionBundle) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7040,7 +8233,15 @@ func (m *awsAwsjson11_serializeOpUpdateDomainEntry) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7087,7 +8288,15 @@ func (m *awsAwsjson11_serializeOpUpdateLoadBalancerAttribute) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7134,7 +8343,15 @@ func (m *awsAwsjson11_serializeOpUpdateRelationalDatabase) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7181,7 +8398,15 @@ func (m *awsAwsjson11_serializeOpUpdateRelationalDatabaseParameters) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/lookoutequipment/serializers.go b/service/lookoutequipment/serializers.go index 74f37671ffa..6b79397b45d 100644 --- a/service/lookoutequipment/serializers.go +++ b/service/lookoutequipment/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCreateDataset struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson10_serializeOpCreateDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson10_serializeOpCreateInferenceScheduler) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson10_serializeOpCreateModel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson10_serializeOpDeleteDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson10_serializeOpDeleteInferenceScheduler) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson10_serializeOpDeleteModel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson10_serializeOpDescribeDataIngestionJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson10_serializeOpDescribeDataset) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson10_serializeOpDescribeInferenceScheduler) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson10_serializeOpDescribeModel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson10_serializeOpListDataIngestionJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson10_serializeOpListDatasets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson10_serializeOpListInferenceExecutions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson10_serializeOpListInferenceSchedulers) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson10_serializeOpListModels) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson10_serializeOpStartDataIngestionJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson10_serializeOpStartInferenceScheduler) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson10_serializeOpStopInferenceScheduler) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson10_serializeOpUpdateInferenceScheduler) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/machinelearning/serializers.go b/service/machinelearning/serializers.go index b54820a4f52..5c6007d88fd 100644 --- a/service/machinelearning/serializers.go +++ b/service/machinelearning/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAddTags struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddTags) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateBatchPrediction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateDataSourceFromRDS) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateDataSourceFromRedshift) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateDataSourceFromS3) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateEvaluation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateMLModel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateRealtimeEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteBatchPrediction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteDataSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteEvaluation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteMLModel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteRealtimeEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDescribeBatchPredictions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeDataSources) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeEvaluations) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeMLModels) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeTags) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGetBatchPrediction) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpGetDataSource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpGetEvaluation) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpGetMLModel) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpPredict) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpUpdateBatchPrediction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpUpdateDataSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpUpdateEvaluation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpUpdateMLModel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/macie/serializers.go b/service/macie/serializers.go index 0f9f1d85f07..45f5d1a0483 100644 --- a/service/macie/serializers.go +++ b/service/macie/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateMemberAccount struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateMemberAccount) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAssociateS3Resources) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpDisassociateMemberAccount) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDisassociateS3Resources) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpListMemberAccounts) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpListS3Resources) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpUpdateS3Resources) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/marketplacecommerceanalytics/serializers.go b/service/marketplacecommerceanalytics/serializers.go index 4432dd2f398..cd865d6a4d6 100644 --- a/service/marketplacecommerceanalytics/serializers.go +++ b/service/marketplacecommerceanalytics/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpGenerateDataSet struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpGenerateDataSet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpStartSupportDataExport) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/marketplaceentitlementservice/serializers.go b/service/marketplaceentitlementservice/serializers.go index 94361a15c0c..6c71bc06a35 100644 --- a/service/marketplaceentitlementservice/serializers.go +++ b/service/marketplaceentitlementservice/serializers.go @@ -11,6 +11,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpGetEntitlements struct { @@ -34,7 +35,15 @@ func (m *awsAwsjson11_serializeOpGetEntitlements) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/marketplacemetering/serializers.go b/service/marketplacemetering/serializers.go index 9918e58fd3b..30d3114cc4a 100644 --- a/service/marketplacemetering/serializers.go +++ b/service/marketplacemetering/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpBatchMeterUsage struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpBatchMeterUsage) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpMeterUsage) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpRegisterUsage) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpResolveCustomer) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/mediastore/serializers.go b/service/mediastore/serializers.go index f9f0efe29b5..cc9c6e97b59 100644 --- a/service/mediastore/serializers.go +++ b/service/mediastore/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateContainer struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateContainer) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpDeleteContainer) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpDeleteContainerPolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDeleteCorsPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteLifecyclePolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteMetricPolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeContainer) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpGetContainerPolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpGetCorsPolicy) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpGetLifecyclePolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetMetricPolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpListContainers) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpPutContainerPolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpPutCorsPolicy) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpPutLifecyclePolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpPutMetricPolicy) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpStartAccessLogging) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpStopAccessLogging) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/memorydb/serializers.go b/service/memorydb/serializers.go index cb84f1c0dfb..3ec84fbf721 100644 --- a/service/memorydb/serializers.go +++ b/service/memorydb/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpBatchUpdateCluster struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpBatchUpdateCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCopySnapshot) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateACL) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateSnapshot) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateSubnetGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteACL) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteSnapshot) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteSubnetGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDescribeACLs) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeClusters) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeEngineVersions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDescribeEvents) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeParameterGroups) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeParameters) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribeServiceUpdates) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribeSnapshots) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDescribeSubnetGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDescribeUsers) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpFailoverShard) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListAllowedNodeTypeUpdates) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpResetParameterGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpUpdateACL) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpUpdateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpUpdateParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpUpdateSubnetGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpUpdateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/migrationhub/serializers.go b/service/migrationhub/serializers.go index 44d547f4107..220333c8a30 100644 --- a/service/migrationhub/serializers.go +++ b/service/migrationhub/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateCreatedArtifact struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateCreatedArtifact) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAssociateDiscoveredResource) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateProgressUpdateStream) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDeleteProgressUpdateStream) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDescribeApplicationState) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDescribeMigrationTask) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDisassociateCreatedArtifact) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDisassociateDiscoveredResource) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpImportMigrationTask) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpListApplicationStates) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpListCreatedArtifacts) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpListDiscoveredResources) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpListMigrationTasks) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpListProgressUpdateStreams) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpNotifyApplicationState) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpNotifyMigrationTaskState) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpPutResourceAttributes) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/migrationhubconfig/serializers.go b/service/migrationhubconfig/serializers.go index 3dae0ef69d9..ab23066bd93 100644 --- a/service/migrationhubconfig/serializers.go +++ b/service/migrationhubconfig/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateHomeRegionControl struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateHomeRegionControl) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpDescribeHomeRegionControls) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpGetHomeRegion) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/mturk/serializers.go b/service/mturk/serializers.go index 69a7e6ad964..5f102dbfd90 100644 --- a/service/mturk/serializers.go +++ b/service/mturk/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAcceptQualificationRequest struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAcceptQualificationRequest) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpApproveAssignment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpAssociateQualificationWithWorker) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateAdditionalAssignmentsForHIT) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateHIT) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateHITType) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateHITWithHITType) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateQualificationType) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkerBlock) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteHIT) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteQualificationType) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkerBlock) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDisassociateQualificationFromWorker) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpGetAccountBalance) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpGetAssignment) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpGetFileUploadURL) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpGetHIT) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpGetQualificationScore) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpGetQualificationType) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpListAssignmentsForHIT) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpListBonusPayments) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpListHITs) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpListHITsForQualificationType) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpListQualificationRequests) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpListQualificationTypes) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListReviewableHITs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListReviewPolicyResultsForHIT) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListWorkerBlocks) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListWorkersWithQualificationType) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpNotifyWorkers) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpRejectAssignment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpRejectQualificationRequest) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpSendBonus) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpSendTestEventNotification) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpUpdateExpirationForHIT) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpUpdateHITReviewStatus) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpUpdateHITTypeOfHIT) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpUpdateNotificationSettings) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpUpdateQualificationType) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/neptune/serializers.go b/service/neptune/serializers.go index 4c01adb4620..1a7e6298435 100644 --- a/service/neptune/serializers.go +++ b/service/neptune/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAddRoleToDBCluster struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAddRoleToDBCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpAddSourceIdentifierToSubscription) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpAddTagsToResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpApplyPendingMaintenanceAction) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpCopyDBClusterParameterGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCopyDBClusterSnapshot) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpCopyDBParameterGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpCreateDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpCreateDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpCreateDBParameterGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpCreateDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpCreateEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpDeleteDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpDeleteDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpDeleteDBParameterGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpDeleteDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1268,7 +1445,15 @@ func (m *awsAwsquery_serializeOpDeleteEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1324,7 +1509,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterEndpoints) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1380,7 +1573,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterParameterGroups) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1436,7 +1637,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterParameters) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1701,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusters) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1548,7 +1765,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1604,7 +1829,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshots) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1660,7 +1893,15 @@ func (m *awsAwsquery_serializeOpDescribeDBEngineVersions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1716,7 +1957,15 @@ func (m *awsAwsquery_serializeOpDescribeDBInstances) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1772,7 +2021,15 @@ func (m *awsAwsquery_serializeOpDescribeDBParameterGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1828,7 +2085,15 @@ func (m *awsAwsquery_serializeOpDescribeDBParameters) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1884,7 +2149,15 @@ func (m *awsAwsquery_serializeOpDescribeDBSubnetGroups) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1940,7 +2213,15 @@ func (m *awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1996,7 +2277,15 @@ func (m *awsAwsquery_serializeOpDescribeEngineDefaultParameters) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2341,15 @@ func (m *awsAwsquery_serializeOpDescribeEventCategories) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2108,7 +2405,15 @@ func (m *awsAwsquery_serializeOpDescribeEvents) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2164,7 +2469,15 @@ func (m *awsAwsquery_serializeOpDescribeEventSubscriptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2220,7 +2533,15 @@ func (m *awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2276,7 +2597,15 @@ func (m *awsAwsquery_serializeOpDescribePendingMaintenanceActions) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2332,7 +2661,15 @@ func (m *awsAwsquery_serializeOpDescribeValidDBInstanceModifications) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2388,7 +2725,15 @@ func (m *awsAwsquery_serializeOpFailoverDBCluster) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2444,7 +2789,15 @@ func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2500,7 +2853,15 @@ func (m *awsAwsquery_serializeOpModifyDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2556,7 +2917,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2612,7 +2981,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3045,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2724,7 +3109,15 @@ func (m *awsAwsquery_serializeOpModifyDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2780,7 +3173,15 @@ func (m *awsAwsquery_serializeOpModifyDBParameterGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2836,7 +3237,15 @@ func (m *awsAwsquery_serializeOpModifyDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2892,7 +3301,15 @@ func (m *awsAwsquery_serializeOpModifyEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2948,7 +3365,15 @@ func (m *awsAwsquery_serializeOpPromoteReadReplicaDBCluster) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3004,7 +3429,15 @@ func (m *awsAwsquery_serializeOpRebootDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3060,7 +3493,15 @@ func (m *awsAwsquery_serializeOpRemoveRoleFromDBCluster) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3116,7 +3557,15 @@ func (m *awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3172,7 +3621,15 @@ func (m *awsAwsquery_serializeOpRemoveTagsFromResource) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3228,7 +3685,15 @@ func (m *awsAwsquery_serializeOpResetDBClusterParameterGroup) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3284,7 +3749,15 @@ func (m *awsAwsquery_serializeOpResetDBParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3340,7 +3813,15 @@ func (m *awsAwsquery_serializeOpRestoreDBClusterFromSnapshot) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3396,7 +3877,15 @@ func (m *awsAwsquery_serializeOpRestoreDBClusterToPointInTime) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3452,7 +3941,15 @@ func (m *awsAwsquery_serializeOpStartDBCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3508,7 +4005,15 @@ func (m *awsAwsquery_serializeOpStopDBCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/networkfirewall/serializers.go b/service/networkfirewall/serializers.go index c20ea9bdc2a..7f17535bb9e 100644 --- a/service/networkfirewall/serializers.go +++ b/service/networkfirewall/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpAssociateFirewallPolicy struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpAssociateFirewallPolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpAssociateSubnets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpCreateFirewall) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpCreateFirewallPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpCreateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpDeleteFirewall) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpDeleteFirewallPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpDeleteResourcePolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson10_serializeOpDeleteRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson10_serializeOpDescribeFirewall) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson10_serializeOpDescribeFirewallPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson10_serializeOpDescribeLoggingConfiguration) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson10_serializeOpDescribeResourcePolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson10_serializeOpDescribeRuleGroup) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson10_serializeOpDisassociateSubnets) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson10_serializeOpListFirewallPolicies) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson10_serializeOpListFirewalls) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson10_serializeOpListRuleGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson10_serializeOpPutResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson10_serializeOpUpdateFirewallDeleteProtection) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson10_serializeOpUpdateFirewallDescription) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson10_serializeOpUpdateFirewallPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson10_serializeOpUpdateFirewallPolicyChangeProtection) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson10_serializeOpUpdateLoggingConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson10_serializeOpUpdateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson10_serializeOpUpdateSubnetChangeProtection) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/opsworks/serializers.go b/service/opsworks/serializers.go index 7075358216b..ec958bdc0a0 100644 --- a/service/opsworks/serializers.go +++ b/service/opsworks/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" "strings" ) @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpAssignInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpAssignVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpAssociateElasticIp) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpAttachElasticLoadBalancer) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpCloneStack) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpCreateApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpCreateDeployment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpCreateInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpCreateLayer) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpCreateStack) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpCreateUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpDeleteApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpDeleteInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpDeleteLayer) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpDeleteStack) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpDeregisterEcsCluster) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpDeregisterElasticIp) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpDeregisterInstance) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpDeregisterRdsDbInstance) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpDeregisterVolume) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpDescribeAgentVersions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpDescribeApps) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpDescribeCommands) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpDescribeDeployments) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpDescribeEcsClusters) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpDescribeElasticIps) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpDescribeElasticLoadBalancers) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstances) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpDescribeLayers) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpDescribeLoadBasedAutoScaling) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpDescribeMyUserProfile) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1536,7 +1793,15 @@ func (m *awsAwsjson11_serializeOpDescribeOperatingSystems) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1578,7 +1843,15 @@ func (m *awsAwsjson11_serializeOpDescribePermissions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1625,7 +1898,15 @@ func (m *awsAwsjson11_serializeOpDescribeRaidArrays) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1672,7 +1953,15 @@ func (m *awsAwsjson11_serializeOpDescribeRdsDbInstances) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1719,7 +2008,15 @@ func (m *awsAwsjson11_serializeOpDescribeServiceErrors) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1766,7 +2063,15 @@ func (m *awsAwsjson11_serializeOpDescribeStackProvisioningParameters) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1813,7 +2118,15 @@ func (m *awsAwsjson11_serializeOpDescribeStacks) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1860,7 +2173,15 @@ func (m *awsAwsjson11_serializeOpDescribeStackSummary) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1907,7 +2228,15 @@ func (m *awsAwsjson11_serializeOpDescribeTimeBasedAutoScaling) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1954,7 +2283,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserProfiles) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2001,7 +2338,15 @@ func (m *awsAwsjson11_serializeOpDescribeVolumes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2048,7 +2393,15 @@ func (m *awsAwsjson11_serializeOpDetachElasticLoadBalancer) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2095,7 +2448,15 @@ func (m *awsAwsjson11_serializeOpDisassociateElasticIp) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2142,7 +2503,15 @@ func (m *awsAwsjson11_serializeOpGetHostnameSuggestion) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2189,7 +2558,15 @@ func (m *awsAwsjson11_serializeOpGrantAccess) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2236,7 +2613,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2283,7 +2668,15 @@ func (m *awsAwsjson11_serializeOpRebootInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2330,7 +2723,15 @@ func (m *awsAwsjson11_serializeOpRegisterEcsCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2377,7 +2778,15 @@ func (m *awsAwsjson11_serializeOpRegisterElasticIp) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2424,7 +2833,15 @@ func (m *awsAwsjson11_serializeOpRegisterInstance) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2471,7 +2888,15 @@ func (m *awsAwsjson11_serializeOpRegisterRdsDbInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2518,7 +2943,15 @@ func (m *awsAwsjson11_serializeOpRegisterVolume) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2565,7 +2998,15 @@ func (m *awsAwsjson11_serializeOpSetLoadBasedAutoScaling) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2612,7 +3053,15 @@ func (m *awsAwsjson11_serializeOpSetPermission) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2659,7 +3108,15 @@ func (m *awsAwsjson11_serializeOpSetTimeBasedAutoScaling) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2706,7 +3163,15 @@ func (m *awsAwsjson11_serializeOpStartInstance) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2753,7 +3218,15 @@ func (m *awsAwsjson11_serializeOpStartStack) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2800,7 +3273,15 @@ func (m *awsAwsjson11_serializeOpStopInstance) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2847,7 +3328,15 @@ func (m *awsAwsjson11_serializeOpStopStack) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2894,7 +3383,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2941,7 +3438,15 @@ func (m *awsAwsjson11_serializeOpUnassignInstance) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2988,7 +3493,15 @@ func (m *awsAwsjson11_serializeOpUnassignVolume) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3035,7 +3548,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3082,7 +3603,15 @@ func (m *awsAwsjson11_serializeOpUpdateApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3129,7 +3658,15 @@ func (m *awsAwsjson11_serializeOpUpdateElasticIp) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3176,7 +3713,15 @@ func (m *awsAwsjson11_serializeOpUpdateInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3223,7 +3768,15 @@ func (m *awsAwsjson11_serializeOpUpdateLayer) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3270,7 +3823,15 @@ func (m *awsAwsjson11_serializeOpUpdateMyUserProfile) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3317,7 +3878,15 @@ func (m *awsAwsjson11_serializeOpUpdateRdsDbInstance) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3364,7 +3933,15 @@ func (m *awsAwsjson11_serializeOpUpdateStack) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3411,7 +3988,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3458,7 +4043,15 @@ func (m *awsAwsjson11_serializeOpUpdateVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/opsworkscm/serializers.go b/service/opsworkscm/serializers.go index 1a5d1e73116..216f8288943 100644 --- a/service/opsworkscm/serializers.go +++ b/service/opsworkscm/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateNode struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateNode) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateBackup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateServer) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDeleteBackup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteServer) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccountAttributes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeBackups) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDescribeEvents) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDescribeNodeAssociationStatus) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeServers) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDisassociateNode) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpExportServerEngineAttribute) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpRestoreServer) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpStartMaintenance) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpUpdateServer) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpUpdateServerEngineAttributes) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/organizations/serializers.go b/service/organizations/serializers.go index 2f7f2f5eebc..6c6d4cd394a 100644 --- a/service/organizations/serializers.go +++ b/service/organizations/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "strings" ) @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAcceptHandshake) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAttachPolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCancelHandshake) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateAccount) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateGovCloudAccount) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateOrganization) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateOrganizationalUnit) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreatePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeclineHandshake) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteOrganization) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -501,7 +582,15 @@ func (m *awsAwsjson11_serializeOpDeleteOrganizationalUnit) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -548,7 +637,15 @@ func (m *awsAwsjson11_serializeOpDeletePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -595,7 +692,15 @@ func (m *awsAwsjson11_serializeOpDeregisterDelegatedAdministrator) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -642,7 +747,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccount) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -689,7 +802,15 @@ func (m *awsAwsjson11_serializeOpDescribeCreateAccountStatus) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -736,7 +857,15 @@ func (m *awsAwsjson11_serializeOpDescribeEffectivePolicy) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -783,7 +912,15 @@ func (m *awsAwsjson11_serializeOpDescribeHandshake) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -830,7 +967,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrganization) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -872,7 +1017,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrganizationalUnit) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -919,7 +1072,15 @@ func (m *awsAwsjson11_serializeOpDescribePolicy) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -966,7 +1127,15 @@ func (m *awsAwsjson11_serializeOpDetachPolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1013,7 +1182,15 @@ func (m *awsAwsjson11_serializeOpDisableAWSServiceAccess) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1060,7 +1237,15 @@ func (m *awsAwsjson11_serializeOpDisablePolicyType) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1107,7 +1292,15 @@ func (m *awsAwsjson11_serializeOpEnableAllFeatures) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1154,7 +1347,15 @@ func (m *awsAwsjson11_serializeOpEnableAWSServiceAccess) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1201,7 +1402,15 @@ func (m *awsAwsjson11_serializeOpEnablePolicyType) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1248,7 +1457,15 @@ func (m *awsAwsjson11_serializeOpInviteAccountToOrganization) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1295,7 +1512,15 @@ func (m *awsAwsjson11_serializeOpLeaveOrganization) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1337,7 +1562,15 @@ func (m *awsAwsjson11_serializeOpListAccounts) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1384,7 +1617,15 @@ func (m *awsAwsjson11_serializeOpListAccountsForParent) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1431,7 +1672,15 @@ func (m *awsAwsjson11_serializeOpListAWSServiceAccessForOrganization) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1478,7 +1727,15 @@ func (m *awsAwsjson11_serializeOpListChildren) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1525,7 +1782,15 @@ func (m *awsAwsjson11_serializeOpListCreateAccountStatus) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1572,7 +1837,15 @@ func (m *awsAwsjson11_serializeOpListDelegatedAdministrators) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1619,7 +1892,15 @@ func (m *awsAwsjson11_serializeOpListDelegatedServicesForAccount) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1666,7 +1947,15 @@ func (m *awsAwsjson11_serializeOpListHandshakesForAccount) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1713,7 +2002,15 @@ func (m *awsAwsjson11_serializeOpListHandshakesForOrganization) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1760,7 +2057,15 @@ func (m *awsAwsjson11_serializeOpListOrganizationalUnitsForParent) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1807,7 +2112,15 @@ func (m *awsAwsjson11_serializeOpListParents) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1854,7 +2167,15 @@ func (m *awsAwsjson11_serializeOpListPolicies) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1901,7 +2222,15 @@ func (m *awsAwsjson11_serializeOpListPoliciesForTarget) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1948,7 +2277,15 @@ func (m *awsAwsjson11_serializeOpListRoots) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1995,7 +2332,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2042,7 +2387,15 @@ func (m *awsAwsjson11_serializeOpListTargetsForPolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2089,7 +2442,15 @@ func (m *awsAwsjson11_serializeOpMoveAccount) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2136,7 +2497,15 @@ func (m *awsAwsjson11_serializeOpRegisterDelegatedAdministrator) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2183,7 +2552,15 @@ func (m *awsAwsjson11_serializeOpRemoveAccountFromOrganization) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2230,7 +2607,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2277,7 +2662,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2324,7 +2717,15 @@ func (m *awsAwsjson11_serializeOpUpdateOrganizationalUnit) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2371,7 +2772,15 @@ func (m *awsAwsjson11_serializeOpUpdatePolicy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/personalize/serializers.go b/service/personalize/serializers.go index 1b5653e30cd..46c6828fcd6 100644 --- a/service/personalize/serializers.go +++ b/service/personalize/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCreateBatchInferenceJob struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateBatchInferenceJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateCampaign) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateDatasetExportJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateDatasetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateDatasetImportJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateEventTracker) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateFilter) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateSchema) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpCreateSolution) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpCreateSolutionVersion) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteCampaign) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteDatasetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteEventTracker) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteFilter) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDeleteSchema) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDeleteSolution) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDescribeAlgorithm) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDescribeBatchInferenceJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDescribeCampaign) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDescribeDataset) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDescribeDatasetExportJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDescribeDatasetGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDescribeDatasetImportJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDescribeEventTracker) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDescribeFeatureTransformation) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpDescribeFilter) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpDescribeRecipe) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpDescribeSchema) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpDescribeSolution) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpDescribeSolutionVersion) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpGetSolutionMetrics) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListBatchInferenceJobs) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListCampaigns) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpListDatasetExportJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpListDatasetGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpListDatasetImportJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpListDatasets) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpListEventTrackers) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpListFilters) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpListRecipes) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpListSchemas) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpListSolutions) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpListSolutionVersions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpStopSolutionVersionCreation) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpUpdateCampaign) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/pi/serializers.go b/service/pi/serializers.go index b1b2e4c209c..49b884527f5 100644 --- a/service/pi/serializers.go +++ b/service/pi/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpDescribeDimensionKeys struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpDescribeDimensionKeys) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpGetDimensionKeyDetails) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpGetResourceMetrics) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/pinpoint/serializers.go b/service/pinpoint/serializers.go index 2db014c4082..6e14115154b 100644 --- a/service/pinpoint/serializers.go +++ b/service/pinpoint/serializers.go @@ -46,11 +46,11 @@ func (m *awsRestjson1_serializeOpCreateApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if input.CreateApplicationRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.CreateApplicationRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentCreateApplicationRequest(input.CreateApplicationRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -59,6 +59,14 @@ func (m *awsRestjson1_serializeOpCreateApp) HandleSerialize(ctx context.Context, if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -110,11 +118,11 @@ func (m *awsRestjson1_serializeOpCreateCampaign) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteCampaignRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteCampaignRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteCampaignRequest(input.WriteCampaignRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -123,6 +131,14 @@ func (m *awsRestjson1_serializeOpCreateCampaign) HandleSerialize(ctx context.Con if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -183,11 +199,11 @@ func (m *awsRestjson1_serializeOpCreateEmailTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.EmailTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.EmailTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentEmailTemplateRequest(input.EmailTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -196,6 +212,14 @@ func (m *awsRestjson1_serializeOpCreateEmailTemplate) HandleSerialize(ctx contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -256,11 +280,11 @@ func (m *awsRestjson1_serializeOpCreateExportJob) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if input.ExportJobRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.ExportJobRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentExportJobRequest(input.ExportJobRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -269,6 +293,14 @@ func (m *awsRestjson1_serializeOpCreateExportJob) HandleSerialize(ctx context.Co if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -329,11 +361,11 @@ func (m *awsRestjson1_serializeOpCreateImportJob) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if input.ImportJobRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.ImportJobRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentImportJobRequest(input.ImportJobRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -342,6 +374,14 @@ func (m *awsRestjson1_serializeOpCreateImportJob) HandleSerialize(ctx context.Co if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -402,11 +442,11 @@ func (m *awsRestjson1_serializeOpCreateInAppTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.InAppTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.InAppTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentInAppTemplateRequest(input.InAppTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -415,6 +455,14 @@ func (m *awsRestjson1_serializeOpCreateInAppTemplate) HandleSerialize(ctx contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -475,11 +523,11 @@ func (m *awsRestjson1_serializeOpCreateJourney) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteJourneyRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteJourneyRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteJourneyRequest(input.WriteJourneyRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -488,6 +536,14 @@ func (m *awsRestjson1_serializeOpCreateJourney) HandleSerialize(ctx context.Cont if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -548,11 +604,11 @@ func (m *awsRestjson1_serializeOpCreatePushTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if input.PushNotificationTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.PushNotificationTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentPushNotificationTemplateRequest(input.PushNotificationTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -561,6 +617,14 @@ func (m *awsRestjson1_serializeOpCreatePushTemplate) HandleSerialize(ctx context if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -617,11 +681,11 @@ func (m *awsRestjson1_serializeOpCreateRecommenderConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if input.CreateRecommenderConfiguration != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.CreateRecommenderConfiguration != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentCreateRecommenderConfigurationShape(input.CreateRecommenderConfiguration, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -630,6 +694,14 @@ func (m *awsRestjson1_serializeOpCreateRecommenderConfiguration) HandleSerialize if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -681,11 +753,11 @@ func (m *awsRestjson1_serializeOpCreateSegment) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteSegmentRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteSegmentRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteSegmentRequest(input.WriteSegmentRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -694,6 +766,14 @@ func (m *awsRestjson1_serializeOpCreateSegment) HandleSerialize(ctx context.Cont if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -754,11 +834,11 @@ func (m *awsRestjson1_serializeOpCreateSmsTemplate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if input.SMSTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.SMSTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentSMSTemplateRequest(input.SMSTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -767,6 +847,14 @@ func (m *awsRestjson1_serializeOpCreateSmsTemplate) HandleSerialize(ctx context. if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -827,11 +915,11 @@ func (m *awsRestjson1_serializeOpCreateVoiceTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.VoiceTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.VoiceTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentVoiceTemplateRequest(input.VoiceTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -840,6 +928,14 @@ func (m *awsRestjson1_serializeOpCreateVoiceTemplate) HandleSerialize(ctx contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -5606,11 +5702,11 @@ func (m *awsRestjson1_serializeOpPhoneNumberValidate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.NumberValidateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.NumberValidateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentNumberValidateRequest(input.NumberValidateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -5619,6 +5715,14 @@ func (m *awsRestjson1_serializeOpPhoneNumberValidate) HandleSerialize(ctx contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -5670,11 +5774,11 @@ func (m *awsRestjson1_serializeOpPutEvents) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if input.EventsRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.EventsRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentEventsRequest(input.EventsRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -5683,6 +5787,14 @@ func (m *awsRestjson1_serializeOpPutEvents) HandleSerialize(ctx context.Context, if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -5743,11 +5855,11 @@ func (m *awsRestjson1_serializeOpPutEventStream) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteEventStream != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteEventStream != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteEventStream(input.WriteEventStream, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -5756,6 +5868,14 @@ func (m *awsRestjson1_serializeOpPutEventStream) HandleSerialize(ctx context.Con if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -5816,11 +5936,11 @@ func (m *awsRestjson1_serializeOpRemoveAttributes) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.UpdateAttributesRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.UpdateAttributesRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentUpdateAttributesRequest(input.UpdateAttributesRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -5829,6 +5949,14 @@ func (m *awsRestjson1_serializeOpRemoveAttributes) HandleSerialize(ctx context.C if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -5898,11 +6026,11 @@ func (m *awsRestjson1_serializeOpSendMessages) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: err} } - if input.MessageRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.MessageRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentMessageRequest(input.MessageRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -5911,6 +6039,14 @@ func (m *awsRestjson1_serializeOpSendMessages) HandleSerialize(ctx context.Conte if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -5971,11 +6107,11 @@ func (m *awsRestjson1_serializeOpSendUsersMessages) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if input.SendUsersMessageRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.SendUsersMessageRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentSendUsersMessageRequest(input.SendUsersMessageRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -5984,6 +6120,14 @@ func (m *awsRestjson1_serializeOpSendUsersMessages) HandleSerialize(ctx context. if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6044,11 +6188,11 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.TagsModel != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.TagsModel != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentTagsModel(input.TagsModel, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6057,6 +6201,14 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6181,11 +6333,11 @@ func (m *awsRestjson1_serializeOpUpdateAdmChannel) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.ADMChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.ADMChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentADMChannelRequest(input.ADMChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6194,6 +6346,14 @@ func (m *awsRestjson1_serializeOpUpdateAdmChannel) HandleSerialize(ctx context.C if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6254,11 +6414,11 @@ func (m *awsRestjson1_serializeOpUpdateApnsChannel) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if input.APNSChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.APNSChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentAPNSChannelRequest(input.APNSChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6267,6 +6427,14 @@ func (m *awsRestjson1_serializeOpUpdateApnsChannel) HandleSerialize(ctx context. if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6327,11 +6495,11 @@ func (m *awsRestjson1_serializeOpUpdateApnsSandboxChannel) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: err} } - if input.APNSSandboxChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.APNSSandboxChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentAPNSSandboxChannelRequest(input.APNSSandboxChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6340,6 +6508,14 @@ func (m *awsRestjson1_serializeOpUpdateApnsSandboxChannel) HandleSerialize(ctx c if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6400,11 +6576,11 @@ func (m *awsRestjson1_serializeOpUpdateApnsVoipChannel) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.APNSVoipChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.APNSVoipChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentAPNSVoipChannelRequest(input.APNSVoipChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6413,6 +6589,14 @@ func (m *awsRestjson1_serializeOpUpdateApnsVoipChannel) HandleSerialize(ctx cont if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6473,11 +6657,11 @@ func (m *awsRestjson1_serializeOpUpdateApnsVoipSandboxChannel) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if input.APNSVoipSandboxChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.APNSVoipSandboxChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentAPNSVoipSandboxChannelRequest(input.APNSVoipSandboxChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6486,6 +6670,14 @@ func (m *awsRestjson1_serializeOpUpdateApnsVoipSandboxChannel) HandleSerialize(c if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6546,11 +6738,11 @@ func (m *awsRestjson1_serializeOpUpdateApplicationSettings) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteApplicationSettingsRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteApplicationSettingsRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteApplicationSettingsRequest(input.WriteApplicationSettingsRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6559,6 +6751,14 @@ func (m *awsRestjson1_serializeOpUpdateApplicationSettings) HandleSerialize(ctx if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6619,11 +6819,11 @@ func (m *awsRestjson1_serializeOpUpdateBaiduChannel) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if input.BaiduChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.BaiduChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentBaiduChannelRequest(input.BaiduChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6632,6 +6832,14 @@ func (m *awsRestjson1_serializeOpUpdateBaiduChannel) HandleSerialize(ctx context if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6692,11 +6900,11 @@ func (m *awsRestjson1_serializeOpUpdateCampaign) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteCampaignRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteCampaignRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteCampaignRequest(input.WriteCampaignRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6705,6 +6913,14 @@ func (m *awsRestjson1_serializeOpUpdateCampaign) HandleSerialize(ctx context.Con if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6774,11 +6990,11 @@ func (m *awsRestjson1_serializeOpUpdateEmailChannel) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if input.EmailChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.EmailChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentEmailChannelRequest(input.EmailChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6787,6 +7003,14 @@ func (m *awsRestjson1_serializeOpUpdateEmailChannel) HandleSerialize(ctx context if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6847,11 +7071,11 @@ func (m *awsRestjson1_serializeOpUpdateEmailTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.EmailTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.EmailTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentEmailTemplateRequest(input.EmailTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6860,6 +7084,14 @@ func (m *awsRestjson1_serializeOpUpdateEmailTemplate) HandleSerialize(ctx contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -6928,11 +7160,11 @@ func (m *awsRestjson1_serializeOpUpdateEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if input.EndpointRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.EndpointRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentEndpointRequest(input.EndpointRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -6941,6 +7173,14 @@ func (m *awsRestjson1_serializeOpUpdateEndpoint) HandleSerialize(ctx context.Con if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7010,11 +7250,11 @@ func (m *awsRestjson1_serializeOpUpdateEndpointsBatch) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if input.EndpointBatchRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.EndpointBatchRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentEndpointBatchRequest(input.EndpointBatchRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7023,6 +7263,14 @@ func (m *awsRestjson1_serializeOpUpdateEndpointsBatch) HandleSerialize(ctx conte if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7083,11 +7331,11 @@ func (m *awsRestjson1_serializeOpUpdateGcmChannel) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.GCMChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.GCMChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentGCMChannelRequest(input.GCMChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7096,6 +7344,14 @@ func (m *awsRestjson1_serializeOpUpdateGcmChannel) HandleSerialize(ctx context.C if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7156,11 +7412,11 @@ func (m *awsRestjson1_serializeOpUpdateInAppTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.InAppTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.InAppTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentInAppTemplateRequest(input.InAppTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7169,6 +7425,14 @@ func (m *awsRestjson1_serializeOpUpdateInAppTemplate) HandleSerialize(ctx contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7237,11 +7501,11 @@ func (m *awsRestjson1_serializeOpUpdateJourney) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteJourneyRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteJourneyRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteJourneyRequest(input.WriteJourneyRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7250,6 +7514,14 @@ func (m *awsRestjson1_serializeOpUpdateJourney) HandleSerialize(ctx context.Cont if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7319,11 +7591,11 @@ func (m *awsRestjson1_serializeOpUpdateJourneyState) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if input.JourneyStateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.JourneyStateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentJourneyStateRequest(input.JourneyStateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7332,6 +7604,14 @@ func (m *awsRestjson1_serializeOpUpdateJourneyState) HandleSerialize(ctx context if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7401,11 +7681,11 @@ func (m *awsRestjson1_serializeOpUpdatePushTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if input.PushNotificationTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.PushNotificationTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentPushNotificationTemplateRequest(input.PushNotificationTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7414,6 +7694,14 @@ func (m *awsRestjson1_serializeOpUpdatePushTemplate) HandleSerialize(ctx context if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7482,11 +7770,11 @@ func (m *awsRestjson1_serializeOpUpdateRecommenderConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: err} } - if input.UpdateRecommenderConfiguration != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.UpdateRecommenderConfiguration != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentUpdateRecommenderConfigurationShape(input.UpdateRecommenderConfiguration, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7495,6 +7783,14 @@ func (m *awsRestjson1_serializeOpUpdateRecommenderConfiguration) HandleSerialize if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7555,11 +7851,11 @@ func (m *awsRestjson1_serializeOpUpdateSegment) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if input.WriteSegmentRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.WriteSegmentRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentWriteSegmentRequest(input.WriteSegmentRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7568,6 +7864,14 @@ func (m *awsRestjson1_serializeOpUpdateSegment) HandleSerialize(ctx context.Cont if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7637,11 +7941,11 @@ func (m *awsRestjson1_serializeOpUpdateSmsChannel) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if input.SMSChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.SMSChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentSMSChannelRequest(input.SMSChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7650,6 +7954,14 @@ func (m *awsRestjson1_serializeOpUpdateSmsChannel) HandleSerialize(ctx context.C if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7710,11 +8022,11 @@ func (m *awsRestjson1_serializeOpUpdateSmsTemplate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if input.SMSTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.SMSTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentSMSTemplateRequest(input.SMSTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7723,6 +8035,14 @@ func (m *awsRestjson1_serializeOpUpdateSmsTemplate) HandleSerialize(ctx context. if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7791,11 +8111,11 @@ func (m *awsRestjson1_serializeOpUpdateTemplateActiveVersion) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: err} } - if input.TemplateActiveVersionRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.TemplateActiveVersionRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentTemplateActiveVersionRequest(input.TemplateActiveVersionRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7804,6 +8124,14 @@ func (m *awsRestjson1_serializeOpUpdateTemplateActiveVersion) HandleSerialize(ct if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7873,11 +8201,11 @@ func (m *awsRestjson1_serializeOpUpdateVoiceChannel) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if input.VoiceChannelRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.VoiceChannelRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentVoiceChannelRequest(input.VoiceChannelRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7886,6 +8214,14 @@ func (m *awsRestjson1_serializeOpUpdateVoiceChannel) HandleSerialize(ctx context if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { @@ -7946,11 +8282,11 @@ func (m *awsRestjson1_serializeOpUpdateVoiceTemplate) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if input.VoiceTemplateRequest != nil { - if !restEncoder.HasHeader("Content-Type") { - restEncoder.SetHeader("Content-Type").String("application/json") - } + if !restEncoder.HasHeader("Content-Type") { + restEncoder.SetHeader("Content-Type").String("application/json") + } + if input.VoiceTemplateRequest != nil { jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeDocumentVoiceTemplateRequest(input.VoiceTemplateRequest, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} @@ -7959,6 +8295,14 @@ func (m *awsRestjson1_serializeOpUpdateVoiceTemplate) HandleSerialize(ctx contex if request, err = request.SetStream(payload); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } + } else { + jsonEncoder := smithyjson.NewEncoder() + jsonEncoder.Value.Object().Close() + payload := bytes.NewReader(jsonEncoder.Bytes()) + if request, err = request.SetStream(payload); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + } if request.Request, err = restEncoder.Encode(request.Request); err != nil { diff --git a/service/pricing/serializers.go b/service/pricing/serializers.go index e1bbb64d45c..74956166269 100644 --- a/service/pricing/serializers.go +++ b/service/pricing/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpDescribeServices struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpDescribeServices) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpGetAttributeValues) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpGetProducts) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/proton/serializers.go b/service/proton/serializers.go index 60541dcdbca..f01efc87e12 100644 --- a/service/proton/serializers.go +++ b/service/proton/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpAcceptEnvironmentAccountConnection struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpAcceptEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpCancelEnvironmentDeployment) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpCancelServiceInstanceDeployment) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpCancelServicePipelineDeployment) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpCreateEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpCreateEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpCreateEnvironmentTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpCreateEnvironmentTemplateVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson10_serializeOpCreateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson10_serializeOpCreateServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson10_serializeOpDeleteEnvironmentTemplateVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson10_serializeOpDeleteService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson10_serializeOpDeleteServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson10_serializeOpGetAccountSettings) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson10_serializeOpGetEnvironment) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentAccountConnection) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplate) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson10_serializeOpGetEnvironmentTemplateVersion) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson10_serializeOpGetService) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson10_serializeOpGetServiceInstance) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplate) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson10_serializeOpGetServiceTemplateVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson10_serializeOpListEnvironmentAccountConnections) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson10_serializeOpListEnvironments) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplates) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson10_serializeOpListEnvironmentTemplateVersions) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson10_serializeOpListServiceInstances) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson10_serializeOpListServices) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson10_serializeOpListServiceTemplates) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson10_serializeOpListServiceTemplateVersions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson10_serializeOpRejectEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson10_serializeOpUpdateAccountSettings) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironment) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentAccountConnection) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson10_serializeOpUpdateEnvironmentTemplateVersion) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson10_serializeOpUpdateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson10_serializeOpUpdateServiceInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson10_serializeOpUpdateServicePipeline) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplate) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson10_serializeOpUpdateServiceTemplateVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/qldbsession/serializers.go b/service/qldbsession/serializers.go index dce60b1fafb..90036b673e2 100644 --- a/service/qldbsession/serializers.go +++ b/service/qldbsession/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpSendCommand struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpSendCommand) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/rds/serializers.go b/service/rds/serializers.go index f175805a2ef..d1e0a432931 100644 --- a/service/rds/serializers.go +++ b/service/rds/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAddRoleToDBCluster struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAddRoleToDBCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpAddRoleToDBInstance) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpAddSourceIdentifierToSubscription) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpAddTagsToResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpApplyPendingMaintenanceAction) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpAuthorizeDBSecurityGroupIngress) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpBacktrackDBCluster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpCancelExportTask) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpCopyDBClusterParameterGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpCopyDBClusterSnapshot) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpCopyDBParameterGroup) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpCopyDBSnapshot) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpCopyOptionGroup) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpCreateCustomAvailabilityZone) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpCreateCustomDBEngineVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpCreateDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpCreateDBClusterSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpCreateDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpCreateDBInstanceReadReplica) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpCreateDBParameterGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1268,7 +1445,15 @@ func (m *awsAwsquery_serializeOpCreateDBProxy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1324,7 +1509,15 @@ func (m *awsAwsquery_serializeOpCreateDBProxyEndpoint) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1380,7 +1573,15 @@ func (m *awsAwsquery_serializeOpCreateDBSecurityGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1436,7 +1637,15 @@ func (m *awsAwsquery_serializeOpCreateDBSnapshot) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1701,15 @@ func (m *awsAwsquery_serializeOpCreateDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1548,7 +1765,15 @@ func (m *awsAwsquery_serializeOpCreateEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1604,7 +1829,15 @@ func (m *awsAwsquery_serializeOpCreateGlobalCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1660,7 +1893,15 @@ func (m *awsAwsquery_serializeOpCreateOptionGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1716,7 +1957,15 @@ func (m *awsAwsquery_serializeOpDeleteCustomAvailabilityZone) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1772,7 +2021,15 @@ func (m *awsAwsquery_serializeOpDeleteCustomDBEngineVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1828,7 +2085,15 @@ func (m *awsAwsquery_serializeOpDeleteDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1884,7 +2149,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1940,7 +2213,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1996,7 +2277,15 @@ func (m *awsAwsquery_serializeOpDeleteDBClusterSnapshot) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2341,15 @@ func (m *awsAwsquery_serializeOpDeleteDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2108,7 +2405,15 @@ func (m *awsAwsquery_serializeOpDeleteDBInstanceAutomatedBackup) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2164,7 +2469,15 @@ func (m *awsAwsquery_serializeOpDeleteDBParameterGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2220,7 +2533,15 @@ func (m *awsAwsquery_serializeOpDeleteDBProxy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2276,7 +2597,15 @@ func (m *awsAwsquery_serializeOpDeleteDBProxyEndpoint) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2332,7 +2661,15 @@ func (m *awsAwsquery_serializeOpDeleteDBSecurityGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2388,7 +2725,15 @@ func (m *awsAwsquery_serializeOpDeleteDBSnapshot) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2444,7 +2789,15 @@ func (m *awsAwsquery_serializeOpDeleteDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2500,7 +2853,15 @@ func (m *awsAwsquery_serializeOpDeleteEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2556,7 +2917,15 @@ func (m *awsAwsquery_serializeOpDeleteGlobalCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2612,7 +2981,15 @@ func (m *awsAwsquery_serializeOpDeleteInstallationMedia) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3045,15 @@ func (m *awsAwsquery_serializeOpDeleteOptionGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2724,7 +3109,15 @@ func (m *awsAwsquery_serializeOpDeregisterDBProxyTargets) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2780,7 +3173,15 @@ func (m *awsAwsquery_serializeOpDescribeAccountAttributes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2832,7 +3233,15 @@ func (m *awsAwsquery_serializeOpDescribeCertificates) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2888,7 +3297,15 @@ func (m *awsAwsquery_serializeOpDescribeCustomAvailabilityZones) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2944,7 +3361,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterBacktracks) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3000,7 +3425,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterEndpoints) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3056,7 +3489,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterParameterGroups) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3112,7 +3553,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterParameters) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3168,7 +3617,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusters) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3224,7 +3681,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshotAttributes) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3280,7 +3745,15 @@ func (m *awsAwsquery_serializeOpDescribeDBClusterSnapshots) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3336,7 +3809,15 @@ func (m *awsAwsquery_serializeOpDescribeDBEngineVersions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3392,7 +3873,15 @@ func (m *awsAwsquery_serializeOpDescribeDBInstanceAutomatedBackups) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3448,7 +3937,15 @@ func (m *awsAwsquery_serializeOpDescribeDBInstances) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3504,7 +4001,15 @@ func (m *awsAwsquery_serializeOpDescribeDBLogFiles) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3560,7 +4065,15 @@ func (m *awsAwsquery_serializeOpDescribeDBParameterGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3616,7 +4129,15 @@ func (m *awsAwsquery_serializeOpDescribeDBParameters) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3672,7 +4193,15 @@ func (m *awsAwsquery_serializeOpDescribeDBProxies) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3728,7 +4257,15 @@ func (m *awsAwsquery_serializeOpDescribeDBProxyEndpoints) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3784,7 +4321,15 @@ func (m *awsAwsquery_serializeOpDescribeDBProxyTargetGroups) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3840,7 +4385,15 @@ func (m *awsAwsquery_serializeOpDescribeDBProxyTargets) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3896,7 +4449,15 @@ func (m *awsAwsquery_serializeOpDescribeDBSecurityGroups) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3952,7 +4513,15 @@ func (m *awsAwsquery_serializeOpDescribeDBSnapshotAttributes) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4008,7 +4577,15 @@ func (m *awsAwsquery_serializeOpDescribeDBSnapshots) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4064,7 +4641,15 @@ func (m *awsAwsquery_serializeOpDescribeDBSubnetGroups) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4120,7 +4705,15 @@ func (m *awsAwsquery_serializeOpDescribeEngineDefaultClusterParameters) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4176,7 +4769,15 @@ func (m *awsAwsquery_serializeOpDescribeEngineDefaultParameters) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4232,7 +4833,15 @@ func (m *awsAwsquery_serializeOpDescribeEventCategories) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4288,7 +4897,15 @@ func (m *awsAwsquery_serializeOpDescribeEvents) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4344,7 +4961,15 @@ func (m *awsAwsquery_serializeOpDescribeEventSubscriptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4400,7 +5025,15 @@ func (m *awsAwsquery_serializeOpDescribeExportTasks) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4456,7 +5089,15 @@ func (m *awsAwsquery_serializeOpDescribeGlobalClusters) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4512,7 +5153,15 @@ func (m *awsAwsquery_serializeOpDescribeInstallationMedia) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4568,7 +5217,15 @@ func (m *awsAwsquery_serializeOpDescribeOptionGroupOptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4624,7 +5281,15 @@ func (m *awsAwsquery_serializeOpDescribeOptionGroups) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4680,7 +5345,15 @@ func (m *awsAwsquery_serializeOpDescribeOrderableDBInstanceOptions) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4736,7 +5409,15 @@ func (m *awsAwsquery_serializeOpDescribePendingMaintenanceActions) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4792,7 +5473,15 @@ func (m *awsAwsquery_serializeOpDescribeReservedDBInstances) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4848,7 +5537,15 @@ func (m *awsAwsquery_serializeOpDescribeReservedDBInstancesOfferings) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4904,7 +5601,15 @@ func (m *awsAwsquery_serializeOpDescribeSourceRegions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4960,7 +5665,15 @@ func (m *awsAwsquery_serializeOpDescribeValidDBInstanceModifications) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5016,7 +5729,15 @@ func (m *awsAwsquery_serializeOpDownloadDBLogFilePortion) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5072,7 +5793,15 @@ func (m *awsAwsquery_serializeOpFailoverDBCluster) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5128,7 +5857,15 @@ func (m *awsAwsquery_serializeOpFailoverGlobalCluster) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5184,7 +5921,15 @@ func (m *awsAwsquery_serializeOpImportInstallationMedia) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5240,7 +5985,15 @@ func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5296,7 +6049,15 @@ func (m *awsAwsquery_serializeOpModifyCertificates) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5352,7 +6113,15 @@ func (m *awsAwsquery_serializeOpModifyCurrentDBClusterCapacity) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5408,7 +6177,15 @@ func (m *awsAwsquery_serializeOpModifyCustomDBEngineVersion) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5464,7 +6241,15 @@ func (m *awsAwsquery_serializeOpModifyDBCluster) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5520,7 +6305,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5576,7 +6369,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterParameterGroup) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5632,7 +6433,15 @@ func (m *awsAwsquery_serializeOpModifyDBClusterSnapshotAttribute) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5688,7 +6497,15 @@ func (m *awsAwsquery_serializeOpModifyDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5744,7 +6561,15 @@ func (m *awsAwsquery_serializeOpModifyDBParameterGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5800,7 +6625,15 @@ func (m *awsAwsquery_serializeOpModifyDBProxy) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5856,7 +6689,15 @@ func (m *awsAwsquery_serializeOpModifyDBProxyEndpoint) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5912,7 +6753,15 @@ func (m *awsAwsquery_serializeOpModifyDBProxyTargetGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5968,7 +6817,15 @@ func (m *awsAwsquery_serializeOpModifyDBSnapshot) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6024,7 +6881,15 @@ func (m *awsAwsquery_serializeOpModifyDBSnapshotAttribute) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6080,7 +6945,15 @@ func (m *awsAwsquery_serializeOpModifyDBSubnetGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6136,7 +7009,15 @@ func (m *awsAwsquery_serializeOpModifyEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6192,7 +7073,15 @@ func (m *awsAwsquery_serializeOpModifyGlobalCluster) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6248,7 +7137,15 @@ func (m *awsAwsquery_serializeOpModifyOptionGroup) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6304,7 +7201,15 @@ func (m *awsAwsquery_serializeOpPromoteReadReplica) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6360,7 +7265,15 @@ func (m *awsAwsquery_serializeOpPromoteReadReplicaDBCluster) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6416,7 +7329,15 @@ func (m *awsAwsquery_serializeOpPurchaseReservedDBInstancesOffering) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6472,7 +7393,15 @@ func (m *awsAwsquery_serializeOpRebootDBInstance) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6528,7 +7457,15 @@ func (m *awsAwsquery_serializeOpRegisterDBProxyTargets) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6584,7 +7521,15 @@ func (m *awsAwsquery_serializeOpRemoveFromGlobalCluster) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6640,7 +7585,15 @@ func (m *awsAwsquery_serializeOpRemoveRoleFromDBCluster) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6696,7 +7649,15 @@ func (m *awsAwsquery_serializeOpRemoveRoleFromDBInstance) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6752,7 +7713,15 @@ func (m *awsAwsquery_serializeOpRemoveSourceIdentifierFromSubscription) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6808,7 +7777,15 @@ func (m *awsAwsquery_serializeOpRemoveTagsFromResource) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6864,7 +7841,15 @@ func (m *awsAwsquery_serializeOpResetDBClusterParameterGroup) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6920,7 +7905,15 @@ func (m *awsAwsquery_serializeOpResetDBParameterGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6976,7 +7969,15 @@ func (m *awsAwsquery_serializeOpRestoreDBClusterFromS3) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7032,7 +8033,15 @@ func (m *awsAwsquery_serializeOpRestoreDBClusterFromSnapshot) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7088,7 +8097,15 @@ func (m *awsAwsquery_serializeOpRestoreDBClusterToPointInTime) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7144,7 +8161,15 @@ func (m *awsAwsquery_serializeOpRestoreDBInstanceFromDBSnapshot) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7200,7 +8225,15 @@ func (m *awsAwsquery_serializeOpRestoreDBInstanceFromS3) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7256,7 +8289,15 @@ func (m *awsAwsquery_serializeOpRestoreDBInstanceToPointInTime) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7312,7 +8353,15 @@ func (m *awsAwsquery_serializeOpRevokeDBSecurityGroupIngress) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7368,7 +8417,15 @@ func (m *awsAwsquery_serializeOpStartActivityStream) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7424,7 +8481,15 @@ func (m *awsAwsquery_serializeOpStartDBCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7480,7 +8545,15 @@ func (m *awsAwsquery_serializeOpStartDBInstance) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7536,7 +8609,15 @@ func (m *awsAwsquery_serializeOpStartDBInstanceAutomatedBackupsReplication) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7592,7 +8673,15 @@ func (m *awsAwsquery_serializeOpStartExportTask) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7648,7 +8737,15 @@ func (m *awsAwsquery_serializeOpStopActivityStream) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7704,7 +8801,15 @@ func (m *awsAwsquery_serializeOpStopDBCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7760,7 +8865,15 @@ func (m *awsAwsquery_serializeOpStopDBInstance) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7816,7 +8929,15 @@ func (m *awsAwsquery_serializeOpStopDBInstanceAutomatedBackupsReplication) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/redshift/serializers.go b/service/redshift/serializers.go index e6708ade94f..d30ef259938 100644 --- a/service/redshift/serializers.go +++ b/service/redshift/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAcceptReservedNodeExchange struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAcceptReservedNodeExchange) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpAddPartner) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpAssociateDataShareConsumer) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpAuthorizeClusterSecurityGroupIngress) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpAuthorizeDataShare) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpAuthorizeEndpointAccess) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpAuthorizeSnapshotAccess) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpBatchDeleteClusterSnapshots) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpBatchModifyClusterSnapshots) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpCancelResize) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpCopyClusterSnapshot) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpCreateAuthenticationProfile) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpCreateCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpCreateClusterParameterGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpCreateClusterSecurityGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpCreateClusterSnapshot) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpCreateClusterSubnetGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpCreateEndpointAccess) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpCreateEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpCreateHsmClientCertificate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpCreateHsmConfiguration) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1381,15 @@ func (m *awsAwsquery_serializeOpCreateScheduledAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1268,7 +1445,15 @@ func (m *awsAwsquery_serializeOpCreateSnapshotCopyGrant) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1324,7 +1509,15 @@ func (m *awsAwsquery_serializeOpCreateSnapshotSchedule) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1380,7 +1573,15 @@ func (m *awsAwsquery_serializeOpCreateTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1436,7 +1637,15 @@ func (m *awsAwsquery_serializeOpCreateUsageLimit) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1701,15 @@ func (m *awsAwsquery_serializeOpDeauthorizeDataShare) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1548,7 +1765,15 @@ func (m *awsAwsquery_serializeOpDeleteAuthenticationProfile) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1604,7 +1829,15 @@ func (m *awsAwsquery_serializeOpDeleteCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1660,7 +1893,15 @@ func (m *awsAwsquery_serializeOpDeleteClusterParameterGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1716,7 +1957,15 @@ func (m *awsAwsquery_serializeOpDeleteClusterSecurityGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1772,7 +2021,15 @@ func (m *awsAwsquery_serializeOpDeleteClusterSnapshot) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1828,7 +2085,15 @@ func (m *awsAwsquery_serializeOpDeleteClusterSubnetGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1884,7 +2149,15 @@ func (m *awsAwsquery_serializeOpDeleteEndpointAccess) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1940,7 +2213,15 @@ func (m *awsAwsquery_serializeOpDeleteEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1996,7 +2277,15 @@ func (m *awsAwsquery_serializeOpDeleteHsmClientCertificate) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2052,7 +2341,15 @@ func (m *awsAwsquery_serializeOpDeleteHsmConfiguration) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2108,7 +2405,15 @@ func (m *awsAwsquery_serializeOpDeletePartner) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2164,7 +2469,15 @@ func (m *awsAwsquery_serializeOpDeleteScheduledAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2220,7 +2533,15 @@ func (m *awsAwsquery_serializeOpDeleteSnapshotCopyGrant) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2276,7 +2597,15 @@ func (m *awsAwsquery_serializeOpDeleteSnapshotSchedule) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2332,7 +2661,15 @@ func (m *awsAwsquery_serializeOpDeleteTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2388,7 +2725,15 @@ func (m *awsAwsquery_serializeOpDeleteUsageLimit) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2444,7 +2789,15 @@ func (m *awsAwsquery_serializeOpDescribeAccountAttributes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2500,7 +2853,15 @@ func (m *awsAwsquery_serializeOpDescribeAuthenticationProfiles) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2556,7 +2917,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterDbRevisions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2612,7 +2981,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterParameterGroups) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3045,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterParameters) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2724,7 +3109,15 @@ func (m *awsAwsquery_serializeOpDescribeClusters) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2780,7 +3173,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterSecurityGroups) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2836,7 +3237,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterSnapshots) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2892,7 +3301,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterSubnetGroups) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2948,7 +3365,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterTracks) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3004,7 +3429,15 @@ func (m *awsAwsquery_serializeOpDescribeClusterVersions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3060,7 +3493,15 @@ func (m *awsAwsquery_serializeOpDescribeDataShares) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3116,7 +3557,15 @@ func (m *awsAwsquery_serializeOpDescribeDataSharesForConsumer) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3172,7 +3621,15 @@ func (m *awsAwsquery_serializeOpDescribeDataSharesForProducer) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3228,7 +3685,15 @@ func (m *awsAwsquery_serializeOpDescribeDefaultClusterParameters) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3284,7 +3749,15 @@ func (m *awsAwsquery_serializeOpDescribeEndpointAccess) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3340,7 +3813,15 @@ func (m *awsAwsquery_serializeOpDescribeEndpointAuthorization) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3396,7 +3877,15 @@ func (m *awsAwsquery_serializeOpDescribeEventCategories) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3452,7 +3941,15 @@ func (m *awsAwsquery_serializeOpDescribeEvents) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3508,7 +4005,15 @@ func (m *awsAwsquery_serializeOpDescribeEventSubscriptions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3564,7 +4069,15 @@ func (m *awsAwsquery_serializeOpDescribeHsmClientCertificates) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3620,7 +4133,15 @@ func (m *awsAwsquery_serializeOpDescribeHsmConfigurations) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3676,7 +4197,15 @@ func (m *awsAwsquery_serializeOpDescribeLoggingStatus) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3732,7 +4261,15 @@ func (m *awsAwsquery_serializeOpDescribeNodeConfigurationOptions) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3788,7 +4325,15 @@ func (m *awsAwsquery_serializeOpDescribeOrderableClusterOptions) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3844,7 +4389,15 @@ func (m *awsAwsquery_serializeOpDescribePartners) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3900,7 +4453,15 @@ func (m *awsAwsquery_serializeOpDescribeReservedNodeOfferings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3956,7 +4517,15 @@ func (m *awsAwsquery_serializeOpDescribeReservedNodes) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4012,7 +4581,15 @@ func (m *awsAwsquery_serializeOpDescribeResize) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4068,7 +4645,15 @@ func (m *awsAwsquery_serializeOpDescribeScheduledActions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4124,7 +4709,15 @@ func (m *awsAwsquery_serializeOpDescribeSnapshotCopyGrants) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4180,7 +4773,15 @@ func (m *awsAwsquery_serializeOpDescribeSnapshotSchedules) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4236,7 +4837,15 @@ func (m *awsAwsquery_serializeOpDescribeStorage) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4288,7 +4897,15 @@ func (m *awsAwsquery_serializeOpDescribeTableRestoreStatus) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4344,7 +4961,15 @@ func (m *awsAwsquery_serializeOpDescribeTags) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4400,7 +5025,15 @@ func (m *awsAwsquery_serializeOpDescribeUsageLimits) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4456,7 +5089,15 @@ func (m *awsAwsquery_serializeOpDisableLogging) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4512,7 +5153,15 @@ func (m *awsAwsquery_serializeOpDisableSnapshotCopy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4568,7 +5217,15 @@ func (m *awsAwsquery_serializeOpDisassociateDataShareConsumer) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4624,7 +5281,15 @@ func (m *awsAwsquery_serializeOpEnableLogging) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4680,7 +5345,15 @@ func (m *awsAwsquery_serializeOpEnableSnapshotCopy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4736,7 +5409,15 @@ func (m *awsAwsquery_serializeOpGetClusterCredentials) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4792,7 +5473,15 @@ func (m *awsAwsquery_serializeOpGetReservedNodeExchangeOfferings) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4848,7 +5537,15 @@ func (m *awsAwsquery_serializeOpModifyAquaConfiguration) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4904,7 +5601,15 @@ func (m *awsAwsquery_serializeOpModifyAuthenticationProfile) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4960,7 +5665,15 @@ func (m *awsAwsquery_serializeOpModifyCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5016,7 +5729,15 @@ func (m *awsAwsquery_serializeOpModifyClusterDbRevision) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5072,7 +5793,15 @@ func (m *awsAwsquery_serializeOpModifyClusterIamRoles) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5128,7 +5857,15 @@ func (m *awsAwsquery_serializeOpModifyClusterMaintenance) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5184,7 +5921,15 @@ func (m *awsAwsquery_serializeOpModifyClusterParameterGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5240,7 +5985,15 @@ func (m *awsAwsquery_serializeOpModifyClusterSnapshot) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5296,7 +6049,15 @@ func (m *awsAwsquery_serializeOpModifyClusterSnapshotSchedule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5352,7 +6113,15 @@ func (m *awsAwsquery_serializeOpModifyClusterSubnetGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5408,7 +6177,15 @@ func (m *awsAwsquery_serializeOpModifyEndpointAccess) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5464,7 +6241,15 @@ func (m *awsAwsquery_serializeOpModifyEventSubscription) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5520,7 +6305,15 @@ func (m *awsAwsquery_serializeOpModifyScheduledAction) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5576,7 +6369,15 @@ func (m *awsAwsquery_serializeOpModifySnapshotCopyRetentionPeriod) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5632,7 +6433,15 @@ func (m *awsAwsquery_serializeOpModifySnapshotSchedule) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5688,7 +6497,15 @@ func (m *awsAwsquery_serializeOpModifyUsageLimit) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5744,7 +6561,15 @@ func (m *awsAwsquery_serializeOpPauseCluster) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5800,7 +6625,15 @@ func (m *awsAwsquery_serializeOpPurchaseReservedNodeOffering) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5856,7 +6689,15 @@ func (m *awsAwsquery_serializeOpRebootCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5912,7 +6753,15 @@ func (m *awsAwsquery_serializeOpRejectDataShare) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5968,7 +6817,15 @@ func (m *awsAwsquery_serializeOpResetClusterParameterGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6024,7 +6881,15 @@ func (m *awsAwsquery_serializeOpResizeCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6080,7 +6945,15 @@ func (m *awsAwsquery_serializeOpRestoreFromClusterSnapshot) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6136,7 +7009,15 @@ func (m *awsAwsquery_serializeOpRestoreTableFromClusterSnapshot) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6192,7 +7073,15 @@ func (m *awsAwsquery_serializeOpResumeCluster) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6248,7 +7137,15 @@ func (m *awsAwsquery_serializeOpRevokeClusterSecurityGroupIngress) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6304,7 +7201,15 @@ func (m *awsAwsquery_serializeOpRevokeEndpointAccess) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6360,7 +7265,15 @@ func (m *awsAwsquery_serializeOpRevokeSnapshotAccess) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6416,7 +7329,15 @@ func (m *awsAwsquery_serializeOpRotateEncryptionKey) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6472,7 +7393,15 @@ func (m *awsAwsquery_serializeOpUpdatePartnerStatus) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/redshiftdata/serializers.go b/service/redshiftdata/serializers.go index e2937f4fcd0..74f1a19c9d5 100644 --- a/service/redshiftdata/serializers.go +++ b/service/redshiftdata/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpBatchExecuteStatement struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpBatchExecuteStatement) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCancelStatement) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpDescribeStatement) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDescribeTable) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpExecuteStatement) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpGetStatementResult) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpListDatabases) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpListSchemas) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpListStatements) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpListTables) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/rekognition/serializers.go b/service/rekognition/serializers.go index 4cceff25053..1da98fc7f8c 100644 --- a/service/rekognition/serializers.go +++ b/service/rekognition/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpCompareFaces struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCompareFaces) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateCollection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateProjectVersion) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateStreamProcessor) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteCollection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteDataset) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteFaces) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteProjectVersion) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteStreamProcessor) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDescribeCollection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDescribeDataset) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDescribeProjects) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeProjectVersions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeStreamProcessor) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDetectCustomLabels) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDetectFaces) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDetectLabels) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDetectModerationLabels) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDetectProtectiveEquipment) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDetectText) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDistributeDatasetEntries) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpGetCelebrityInfo) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpGetCelebrityRecognition) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpGetContentModeration) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpGetFaceDetection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpGetFaceSearch) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpGetLabelDetection) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpGetPersonTracking) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpGetSegmentDetection) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpGetTextDetection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpIndexFaces) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListCollections) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpListDatasetEntries) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpListDatasetLabels) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpListFaces) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpListStreamProcessors) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpRecognizeCelebrities) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpSearchFaces) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpSearchFacesByImage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpStartCelebrityRecognition) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpStartContentModeration) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpStartFaceDetection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpStartFaceSearch) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpStartLabelDetection) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpStartPersonTracking) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpStartProjectVersion) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpStartSegmentDetection) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2433,7 +2842,15 @@ func (m *awsAwsjson11_serializeOpStartStreamProcessor) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2480,7 +2897,15 @@ func (m *awsAwsjson11_serializeOpStartTextDetection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2527,7 +2952,15 @@ func (m *awsAwsjson11_serializeOpStopProjectVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2574,7 +3007,15 @@ func (m *awsAwsjson11_serializeOpStopStreamProcessor) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2621,7 +3062,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3117,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2715,7 +3172,15 @@ func (m *awsAwsjson11_serializeOpUpdateDatasetEntries) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/resourcegroupstaggingapi/serializers.go b/service/resourcegroupstaggingapi/serializers.go index 285c0678b5c..ecddf7abdc0 100644 --- a/service/resourcegroupstaggingapi/serializers.go +++ b/service/resourcegroupstaggingapi/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpDescribeReportCreation struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpDescribeReportCreation) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpGetComplianceSummary) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpGetResources) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpGetTagKeys) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpGetTagValues) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpStartReportCreation) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpTagResources) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpUntagResources) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/route53domains/serializers.go b/service/route53domains/serializers.go index 16c1db369e6..d87d1ff7a93 100644 --- a/service/route53domains/serializers.go +++ b/service/route53domains/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAcceptDomainTransferFromAnotherAwsAccount struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAcceptDomainTransferFromAnotherAwsAccount) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCancelDomainTransferToAnotherAwsAccount) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCheckDomainAvailability) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCheckDomainTransferability) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteTagsForDomain) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDisableDomainAutoRenew) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDisableDomainTransferLock) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpEnableDomainAutoRenew) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpEnableDomainTransferLock) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpGetContactReachabilityStatus) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpGetDomainDetail) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpGetDomainSuggestions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpGetOperationDetail) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpListDomains) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListOperations) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpListTagsForDomain) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpRegisterDomain) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpRejectDomainTransferFromAnotherAwsAccount) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpRenewDomain) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpResendContactReachabilityEmail) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpRetrieveDomainAuthCode) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpTransferDomain) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpTransferDomainToAnotherAwsAccount) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpUpdateDomainContact) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpUpdateDomainContactPrivacy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpUpdateDomainNameservers) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpUpdateTagsForDomain) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpViewBilling) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/route53recoverycluster/serializers.go b/service/route53recoverycluster/serializers.go index 8113b49e10e..2f3350257a2 100644 --- a/service/route53recoverycluster/serializers.go +++ b/service/route53recoverycluster/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpGetRoutingControlState struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpGetRoutingControlState) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpUpdateRoutingControlState) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpUpdateRoutingControlStates) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/route53resolver/serializers.go b/service/route53resolver/serializers.go index 20e0e1db855..b3645b0e26b 100644 --- a/service/route53resolver/serializers.go +++ b/service/route53resolver/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateFirewallRuleGroup struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateFirewallRuleGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAssociateResolverEndpointIpAddress) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpAssociateResolverQueryLogConfig) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpAssociateResolverRule) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateFirewallDomainList) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateFirewallRule) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateFirewallRuleGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateResolverEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateResolverQueryLogConfig) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateResolverRule) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDeleteFirewallDomainList) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDeleteFirewallRule) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDeleteFirewallRuleGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDeleteResolverEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDeleteResolverQueryLogConfig) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDeleteResolverRule) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDisassociateFirewallRuleGroup) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDisassociateResolverEndpointIpAddress) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDisassociateResolverQueryLogConfig) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDisassociateResolverRule) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpGetFirewallConfig) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpGetFirewallDomainList) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpGetFirewallRuleGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpGetFirewallRuleGroupAssociation) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpGetFirewallRuleGroupPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpGetResolverConfig) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpGetResolverDnssecConfig) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpGetResolverEndpoint) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpGetResolverQueryLogConfig) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpGetResolverQueryLogConfigAssociation) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpGetResolverQueryLogConfigPolicy) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpGetResolverRule) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpGetResolverRuleAssociation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpGetResolverRulePolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpImportFirewallDomains) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpListFirewallConfigs) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpListFirewallDomainLists) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpListFirewallDomains) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpListFirewallRuleGroupAssociations) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpListFirewallRuleGroups) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpListFirewallRules) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpListResolverConfigs) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpListResolverDnssecConfigs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpListResolverEndpointIpAddresses) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpListResolverEndpoints) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpListResolverQueryLogConfigAssociations) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpListResolverQueryLogConfigs) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpListResolverRuleAssociations) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpListResolverRules) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpPutFirewallRuleGroupPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpPutResolverQueryLogConfigPolicy) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpPutResolverRulePolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpUpdateFirewallConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpUpdateFirewallDomains) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpUpdateFirewallRule) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpUpdateFirewallRuleGroupAssociation) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpUpdateResolverConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpUpdateResolverDnssecConfig) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpUpdateResolverEndpoint) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpUpdateResolverRule) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 09be257bc5f..d6900258f4e 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -14,6 +14,7 @@ import ( smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAddAssociation struct { @@ -37,7 +38,15 @@ func (m *awsAwsjson11_serializeOpAddAssociation) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -84,7 +93,15 @@ func (m *awsAwsjson11_serializeOpAddTags) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -131,7 +148,15 @@ func (m *awsAwsjson11_serializeOpAssociateTrialComponent) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -178,7 +203,15 @@ func (m *awsAwsjson11_serializeOpBatchDescribeModelPackage) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -225,7 +258,15 @@ func (m *awsAwsjson11_serializeOpCreateAction) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -272,7 +313,15 @@ func (m *awsAwsjson11_serializeOpCreateAlgorithm) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -319,7 +368,15 @@ func (m *awsAwsjson11_serializeOpCreateApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -366,7 +423,15 @@ func (m *awsAwsjson11_serializeOpCreateAppImageConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -413,7 +478,15 @@ func (m *awsAwsjson11_serializeOpCreateArtifact) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -460,7 +533,15 @@ func (m *awsAwsjson11_serializeOpCreateAutoMLJob) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -507,7 +588,15 @@ func (m *awsAwsjson11_serializeOpCreateCodeRepository) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -554,7 +643,15 @@ func (m *awsAwsjson11_serializeOpCreateCompilationJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -601,7 +698,15 @@ func (m *awsAwsjson11_serializeOpCreateContext) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -648,7 +753,15 @@ func (m *awsAwsjson11_serializeOpCreateDataQualityJobDefinition) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -695,7 +808,15 @@ func (m *awsAwsjson11_serializeOpCreateDeviceFleet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -742,7 +863,15 @@ func (m *awsAwsjson11_serializeOpCreateDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -789,7 +918,15 @@ func (m *awsAwsjson11_serializeOpCreateEdgePackagingJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -836,7 +973,15 @@ func (m *awsAwsjson11_serializeOpCreateEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -883,7 +1028,15 @@ func (m *awsAwsjson11_serializeOpCreateEndpointConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -930,7 +1083,15 @@ func (m *awsAwsjson11_serializeOpCreateExperiment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -977,7 +1138,15 @@ func (m *awsAwsjson11_serializeOpCreateFeatureGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1024,7 +1193,15 @@ func (m *awsAwsjson11_serializeOpCreateFlowDefinition) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1071,7 +1248,15 @@ func (m *awsAwsjson11_serializeOpCreateHumanTaskUi) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1118,7 +1303,15 @@ func (m *awsAwsjson11_serializeOpCreateHyperParameterTuningJob) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1165,7 +1358,15 @@ func (m *awsAwsjson11_serializeOpCreateImage) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1212,7 +1413,15 @@ func (m *awsAwsjson11_serializeOpCreateImageVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1259,7 +1468,15 @@ func (m *awsAwsjson11_serializeOpCreateLabelingJob) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1306,7 +1523,15 @@ func (m *awsAwsjson11_serializeOpCreateModel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1353,7 +1578,15 @@ func (m *awsAwsjson11_serializeOpCreateModelBiasJobDefinition) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1400,7 +1633,15 @@ func (m *awsAwsjson11_serializeOpCreateModelExplainabilityJobDefinition) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1447,7 +1688,15 @@ func (m *awsAwsjson11_serializeOpCreateModelPackage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1494,7 +1743,15 @@ func (m *awsAwsjson11_serializeOpCreateModelPackageGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1541,7 +1798,15 @@ func (m *awsAwsjson11_serializeOpCreateModelQualityJobDefinition) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1588,7 +1853,15 @@ func (m *awsAwsjson11_serializeOpCreateMonitoringSchedule) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1635,7 +1908,15 @@ func (m *awsAwsjson11_serializeOpCreateNotebookInstance) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1682,7 +1963,15 @@ func (m *awsAwsjson11_serializeOpCreateNotebookInstanceLifecycleConfig) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1729,7 +2018,15 @@ func (m *awsAwsjson11_serializeOpCreatePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1776,7 +2073,15 @@ func (m *awsAwsjson11_serializeOpCreatePresignedDomainUrl) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1823,7 +2128,15 @@ func (m *awsAwsjson11_serializeOpCreatePresignedNotebookInstanceUrl) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1870,7 +2183,15 @@ func (m *awsAwsjson11_serializeOpCreateProcessingJob) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1917,7 +2238,15 @@ func (m *awsAwsjson11_serializeOpCreateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1964,7 +2293,15 @@ func (m *awsAwsjson11_serializeOpCreateStudioLifecycleConfig) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2011,7 +2348,15 @@ func (m *awsAwsjson11_serializeOpCreateTrainingJob) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2058,7 +2403,15 @@ func (m *awsAwsjson11_serializeOpCreateTransformJob) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2105,7 +2458,15 @@ func (m *awsAwsjson11_serializeOpCreateTrial) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2152,7 +2513,15 @@ func (m *awsAwsjson11_serializeOpCreateTrialComponent) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2199,7 +2568,15 @@ func (m *awsAwsjson11_serializeOpCreateUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2246,7 +2623,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkforce) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2293,7 +2678,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkteam) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2340,7 +2733,15 @@ func (m *awsAwsjson11_serializeOpDeleteAction) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2387,7 +2788,15 @@ func (m *awsAwsjson11_serializeOpDeleteAlgorithm) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2434,7 +2843,15 @@ func (m *awsAwsjson11_serializeOpDeleteApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2481,7 +2898,15 @@ func (m *awsAwsjson11_serializeOpDeleteAppImageConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2528,7 +2953,15 @@ func (m *awsAwsjson11_serializeOpDeleteArtifact) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2575,7 +3008,15 @@ func (m *awsAwsjson11_serializeOpDeleteAssociation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2622,7 +3063,15 @@ func (m *awsAwsjson11_serializeOpDeleteCodeRepository) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2669,7 +3118,15 @@ func (m *awsAwsjson11_serializeOpDeleteContext) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2716,7 +3173,15 @@ func (m *awsAwsjson11_serializeOpDeleteDataQualityJobDefinition) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2763,7 +3228,15 @@ func (m *awsAwsjson11_serializeOpDeleteDeviceFleet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2810,7 +3283,15 @@ func (m *awsAwsjson11_serializeOpDeleteDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2857,7 +3338,15 @@ func (m *awsAwsjson11_serializeOpDeleteEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2904,7 +3393,15 @@ func (m *awsAwsjson11_serializeOpDeleteEndpointConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2951,7 +3448,15 @@ func (m *awsAwsjson11_serializeOpDeleteExperiment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2998,7 +3503,15 @@ func (m *awsAwsjson11_serializeOpDeleteFeatureGroup) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3045,7 +3558,15 @@ func (m *awsAwsjson11_serializeOpDeleteFlowDefinition) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3092,7 +3613,15 @@ func (m *awsAwsjson11_serializeOpDeleteHumanTaskUi) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3139,7 +3668,15 @@ func (m *awsAwsjson11_serializeOpDeleteImage) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3186,7 +3723,15 @@ func (m *awsAwsjson11_serializeOpDeleteImageVersion) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3233,7 +3778,15 @@ func (m *awsAwsjson11_serializeOpDeleteModel) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3280,7 +3833,15 @@ func (m *awsAwsjson11_serializeOpDeleteModelBiasJobDefinition) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3327,7 +3888,15 @@ func (m *awsAwsjson11_serializeOpDeleteModelExplainabilityJobDefinition) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3374,7 +3943,15 @@ func (m *awsAwsjson11_serializeOpDeleteModelPackage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3421,7 +3998,15 @@ func (m *awsAwsjson11_serializeOpDeleteModelPackageGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3468,7 +4053,15 @@ func (m *awsAwsjson11_serializeOpDeleteModelPackageGroupPolicy) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3515,7 +4108,15 @@ func (m *awsAwsjson11_serializeOpDeleteModelQualityJobDefinition) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3562,7 +4163,15 @@ func (m *awsAwsjson11_serializeOpDeleteMonitoringSchedule) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3609,7 +4218,15 @@ func (m *awsAwsjson11_serializeOpDeleteNotebookInstance) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3656,7 +4273,15 @@ func (m *awsAwsjson11_serializeOpDeleteNotebookInstanceLifecycleConfig) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3703,7 +4328,15 @@ func (m *awsAwsjson11_serializeOpDeletePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3750,7 +4383,15 @@ func (m *awsAwsjson11_serializeOpDeleteProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3797,7 +4438,15 @@ func (m *awsAwsjson11_serializeOpDeleteStudioLifecycleConfig) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3844,7 +4493,15 @@ func (m *awsAwsjson11_serializeOpDeleteTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3891,7 +4548,15 @@ func (m *awsAwsjson11_serializeOpDeleteTrial) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3938,7 +4603,15 @@ func (m *awsAwsjson11_serializeOpDeleteTrialComponent) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3985,7 +4658,15 @@ func (m *awsAwsjson11_serializeOpDeleteUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4032,7 +4713,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkforce) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4079,7 +4768,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkteam) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4126,7 +4823,15 @@ func (m *awsAwsjson11_serializeOpDeregisterDevices) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4173,7 +4878,15 @@ func (m *awsAwsjson11_serializeOpDescribeAction) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4220,7 +4933,15 @@ func (m *awsAwsjson11_serializeOpDescribeAlgorithm) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4267,7 +4988,15 @@ func (m *awsAwsjson11_serializeOpDescribeApp) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4314,7 +5043,15 @@ func (m *awsAwsjson11_serializeOpDescribeAppImageConfig) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4361,7 +5098,15 @@ func (m *awsAwsjson11_serializeOpDescribeArtifact) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4408,7 +5153,15 @@ func (m *awsAwsjson11_serializeOpDescribeAutoMLJob) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4455,7 +5208,15 @@ func (m *awsAwsjson11_serializeOpDescribeCodeRepository) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4502,7 +5263,15 @@ func (m *awsAwsjson11_serializeOpDescribeCompilationJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4549,7 +5318,15 @@ func (m *awsAwsjson11_serializeOpDescribeContext) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4596,7 +5373,15 @@ func (m *awsAwsjson11_serializeOpDescribeDataQualityJobDefinition) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4643,7 +5428,15 @@ func (m *awsAwsjson11_serializeOpDescribeDevice) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4690,7 +5483,15 @@ func (m *awsAwsjson11_serializeOpDescribeDeviceFleet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4737,7 +5538,15 @@ func (m *awsAwsjson11_serializeOpDescribeDomain) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4784,7 +5593,15 @@ func (m *awsAwsjson11_serializeOpDescribeEdgePackagingJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4831,7 +5648,15 @@ func (m *awsAwsjson11_serializeOpDescribeEndpoint) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4878,7 +5703,15 @@ func (m *awsAwsjson11_serializeOpDescribeEndpointConfig) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4925,7 +5758,15 @@ func (m *awsAwsjson11_serializeOpDescribeExperiment) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4972,7 +5813,15 @@ func (m *awsAwsjson11_serializeOpDescribeFeatureGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5019,7 +5868,15 @@ func (m *awsAwsjson11_serializeOpDescribeFlowDefinition) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5066,7 +5923,15 @@ func (m *awsAwsjson11_serializeOpDescribeHumanTaskUi) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5113,7 +5978,15 @@ func (m *awsAwsjson11_serializeOpDescribeHyperParameterTuningJob) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5160,7 +6033,15 @@ func (m *awsAwsjson11_serializeOpDescribeImage) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5207,7 +6088,15 @@ func (m *awsAwsjson11_serializeOpDescribeImageVersion) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5254,7 +6143,15 @@ func (m *awsAwsjson11_serializeOpDescribeLabelingJob) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5301,7 +6198,15 @@ func (m *awsAwsjson11_serializeOpDescribeModel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5348,7 +6253,15 @@ func (m *awsAwsjson11_serializeOpDescribeModelBiasJobDefinition) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5395,7 +6308,15 @@ func (m *awsAwsjson11_serializeOpDescribeModelExplainabilityJobDefinition) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5442,7 +6363,15 @@ func (m *awsAwsjson11_serializeOpDescribeModelPackage) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5489,7 +6418,15 @@ func (m *awsAwsjson11_serializeOpDescribeModelPackageGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5536,7 +6473,15 @@ func (m *awsAwsjson11_serializeOpDescribeModelQualityJobDefinition) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5583,7 +6528,15 @@ func (m *awsAwsjson11_serializeOpDescribeMonitoringSchedule) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5630,7 +6583,15 @@ func (m *awsAwsjson11_serializeOpDescribeNotebookInstance) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5677,7 +6638,15 @@ func (m *awsAwsjson11_serializeOpDescribeNotebookInstanceLifecycleConfig) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5724,7 +6693,15 @@ func (m *awsAwsjson11_serializeOpDescribePipeline) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5771,7 +6748,15 @@ func (m *awsAwsjson11_serializeOpDescribePipelineDefinitionForExecution) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5818,7 +6803,15 @@ func (m *awsAwsjson11_serializeOpDescribePipelineExecution) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5865,7 +6858,15 @@ func (m *awsAwsjson11_serializeOpDescribeProcessingJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5912,7 +6913,15 @@ func (m *awsAwsjson11_serializeOpDescribeProject) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5959,7 +6968,15 @@ func (m *awsAwsjson11_serializeOpDescribeStudioLifecycleConfig) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6006,7 +7023,15 @@ func (m *awsAwsjson11_serializeOpDescribeSubscribedWorkteam) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6053,7 +7078,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrainingJob) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6100,7 +7133,15 @@ func (m *awsAwsjson11_serializeOpDescribeTransformJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6147,7 +7188,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrial) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6194,7 +7243,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrialComponent) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6241,7 +7298,15 @@ func (m *awsAwsjson11_serializeOpDescribeUserProfile) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6288,7 +7353,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkforce) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6335,7 +7408,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkteam) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6382,7 +7463,15 @@ func (m *awsAwsjson11_serializeOpDisableSagemakerServicecatalogPortfolio) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6429,7 +7518,15 @@ func (m *awsAwsjson11_serializeOpDisassociateTrialComponent) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6476,7 +7573,15 @@ func (m *awsAwsjson11_serializeOpEnableSagemakerServicecatalogPortfolio) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6523,7 +7628,15 @@ func (m *awsAwsjson11_serializeOpGetDeviceFleetReport) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6570,7 +7683,15 @@ func (m *awsAwsjson11_serializeOpGetModelPackageGroupPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6617,7 +7738,15 @@ func (m *awsAwsjson11_serializeOpGetSagemakerServicecatalogPortfolioStatus) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6664,7 +7793,15 @@ func (m *awsAwsjson11_serializeOpGetSearchSuggestions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6711,7 +7848,15 @@ func (m *awsAwsjson11_serializeOpListActions) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6758,7 +7903,15 @@ func (m *awsAwsjson11_serializeOpListAlgorithms) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6805,7 +7958,15 @@ func (m *awsAwsjson11_serializeOpListAppImageConfigs) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6852,7 +8013,15 @@ func (m *awsAwsjson11_serializeOpListApps) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6899,7 +8068,15 @@ func (m *awsAwsjson11_serializeOpListArtifacts) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6946,7 +8123,15 @@ func (m *awsAwsjson11_serializeOpListAssociations) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6993,7 +8178,15 @@ func (m *awsAwsjson11_serializeOpListAutoMLJobs) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7040,7 +8233,15 @@ func (m *awsAwsjson11_serializeOpListCandidatesForAutoMLJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7087,7 +8288,15 @@ func (m *awsAwsjson11_serializeOpListCodeRepositories) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7134,7 +8343,15 @@ func (m *awsAwsjson11_serializeOpListCompilationJobs) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7181,7 +8398,15 @@ func (m *awsAwsjson11_serializeOpListContexts) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7228,7 +8453,15 @@ func (m *awsAwsjson11_serializeOpListDataQualityJobDefinitions) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7275,7 +8508,15 @@ func (m *awsAwsjson11_serializeOpListDeviceFleets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7322,7 +8563,15 @@ func (m *awsAwsjson11_serializeOpListDevices) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7369,7 +8618,15 @@ func (m *awsAwsjson11_serializeOpListDomains) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7416,7 +8673,15 @@ func (m *awsAwsjson11_serializeOpListEdgePackagingJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7463,7 +8728,15 @@ func (m *awsAwsjson11_serializeOpListEndpointConfigs) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7510,7 +8783,15 @@ func (m *awsAwsjson11_serializeOpListEndpoints) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7557,7 +8838,15 @@ func (m *awsAwsjson11_serializeOpListExperiments) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7604,7 +8893,15 @@ func (m *awsAwsjson11_serializeOpListFeatureGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7651,7 +8948,15 @@ func (m *awsAwsjson11_serializeOpListFlowDefinitions) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7698,7 +9003,15 @@ func (m *awsAwsjson11_serializeOpListHumanTaskUis) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7745,7 +9058,15 @@ func (m *awsAwsjson11_serializeOpListHyperParameterTuningJobs) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7792,7 +9113,15 @@ func (m *awsAwsjson11_serializeOpListImages) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7839,7 +9168,15 @@ func (m *awsAwsjson11_serializeOpListImageVersions) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7886,7 +9223,15 @@ func (m *awsAwsjson11_serializeOpListLabelingJobs) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7933,7 +9278,15 @@ func (m *awsAwsjson11_serializeOpListLabelingJobsForWorkteam) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -7980,7 +9333,15 @@ func (m *awsAwsjson11_serializeOpListModelBiasJobDefinitions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8027,7 +9388,15 @@ func (m *awsAwsjson11_serializeOpListModelExplainabilityJobDefinitions) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8074,7 +9443,15 @@ func (m *awsAwsjson11_serializeOpListModelPackageGroups) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8121,7 +9498,15 @@ func (m *awsAwsjson11_serializeOpListModelPackages) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8168,7 +9553,15 @@ func (m *awsAwsjson11_serializeOpListModelQualityJobDefinitions) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8215,7 +9608,15 @@ func (m *awsAwsjson11_serializeOpListModels) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8262,7 +9663,15 @@ func (m *awsAwsjson11_serializeOpListMonitoringExecutions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8309,7 +9718,15 @@ func (m *awsAwsjson11_serializeOpListMonitoringSchedules) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8356,7 +9773,15 @@ func (m *awsAwsjson11_serializeOpListNotebookInstanceLifecycleConfigs) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8403,7 +9828,15 @@ func (m *awsAwsjson11_serializeOpListNotebookInstances) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8450,7 +9883,15 @@ func (m *awsAwsjson11_serializeOpListPipelineExecutions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8497,7 +9938,15 @@ func (m *awsAwsjson11_serializeOpListPipelineExecutionSteps) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8544,7 +9993,15 @@ func (m *awsAwsjson11_serializeOpListPipelineParametersForExecution) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8591,7 +10048,15 @@ func (m *awsAwsjson11_serializeOpListPipelines) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8638,7 +10103,15 @@ func (m *awsAwsjson11_serializeOpListProcessingJobs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8685,7 +10158,15 @@ func (m *awsAwsjson11_serializeOpListProjects) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8732,7 +10213,15 @@ func (m *awsAwsjson11_serializeOpListStudioLifecycleConfigs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8779,7 +10268,15 @@ func (m *awsAwsjson11_serializeOpListSubscribedWorkteams) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8826,7 +10323,15 @@ func (m *awsAwsjson11_serializeOpListTags) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8873,7 +10378,15 @@ func (m *awsAwsjson11_serializeOpListTrainingJobs) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8920,7 +10433,15 @@ func (m *awsAwsjson11_serializeOpListTrainingJobsForHyperParameterTuningJob) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -8967,7 +10488,15 @@ func (m *awsAwsjson11_serializeOpListTransformJobs) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9014,7 +10543,15 @@ func (m *awsAwsjson11_serializeOpListTrialComponents) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9061,7 +10598,15 @@ func (m *awsAwsjson11_serializeOpListTrials) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9108,7 +10653,15 @@ func (m *awsAwsjson11_serializeOpListUserProfiles) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9155,7 +10708,15 @@ func (m *awsAwsjson11_serializeOpListWorkforces) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9202,7 +10763,15 @@ func (m *awsAwsjson11_serializeOpListWorkteams) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9249,7 +10818,15 @@ func (m *awsAwsjson11_serializeOpPutModelPackageGroupPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9296,7 +10873,15 @@ func (m *awsAwsjson11_serializeOpRegisterDevices) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9343,7 +10928,15 @@ func (m *awsAwsjson11_serializeOpRenderUiTemplate) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9390,7 +10983,15 @@ func (m *awsAwsjson11_serializeOpRetryPipelineExecution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9437,7 +11038,15 @@ func (m *awsAwsjson11_serializeOpSearch) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9484,7 +11093,15 @@ func (m *awsAwsjson11_serializeOpSendPipelineExecutionStepFailure) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9531,7 +11148,15 @@ func (m *awsAwsjson11_serializeOpSendPipelineExecutionStepSuccess) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9578,7 +11203,15 @@ func (m *awsAwsjson11_serializeOpStartMonitoringSchedule) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9625,7 +11258,15 @@ func (m *awsAwsjson11_serializeOpStartNotebookInstance) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9672,7 +11313,15 @@ func (m *awsAwsjson11_serializeOpStartPipelineExecution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9719,7 +11368,15 @@ func (m *awsAwsjson11_serializeOpStopAutoMLJob) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9766,7 +11423,15 @@ func (m *awsAwsjson11_serializeOpStopCompilationJob) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9813,7 +11478,15 @@ func (m *awsAwsjson11_serializeOpStopEdgePackagingJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9860,7 +11533,15 @@ func (m *awsAwsjson11_serializeOpStopHyperParameterTuningJob) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9907,7 +11588,15 @@ func (m *awsAwsjson11_serializeOpStopLabelingJob) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -9954,7 +11643,15 @@ func (m *awsAwsjson11_serializeOpStopMonitoringSchedule) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10001,7 +11698,15 @@ func (m *awsAwsjson11_serializeOpStopNotebookInstance) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10048,7 +11753,15 @@ func (m *awsAwsjson11_serializeOpStopPipelineExecution) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10095,7 +11808,15 @@ func (m *awsAwsjson11_serializeOpStopProcessingJob) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10142,7 +11863,15 @@ func (m *awsAwsjson11_serializeOpStopTrainingJob) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10189,7 +11918,15 @@ func (m *awsAwsjson11_serializeOpStopTransformJob) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10236,7 +11973,15 @@ func (m *awsAwsjson11_serializeOpUpdateAction) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10283,7 +12028,15 @@ func (m *awsAwsjson11_serializeOpUpdateAppImageConfig) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10330,7 +12083,15 @@ func (m *awsAwsjson11_serializeOpUpdateArtifact) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10377,7 +12138,15 @@ func (m *awsAwsjson11_serializeOpUpdateCodeRepository) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10424,7 +12193,15 @@ func (m *awsAwsjson11_serializeOpUpdateContext) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10471,7 +12248,15 @@ func (m *awsAwsjson11_serializeOpUpdateDeviceFleet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10518,7 +12303,15 @@ func (m *awsAwsjson11_serializeOpUpdateDevices) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10565,7 +12358,15 @@ func (m *awsAwsjson11_serializeOpUpdateDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10612,7 +12413,15 @@ func (m *awsAwsjson11_serializeOpUpdateEndpoint) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10659,7 +12468,15 @@ func (m *awsAwsjson11_serializeOpUpdateEndpointWeightsAndCapacities) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10706,7 +12523,15 @@ func (m *awsAwsjson11_serializeOpUpdateExperiment) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10753,7 +12578,15 @@ func (m *awsAwsjson11_serializeOpUpdateImage) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10800,7 +12633,15 @@ func (m *awsAwsjson11_serializeOpUpdateModelPackage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10847,7 +12688,15 @@ func (m *awsAwsjson11_serializeOpUpdateMonitoringSchedule) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10894,7 +12743,15 @@ func (m *awsAwsjson11_serializeOpUpdateNotebookInstance) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10941,7 +12798,15 @@ func (m *awsAwsjson11_serializeOpUpdateNotebookInstanceLifecycleConfig) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -10988,7 +12853,15 @@ func (m *awsAwsjson11_serializeOpUpdatePipeline) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11035,7 +12908,15 @@ func (m *awsAwsjson11_serializeOpUpdatePipelineExecution) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11082,7 +12963,15 @@ func (m *awsAwsjson11_serializeOpUpdateProject) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11129,7 +13018,15 @@ func (m *awsAwsjson11_serializeOpUpdateTrainingJob) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11176,7 +13073,15 @@ func (m *awsAwsjson11_serializeOpUpdateTrial) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11223,7 +13128,15 @@ func (m *awsAwsjson11_serializeOpUpdateTrialComponent) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11270,7 +13183,15 @@ func (m *awsAwsjson11_serializeOpUpdateUserProfile) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11317,7 +13238,15 @@ func (m *awsAwsjson11_serializeOpUpdateWorkforce) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -11364,7 +13293,15 @@ func (m *awsAwsjson11_serializeOpUpdateWorkteam) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/secretsmanager/serializers.go b/service/secretsmanager/serializers.go index 581c16b5f33..b583e1de17b 100644 --- a/service/secretsmanager/serializers.go +++ b/service/secretsmanager/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCancelRotateSecret struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCancelRotateSecret) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateSecret) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDeleteSecret) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDescribeSecret) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpGetRandomPassword) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpGetResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpGetSecretValue) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpListSecrets) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpListSecretVersionIds) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpPutSecretValue) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpRemoveRegionsFromReplication) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpReplicateSecretToRegions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpRestoreSecret) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpRotateSecret) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpStopReplicationToReplica) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpUpdateSecret) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpUpdateSecretVersionStage) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpValidateResourcePolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/servicecatalog/serializers.go b/service/servicecatalog/serializers.go index ebb800fd653..f6bc46723da 100644 --- a/service/servicecatalog/serializers.go +++ b/service/servicecatalog/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAcceptPortfolioShare struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAcceptPortfolioShare) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAssociateBudgetWithResource) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpAssociatePrincipalWithPortfolio) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpAssociateProductWithPortfolio) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpAssociateServiceActionWithProvisioningArtifact) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpAssociateTagOptionWithResource) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpBatchAssociateServiceActionWithProvisioningArti return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpBatchDisassociateServiceActionFromProvisioningA return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCopyProduct) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateConstraint) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpCreatePortfolio) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpCreatePortfolioShare) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpCreateProduct) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpCreateProvisionedProductPlan) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpCreateProvisioningArtifact) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpCreateServiceAction) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpCreateTagOption) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDeleteConstraint) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDeletePortfolio) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDeletePortfolioShare) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDeleteProduct) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDeleteProvisionedProductPlan) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDeleteProvisioningArtifact) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpDeleteServiceAction) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpDeleteTagOption) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpDescribeConstraint) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpDescribeCopyProductStatus) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpDescribePortfolio) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpDescribePortfolioShares) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpDescribePortfolioShareStatus) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpDescribeProduct) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpDescribeProductAsAdmin) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpDescribeProductView) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpDescribeProvisionedProduct) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpDescribeProvisionedProductPlan) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpDescribeProvisioningArtifact) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpDescribeProvisioningParameters) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpDescribeRecord) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpDescribeServiceAction) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpDescribeServiceActionExecutionParameters) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpDescribeTagOption) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpDisableAWSOrganizationsAccess) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpDisassociateBudgetFromResource) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpDisassociatePrincipalFromPortfolio) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpDisassociateProductFromPortfolio) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpDisassociateServiceActionFromProvisioningArtifa return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpDisassociateTagOptionFromResource) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpEnableAWSOrganizationsAccess) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpExecuteProvisionedProductPlan) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpExecuteProvisionedProductServiceAction) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpGetAWSOrganizationsAccessStatus) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpGetProvisionedProductOutputs) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpImportAsProvisionedProduct) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpListAcceptedPortfolioShares) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpListBudgetsForResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpListConstraintsForPortfolio) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpListLaunchPaths) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpListOrganizationPortfolioAccess) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpListPortfolioAccess) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpListPortfolios) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpListPortfoliosForProduct) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpListPrincipalsForPortfolio) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpListProvisionedProductPlans) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2996,7 +3501,15 @@ func (m *awsAwsjson11_serializeOpListProvisioningArtifacts) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3043,7 +3556,15 @@ func (m *awsAwsjson11_serializeOpListProvisioningArtifactsForServiceAction) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3090,7 +3611,15 @@ func (m *awsAwsjson11_serializeOpListRecordHistory) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3137,7 +3666,15 @@ func (m *awsAwsjson11_serializeOpListResourcesForTagOption) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3184,7 +3721,15 @@ func (m *awsAwsjson11_serializeOpListServiceActions) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3231,7 +3776,15 @@ func (m *awsAwsjson11_serializeOpListServiceActionsForProvisioningArtifact) Hand return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3278,7 +3831,15 @@ func (m *awsAwsjson11_serializeOpListStackInstancesForProvisionedProduct) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3325,7 +3886,15 @@ func (m *awsAwsjson11_serializeOpListTagOptions) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3372,7 +3941,15 @@ func (m *awsAwsjson11_serializeOpProvisionProduct) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3419,7 +3996,15 @@ func (m *awsAwsjson11_serializeOpRejectPortfolioShare) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3466,7 +4051,15 @@ func (m *awsAwsjson11_serializeOpScanProvisionedProducts) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3513,7 +4106,15 @@ func (m *awsAwsjson11_serializeOpSearchProducts) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3560,7 +4161,15 @@ func (m *awsAwsjson11_serializeOpSearchProductsAsAdmin) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3607,7 +4216,15 @@ func (m *awsAwsjson11_serializeOpSearchProvisionedProducts) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3654,7 +4271,15 @@ func (m *awsAwsjson11_serializeOpTerminateProvisionedProduct) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3701,7 +4326,15 @@ func (m *awsAwsjson11_serializeOpUpdateConstraint) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3748,7 +4381,15 @@ func (m *awsAwsjson11_serializeOpUpdatePortfolio) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3795,7 +4436,15 @@ func (m *awsAwsjson11_serializeOpUpdatePortfolioShare) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3842,7 +4491,15 @@ func (m *awsAwsjson11_serializeOpUpdateProduct) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3889,7 +4546,15 @@ func (m *awsAwsjson11_serializeOpUpdateProvisionedProduct) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3936,7 +4601,15 @@ func (m *awsAwsjson11_serializeOpUpdateProvisionedProductProperties) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3983,7 +4656,15 @@ func (m *awsAwsjson11_serializeOpUpdateProvisioningArtifact) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4030,7 +4711,15 @@ func (m *awsAwsjson11_serializeOpUpdateServiceAction) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4077,7 +4766,15 @@ func (m *awsAwsjson11_serializeOpUpdateTagOption) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/servicediscovery/serializers.go b/service/servicediscovery/serializers.go index 5683450e10d..f08e38fd691 100644 --- a/service/servicediscovery/serializers.go +++ b/service/servicediscovery/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateHttpNamespace struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateHttpNamespace) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreatePrivateDnsNamespace) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreatePublicDnsNamespace) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteNamespace) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDeregisterInstance) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDiscoverInstances) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpGetInstance) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpGetInstancesHealthStatus) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpGetNamespace) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpGetOperation) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpGetService) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpListInstances) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpListNamespaces) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpListOperations) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpListServices) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpRegisterInstance) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpUpdateHttpNamespace) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpUpdateInstanceCustomHealthStatus) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpUpdatePrivateDnsNamespace) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpUpdatePublicDnsNamespace) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpUpdateService) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/servicequotas/serializers.go b/service/servicequotas/serializers.go index e982ed0ee5f..5bb538d13f9 100644 --- a/service/servicequotas/serializers.go +++ b/service/servicequotas/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" "math" + "path" ) type awsAwsjson11_serializeOpAssociateServiceQuotaTemplate struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateServiceQuotaTemplate) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpDeleteServiceQuotaIncreaseRequestFromTemplate) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDisassociateServiceQuotaTemplate) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpGetAssociationForServiceQuotaTemplate) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpGetAWSDefaultServiceQuota) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpGetRequestedServiceQuotaChange) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpGetServiceQuota) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpGetServiceQuotaIncreaseRequestFromTemplate) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpListAWSDefaultServiceQuotas) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpListRequestedServiceQuotaChangeHistory) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpListRequestedServiceQuotaChangeHistoryByQuota) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpListServiceQuotaIncreaseRequestsInTemplate) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpListServiceQuotas) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpListServices) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpPutServiceQuotaIncreaseRequestIntoTemplate) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpRequestServiceQuotaIncrease) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ses/serializers.go b/service/ses/serializers.go index a985dc6663f..0ff4ca53e5b 100644 --- a/service/ses/serializers.go +++ b/service/ses/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpCloneReceiptRuleSet struct { @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpCloneReceiptRuleSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpCreateConfigurationSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpCreateConfigurationSetEventDestination) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpCreateConfigurationSetTrackingOptions) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpCreateCustomVerificationEmailTemplate) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCreateReceiptFilter) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpCreateReceiptRule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpCreateReceiptRuleSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpCreateTemplate) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpDeleteConfigurationSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpDeleteConfigurationSetEventDestination) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpDeleteConfigurationSetTrackingOptions) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpDeleteCustomVerificationEmailTemplate) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpDeleteIdentity) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpDeleteIdentityPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpDeleteReceiptFilter) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpDeleteReceiptRule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpDeleteReceiptRuleSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpDeleteTemplate) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpDeleteVerifiedEmailAddress) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1156,7 +1317,15 @@ func (m *awsAwsquery_serializeOpDescribeActiveReceiptRuleSet) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1208,7 +1377,15 @@ func (m *awsAwsquery_serializeOpDescribeConfigurationSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1264,7 +1441,15 @@ func (m *awsAwsquery_serializeOpDescribeReceiptRule) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1320,7 +1505,15 @@ func (m *awsAwsquery_serializeOpDescribeReceiptRuleSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1376,7 +1569,15 @@ func (m *awsAwsquery_serializeOpGetAccountSendingEnabled) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1428,7 +1629,15 @@ func (m *awsAwsquery_serializeOpGetCustomVerificationEmailTemplate) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1484,7 +1693,15 @@ func (m *awsAwsquery_serializeOpGetIdentityDkimAttributes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1757,15 @@ func (m *awsAwsquery_serializeOpGetIdentityMailFromDomainAttributes) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1596,7 +1821,15 @@ func (m *awsAwsquery_serializeOpGetIdentityNotificationAttributes) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1652,7 +1885,15 @@ func (m *awsAwsquery_serializeOpGetIdentityPolicies) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1708,7 +1949,15 @@ func (m *awsAwsquery_serializeOpGetIdentityVerificationAttributes) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1764,7 +2013,15 @@ func (m *awsAwsquery_serializeOpGetSendQuota) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1816,7 +2073,15 @@ func (m *awsAwsquery_serializeOpGetSendStatistics) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2133,15 @@ func (m *awsAwsquery_serializeOpGetTemplate) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1924,7 +2197,15 @@ func (m *awsAwsquery_serializeOpListConfigurationSets) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1980,7 +2261,15 @@ func (m *awsAwsquery_serializeOpListCustomVerificationEmailTemplates) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2036,7 +2325,15 @@ func (m *awsAwsquery_serializeOpListIdentities) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2092,7 +2389,15 @@ func (m *awsAwsquery_serializeOpListIdentityPolicies) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2148,7 +2453,15 @@ func (m *awsAwsquery_serializeOpListReceiptFilters) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2200,7 +2513,15 @@ func (m *awsAwsquery_serializeOpListReceiptRuleSets) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2256,7 +2577,15 @@ func (m *awsAwsquery_serializeOpListTemplates) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2312,7 +2641,15 @@ func (m *awsAwsquery_serializeOpListVerifiedEmailAddresses) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2364,7 +2701,15 @@ func (m *awsAwsquery_serializeOpPutConfigurationSetDeliveryOptions) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2420,7 +2765,15 @@ func (m *awsAwsquery_serializeOpPutIdentityPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2476,7 +2829,15 @@ func (m *awsAwsquery_serializeOpReorderReceiptRuleSet) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2532,7 +2893,15 @@ func (m *awsAwsquery_serializeOpSendBounce) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2588,7 +2957,15 @@ func (m *awsAwsquery_serializeOpSendBulkTemplatedEmail) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2644,7 +3021,15 @@ func (m *awsAwsquery_serializeOpSendCustomVerificationEmail) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2700,7 +3085,15 @@ func (m *awsAwsquery_serializeOpSendEmail) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2756,7 +3149,15 @@ func (m *awsAwsquery_serializeOpSendRawEmail) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2812,7 +3213,15 @@ func (m *awsAwsquery_serializeOpSendTemplatedEmail) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2868,7 +3277,15 @@ func (m *awsAwsquery_serializeOpSetActiveReceiptRuleSet) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2924,7 +3341,15 @@ func (m *awsAwsquery_serializeOpSetIdentityDkimEnabled) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2980,7 +3405,15 @@ func (m *awsAwsquery_serializeOpSetIdentityFeedbackForwardingEnabled) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3036,7 +3469,15 @@ func (m *awsAwsquery_serializeOpSetIdentityHeadersInNotificationsEnabled) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3092,7 +3533,15 @@ func (m *awsAwsquery_serializeOpSetIdentityMailFromDomain) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3148,7 +3597,15 @@ func (m *awsAwsquery_serializeOpSetIdentityNotificationTopic) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3204,7 +3661,15 @@ func (m *awsAwsquery_serializeOpSetReceiptRulePosition) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3260,7 +3725,15 @@ func (m *awsAwsquery_serializeOpTestRenderTemplate) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3316,7 +3789,15 @@ func (m *awsAwsquery_serializeOpUpdateAccountSendingEnabled) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3372,7 +3853,15 @@ func (m *awsAwsquery_serializeOpUpdateConfigurationSetEventDestination) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3428,7 +3917,15 @@ func (m *awsAwsquery_serializeOpUpdateConfigurationSetReputationMetricsEnabled) return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3484,7 +3981,15 @@ func (m *awsAwsquery_serializeOpUpdateConfigurationSetSendingEnabled) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3540,7 +4045,15 @@ func (m *awsAwsquery_serializeOpUpdateConfigurationSetTrackingOptions) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3596,7 +4109,15 @@ func (m *awsAwsquery_serializeOpUpdateCustomVerificationEmailTemplate) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3652,7 +4173,15 @@ func (m *awsAwsquery_serializeOpUpdateReceiptRule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3708,7 +4237,15 @@ func (m *awsAwsquery_serializeOpUpdateTemplate) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3764,7 +4301,15 @@ func (m *awsAwsquery_serializeOpVerifyDomainDkim) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3820,7 +4365,15 @@ func (m *awsAwsquery_serializeOpVerifyDomainIdentity) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3876,7 +4429,15 @@ func (m *awsAwsquery_serializeOpVerifyEmailAddress) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3932,7 +4493,15 @@ func (m *awsAwsquery_serializeOpVerifyEmailIdentity) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/sfn/serializers.go b/service/sfn/serializers.go index 9d15f6aecf7..3744e51c22e 100644 --- a/service/sfn/serializers.go +++ b/service/sfn/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCreateActivity struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpCreateActivity) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpCreateStateMachine) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpDeleteActivity) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpDeleteStateMachine) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpDescribeActivity) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpDescribeExecution) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpDescribeStateMachine) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpDescribeStateMachineForExecution) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson10_serializeOpGetActivityTask) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson10_serializeOpGetExecutionHistory) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson10_serializeOpListActivities) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson10_serializeOpListExecutions) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson10_serializeOpListStateMachines) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson10_serializeOpSendTaskFailure) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson10_serializeOpSendTaskHeartbeat) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson10_serializeOpSendTaskSuccess) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson10_serializeOpStartExecution) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson10_serializeOpStartSyncExecution) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson10_serializeOpStopExecution) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson10_serializeOpUpdateStateMachine) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/shield/serializers.go b/service/shield/serializers.go index c9c330aa12c..2b280ec1acb 100644 --- a/service/shield/serializers.go +++ b/service/shield/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateDRTLogBucket struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateDRTLogBucket) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAssociateDRTRole) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpAssociateHealthCheck) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpAssociateProactiveEngagementDetails) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateProtection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateProtectionGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateSubscription) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteProtection) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteProtectionGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeleteSubscription) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDescribeAttack) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDescribeAttackStatistics) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDescribeDRTAccess) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDescribeEmergencyContactSettings) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDescribeProtection) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDescribeProtectionGroup) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDescribeSubscription) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDisableProactiveEngagement) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDisassociateDRTLogBucket) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDisassociateDRTRole) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDisassociateHealthCheck) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpEnableProactiveEngagement) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpGetSubscriptionState) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpListAttacks) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpListProtectionGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListProtections) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListResourcesInProtectionGroup) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpUpdateEmergencyContactSettings) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpUpdateProtectionGroup) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpUpdateSubscription) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/sms/serializers.go b/service/sms/serializers.go index a04a74ad3eb..450fc1c87f8 100644 --- a/service/sms/serializers.go +++ b/service/sms/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateApp struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateReplicationJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDeleteApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDeleteAppLaunchConfiguration) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeleteAppReplicationConfiguration) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeleteAppValidationConfiguration) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteReplicationJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteServerCatalog) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDisassociateConnector) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpGenerateChangeSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpGenerateTemplate) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpGetApp) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpGetAppLaunchConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpGetAppReplicationConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpGetAppValidationConfiguration) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpGetAppValidationOutput) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpGetConnectors) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpGetReplicationJobs) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpGetReplicationRuns) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGetServers) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpImportAppCatalog) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpImportServerCatalog) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpLaunchApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpListApps) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpNotifyAppValidationOutput) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpPutAppLaunchConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpPutAppReplicationConfiguration) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpPutAppValidationConfiguration) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpStartAppReplication) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpStartOnDemandAppReplication) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpStartOnDemandReplicationRun) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpStopAppReplication) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpTerminateApp) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpUpdateApp) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpUpdateReplicationJob) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/snowball/serializers.go b/service/snowball/serializers.go index ccc9264c49e..a6dd1049672 100644 --- a/service/snowball/serializers.go +++ b/service/snowball/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCancelCluster struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCancelCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCancelJob) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateAddress) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateJob) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateLongTermPricing) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateReturnShippingLabel) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDescribeAddress) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDescribeAddresses) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeCluster) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDescribeJob) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDescribeReturnShippingLabel) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpGetJobManifest) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpGetJobUnlockCode) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpGetSnowballUsage) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpGetSoftwareUpdates) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpListClusterJobs) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpListClusters) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpListCompatibleImages) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpListJobs) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpListLongTermPricing) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpUpdateCluster) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpUpdateJob) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpUpdateJobShipmentState) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpUpdateLongTermPricing) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/sns/serializers.go b/service/sns/serializers.go index e3afe344a9b..aa86588e63e 100644 --- a/service/sns/serializers.go +++ b/service/sns/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "sort" ) @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAddPermission) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpCheckIfPhoneNumberIsOptedOut) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpConfirmSubscription) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpCreatePlatformApplication) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpCreatePlatformEndpoint) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpCreateSMSSandboxPhoneNumber) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpCreateTopic) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpDeleteEndpoint) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpDeletePlatformApplication) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpDeleteSMSSandboxPhoneNumber) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpDeleteTopic) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpGetEndpointAttributes) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpGetPlatformApplicationAttributes) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpGetSMSAttributes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpGetSMSSandboxAccountStatus) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -872,7 +993,15 @@ func (m *awsAwsquery_serializeOpGetSubscriptionAttributes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1057,15 @@ func (m *awsAwsquery_serializeOpGetTopicAttributes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -984,7 +1121,15 @@ func (m *awsAwsquery_serializeOpListEndpointsByPlatformApplication) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1040,7 +1185,15 @@ func (m *awsAwsquery_serializeOpListOriginationNumbers) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1096,7 +1249,15 @@ func (m *awsAwsquery_serializeOpListPhoneNumbersOptedOut) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1152,7 +1313,15 @@ func (m *awsAwsquery_serializeOpListPlatformApplications) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1208,7 +1377,15 @@ func (m *awsAwsquery_serializeOpListSMSSandboxPhoneNumbers) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1264,7 +1441,15 @@ func (m *awsAwsquery_serializeOpListSubscriptions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1320,7 +1505,15 @@ func (m *awsAwsquery_serializeOpListSubscriptionsByTopic) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1376,7 +1569,15 @@ func (m *awsAwsquery_serializeOpListTagsForResource) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1432,7 +1633,15 @@ func (m *awsAwsquery_serializeOpListTopics) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1488,7 +1697,15 @@ func (m *awsAwsquery_serializeOpOptInPhoneNumber) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1544,7 +1761,15 @@ func (m *awsAwsquery_serializeOpPublish) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1600,7 +1825,15 @@ func (m *awsAwsquery_serializeOpRemovePermission) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1656,7 +1889,15 @@ func (m *awsAwsquery_serializeOpSetEndpointAttributes) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1712,7 +1953,15 @@ func (m *awsAwsquery_serializeOpSetPlatformApplicationAttributes) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1768,7 +2017,15 @@ func (m *awsAwsquery_serializeOpSetSMSAttributes) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1824,7 +2081,15 @@ func (m *awsAwsquery_serializeOpSetSubscriptionAttributes) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1880,7 +2145,15 @@ func (m *awsAwsquery_serializeOpSetTopicAttributes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1936,7 +2209,15 @@ func (m *awsAwsquery_serializeOpSubscribe) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1992,7 +2273,15 @@ func (m *awsAwsquery_serializeOpTagResource) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2048,7 +2337,15 @@ func (m *awsAwsquery_serializeOpUnsubscribe) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2401,15 @@ func (m *awsAwsquery_serializeOpUntagResource) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2160,7 +2465,15 @@ func (m *awsAwsquery_serializeOpVerifySMSSandboxPhoneNumber) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/sqs/serializers.go b/service/sqs/serializers.go index 345e938e690..bf2c0979514 100644 --- a/service/sqs/serializers.go +++ b/service/sqs/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" "sort" ) @@ -36,7 +37,15 @@ func (m *awsAwsquery_serializeOpAddPermission) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -92,7 +101,15 @@ func (m *awsAwsquery_serializeOpChangeMessageVisibility) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -148,7 +165,15 @@ func (m *awsAwsquery_serializeOpChangeMessageVisibilityBatch) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -204,7 +229,15 @@ func (m *awsAwsquery_serializeOpCreateQueue) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -260,7 +293,15 @@ func (m *awsAwsquery_serializeOpDeleteMessage) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -316,7 +357,15 @@ func (m *awsAwsquery_serializeOpDeleteMessageBatch) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -372,7 +421,15 @@ func (m *awsAwsquery_serializeOpDeleteQueue) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -428,7 +485,15 @@ func (m *awsAwsquery_serializeOpGetQueueAttributes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -484,7 +549,15 @@ func (m *awsAwsquery_serializeOpGetQueueUrl) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -540,7 +613,15 @@ func (m *awsAwsquery_serializeOpListDeadLetterSourceQueues) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -596,7 +677,15 @@ func (m *awsAwsquery_serializeOpListQueues) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -652,7 +741,15 @@ func (m *awsAwsquery_serializeOpListQueueTags) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -708,7 +805,15 @@ func (m *awsAwsquery_serializeOpPurgeQueue) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -764,7 +869,15 @@ func (m *awsAwsquery_serializeOpReceiveMessage) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -820,7 +933,15 @@ func (m *awsAwsquery_serializeOpRemovePermission) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -876,7 +997,15 @@ func (m *awsAwsquery_serializeOpSendMessage) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -932,7 +1061,15 @@ func (m *awsAwsquery_serializeOpSendMessageBatch) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -988,7 +1125,15 @@ func (m *awsAwsquery_serializeOpSetQueueAttributes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1044,7 +1189,15 @@ func (m *awsAwsquery_serializeOpTagQueue) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1100,7 +1253,15 @@ func (m *awsAwsquery_serializeOpUntagQueue) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ssm/serializers.go b/service/ssm/serializers.go index e8e95b4ca7b..c392da6107a 100644 --- a/service/ssm/serializers.go +++ b/service/ssm/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddTagsToResource struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpAssociateOpsItemRelatedItem) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCancelCommand) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCancelMaintenanceWindowExecution) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateActivation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateAssociation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateAssociationBatch) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateDocument) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateMaintenanceWindow) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpCreateOpsItem) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpCreateOpsMetadata) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpCreatePatchBaseline) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpCreateResourceDataSync) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteActivation) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteAssociation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteDocument) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDeleteInventory) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDeleteMaintenanceWindow) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDeleteOpsMetadata) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDeleteParameter) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDeleteParameters) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDeletePatchBaseline) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDeleteResourceDataSync) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDeregisterManagedInstance) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDeregisterPatchBaselineForPatchGroup) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDeregisterTargetFromMaintenanceWindow) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDeregisterTaskFromMaintenanceWindow) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpDescribeActivations) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpDescribeAssociation) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpDescribeAssociationExecutions) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpDescribeAssociationExecutionTargets) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpDescribeAutomationExecutions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpDescribeAutomationStepExecutions) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpDescribeAvailablePatches) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpDescribeDocument) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpDescribeDocumentPermission) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpDescribeEffectiveInstanceAssociations) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpDescribeEffectivePatchesForPatchBaseline) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceAssociationsStatus) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceInformation) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatches) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatchStates) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstancePatchStatesForPatchGroup) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpDescribeInventoryDeletions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutions) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTaskInvocatio return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowExecutionTasks) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindows) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowSchedule) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowsForTarget) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTargets) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2433,7 +2842,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceWindowTasks) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2480,7 +2897,15 @@ func (m *awsAwsjson11_serializeOpDescribeOpsItems) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2527,7 +2952,15 @@ func (m *awsAwsjson11_serializeOpDescribeParameters) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2574,7 +3007,15 @@ func (m *awsAwsjson11_serializeOpDescribePatchBaselines) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2621,7 +3062,15 @@ func (m *awsAwsjson11_serializeOpDescribePatchGroups) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3117,15 @@ func (m *awsAwsjson11_serializeOpDescribePatchGroupState) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2715,7 +3172,15 @@ func (m *awsAwsjson11_serializeOpDescribePatchProperties) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2762,7 +3227,15 @@ func (m *awsAwsjson11_serializeOpDescribeSessions) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2809,7 +3282,15 @@ func (m *awsAwsjson11_serializeOpDisassociateOpsItemRelatedItem) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2856,7 +3337,15 @@ func (m *awsAwsjson11_serializeOpGetAutomationExecution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2903,7 +3392,15 @@ func (m *awsAwsjson11_serializeOpGetCalendarState) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2950,7 +3447,15 @@ func (m *awsAwsjson11_serializeOpGetCommandInvocation) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2997,7 +3502,15 @@ func (m *awsAwsjson11_serializeOpGetConnectionStatus) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3044,7 +3557,15 @@ func (m *awsAwsjson11_serializeOpGetDefaultPatchBaseline) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3091,7 +3612,15 @@ func (m *awsAwsjson11_serializeOpGetDeployablePatchSnapshotForInstance) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3138,7 +3667,15 @@ func (m *awsAwsjson11_serializeOpGetDocument) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3185,7 +3722,15 @@ func (m *awsAwsjson11_serializeOpGetInventory) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3232,7 +3777,15 @@ func (m *awsAwsjson11_serializeOpGetInventorySchema) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3279,7 +3832,15 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindow) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3326,7 +3887,15 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecution) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3373,7 +3942,15 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTask) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3420,7 +3997,15 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowExecutionTaskInvocation) Ha return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3467,7 +4052,15 @@ func (m *awsAwsjson11_serializeOpGetMaintenanceWindowTask) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3514,7 +4107,15 @@ func (m *awsAwsjson11_serializeOpGetOpsItem) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3561,7 +4162,15 @@ func (m *awsAwsjson11_serializeOpGetOpsMetadata) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3608,7 +4217,15 @@ func (m *awsAwsjson11_serializeOpGetOpsSummary) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3655,7 +4272,15 @@ func (m *awsAwsjson11_serializeOpGetParameter) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3702,7 +4327,15 @@ func (m *awsAwsjson11_serializeOpGetParameterHistory) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3749,7 +4382,15 @@ func (m *awsAwsjson11_serializeOpGetParameters) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3796,7 +4437,15 @@ func (m *awsAwsjson11_serializeOpGetParametersByPath) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3843,7 +4492,15 @@ func (m *awsAwsjson11_serializeOpGetPatchBaseline) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3890,7 +4547,15 @@ func (m *awsAwsjson11_serializeOpGetPatchBaselineForPatchGroup) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3937,7 +4602,15 @@ func (m *awsAwsjson11_serializeOpGetServiceSetting) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3984,7 +4657,15 @@ func (m *awsAwsjson11_serializeOpLabelParameterVersion) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4031,7 +4712,15 @@ func (m *awsAwsjson11_serializeOpListAssociations) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4078,7 +4767,15 @@ func (m *awsAwsjson11_serializeOpListAssociationVersions) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4125,7 +4822,15 @@ func (m *awsAwsjson11_serializeOpListCommandInvocations) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4172,7 +4877,15 @@ func (m *awsAwsjson11_serializeOpListCommands) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4219,7 +4932,15 @@ func (m *awsAwsjson11_serializeOpListComplianceItems) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4266,7 +4987,15 @@ func (m *awsAwsjson11_serializeOpListComplianceSummaries) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4313,7 +5042,15 @@ func (m *awsAwsjson11_serializeOpListDocumentMetadataHistory) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4360,7 +5097,15 @@ func (m *awsAwsjson11_serializeOpListDocuments) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4407,7 +5152,15 @@ func (m *awsAwsjson11_serializeOpListDocumentVersions) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4454,7 +5207,15 @@ func (m *awsAwsjson11_serializeOpListInventoryEntries) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4501,7 +5262,15 @@ func (m *awsAwsjson11_serializeOpListOpsItemEvents) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4548,7 +5317,15 @@ func (m *awsAwsjson11_serializeOpListOpsItemRelatedItems) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4595,7 +5372,15 @@ func (m *awsAwsjson11_serializeOpListOpsMetadata) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4642,7 +5427,15 @@ func (m *awsAwsjson11_serializeOpListResourceComplianceSummaries) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4689,7 +5482,15 @@ func (m *awsAwsjson11_serializeOpListResourceDataSync) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4736,7 +5537,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4783,7 +5592,15 @@ func (m *awsAwsjson11_serializeOpModifyDocumentPermission) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4830,7 +5647,15 @@ func (m *awsAwsjson11_serializeOpPutComplianceItems) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4877,7 +5702,15 @@ func (m *awsAwsjson11_serializeOpPutInventory) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4924,7 +5757,15 @@ func (m *awsAwsjson11_serializeOpPutParameter) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4971,7 +5812,15 @@ func (m *awsAwsjson11_serializeOpRegisterDefaultPatchBaseline) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5018,7 +5867,15 @@ func (m *awsAwsjson11_serializeOpRegisterPatchBaselineForPatchGroup) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5065,7 +5922,15 @@ func (m *awsAwsjson11_serializeOpRegisterTargetWithMaintenanceWindow) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5112,7 +5977,15 @@ func (m *awsAwsjson11_serializeOpRegisterTaskWithMaintenanceWindow) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5159,7 +6032,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5206,7 +6087,15 @@ func (m *awsAwsjson11_serializeOpResetServiceSetting) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5253,7 +6142,15 @@ func (m *awsAwsjson11_serializeOpResumeSession) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5300,7 +6197,15 @@ func (m *awsAwsjson11_serializeOpSendAutomationSignal) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5347,7 +6252,15 @@ func (m *awsAwsjson11_serializeOpSendCommand) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5394,7 +6307,15 @@ func (m *awsAwsjson11_serializeOpStartAssociationsOnce) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5441,7 +6362,15 @@ func (m *awsAwsjson11_serializeOpStartAutomationExecution) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5488,7 +6417,15 @@ func (m *awsAwsjson11_serializeOpStartChangeRequestExecution) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5535,7 +6472,15 @@ func (m *awsAwsjson11_serializeOpStartSession) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5582,7 +6527,15 @@ func (m *awsAwsjson11_serializeOpStopAutomationExecution) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5629,7 +6582,15 @@ func (m *awsAwsjson11_serializeOpTerminateSession) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5676,7 +6637,15 @@ func (m *awsAwsjson11_serializeOpUnlabelParameterVersion) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5723,7 +6692,15 @@ func (m *awsAwsjson11_serializeOpUpdateAssociation) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5770,7 +6747,15 @@ func (m *awsAwsjson11_serializeOpUpdateAssociationStatus) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5817,7 +6802,15 @@ func (m *awsAwsjson11_serializeOpUpdateDocument) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5864,7 +6857,15 @@ func (m *awsAwsjson11_serializeOpUpdateDocumentDefaultVersion) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5911,7 +6912,15 @@ func (m *awsAwsjson11_serializeOpUpdateDocumentMetadata) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -5958,7 +6967,15 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindow) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6005,7 +7022,15 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTarget) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6052,7 +7077,15 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceWindowTask) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6099,7 +7132,15 @@ func (m *awsAwsjson11_serializeOpUpdateManagedInstanceRole) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6146,7 +7187,15 @@ func (m *awsAwsjson11_serializeOpUpdateOpsItem) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6193,7 +7242,15 @@ func (m *awsAwsjson11_serializeOpUpdateOpsMetadata) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6240,7 +7297,15 @@ func (m *awsAwsjson11_serializeOpUpdatePatchBaseline) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6287,7 +7352,15 @@ func (m *awsAwsjson11_serializeOpUpdateResourceDataSync) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -6334,7 +7407,15 @@ func (m *awsAwsjson11_serializeOpUpdateServiceSetting) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ssmcontacts/serializers.go b/service/ssmcontacts/serializers.go index ba52ea38431..9423d0dbc75 100644 --- a/service/ssmcontacts/serializers.go +++ b/service/ssmcontacts/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAcceptPage struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAcceptPage) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpActivateContactChannel) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateContact) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateContactChannel) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpDeactivateContactChannel) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpDeleteContact) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteContactChannel) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDescribeEngagement) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDescribePage) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpGetContact) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpGetContactChannel) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpGetContactPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpListContactChannels) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpListContacts) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpListEngagements) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpListPageReceipts) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpListPagesByContact) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpListPagesByEngagement) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpPutContactPolicy) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpSendActivationCode) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpStartEngagement) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpStopEngagement) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpUpdateContact) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpUpdateContactChannel) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/ssoadmin/serializers.go b/service/ssoadmin/serializers.go index b16c6a614e4..1c18c93f310 100644 --- a/service/ssoadmin/serializers.go +++ b/service/ssoadmin/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAttachManagedPolicyToPermissionSet struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAttachManagedPolicyToPermissionSet) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateAccountAssignment) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateInstanceAccessControlAttributeConfigurati return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreatePermissionSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteAccountAssignment) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteInlinePolicyFromPermissionSet) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDeleteInstanceAccessControlAttributeConfigurati return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDeletePermissionSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccountAssignmentCreationStatus) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccountAssignmentDeletionStatus) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDescribeInstanceAccessControlAttributeConfigura return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDescribePermissionSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDescribePermissionSetProvisioningStatus) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDetachManagedPolicyFromPermissionSet) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpGetInlinePolicyForPermissionSet) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpListAccountAssignmentCreationStatus) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpListAccountAssignmentDeletionStatus) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpListAccountAssignments) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpListAccountsForProvisionedPermissionSet) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpListInstances) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpListManagedPoliciesInPermissionSet) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpListPermissionSetProvisioningStatus) HandleSeri return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpListPermissionSets) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpListPermissionSetsProvisionedToAccount) HandleS return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpProvisionPermissionSet) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpPutInlinePolicyToPermissionSet) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpUpdateInstanceAccessControlAttributeConfigurati return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpUpdatePermissionSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/storagegateway/serializers.go b/service/storagegateway/serializers.go index c03cb45c6ad..249d8542959 100644 --- a/service/storagegateway/serializers.go +++ b/service/storagegateway/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpActivateGateway struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpActivateGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAddCache) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpAddTagsToResource) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpAddUploadBuffer) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpAddWorkingStorage) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpAssignTapePool) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpAssociateFileSystem) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpAttachVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCancelArchival) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCancelRetrieval) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpCreateCachediSCSIVolume) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpCreateNFSFileShare) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpCreateSMBFileShare) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpCreateSnapshot) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpCreateSnapshotFromVolumeRecoveryPoint) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpCreateStorediSCSIVolume) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpCreateTapePool) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpCreateTapes) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpCreateTapeWithBarcode) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDeleteAutomaticTapeCreationPolicy) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDeleteBandwidthRateLimit) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDeleteChapCredentials) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDeleteFileShare) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpDeleteGateway) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpDeleteSnapshotSchedule) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpDeleteTape) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpDeleteTapeArchive) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpDeleteTapePool) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpDeleteVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpDescribeAvailabilityMonitorTest) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpDescribeBandwidthRateLimit) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpDescribeBandwidthRateLimitSchedule) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpDescribeCache) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpDescribeCachediSCSIVolumes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpDescribeChapCredentials) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpDescribeFileSystemAssociations) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpDescribeGatewayInformation) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpDescribeMaintenanceStartTime) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpDescribeNFSFileShares) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpDescribeSMBFileShares) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpDescribeSMBSettings) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpDescribeSnapshotSchedule) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpDescribeStorediSCSIVolumes) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpDescribeTapeArchives) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpDescribeTapeRecoveryPoints) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpDescribeTapes) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpDescribeUploadBuffer) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpDescribeVTLDevices) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkingStorage) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpDetachVolume) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpDisableGateway) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpDisassociateFileSystem) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpJoinDomain) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpListAutomaticTapeCreationPolicies) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpListFileShares) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpListFileSystemAssociations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpListGateways) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpListLocalDisks) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpListTapePools) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpListTapes) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpListVolumeInitiators) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpListVolumeRecoveryPoints) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2996,7 +3501,15 @@ func (m *awsAwsjson11_serializeOpListVolumes) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3043,7 +3556,15 @@ func (m *awsAwsjson11_serializeOpNotifyWhenUploaded) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3090,7 +3611,15 @@ func (m *awsAwsjson11_serializeOpRefreshCache) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3137,7 +3666,15 @@ func (m *awsAwsjson11_serializeOpRemoveTagsFromResource) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3184,7 +3721,15 @@ func (m *awsAwsjson11_serializeOpResetCache) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3231,7 +3776,15 @@ func (m *awsAwsjson11_serializeOpRetrieveTapeArchive) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3278,7 +3831,15 @@ func (m *awsAwsjson11_serializeOpRetrieveTapeRecoveryPoint) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3325,7 +3886,15 @@ func (m *awsAwsjson11_serializeOpSetLocalConsolePassword) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3372,7 +3941,15 @@ func (m *awsAwsjson11_serializeOpSetSMBGuestPassword) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3419,7 +3996,15 @@ func (m *awsAwsjson11_serializeOpShutdownGateway) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3466,7 +4051,15 @@ func (m *awsAwsjson11_serializeOpStartAvailabilityMonitorTest) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3513,7 +4106,15 @@ func (m *awsAwsjson11_serializeOpStartGateway) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3560,7 +4161,15 @@ func (m *awsAwsjson11_serializeOpUpdateAutomaticTapeCreationPolicy) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3607,7 +4216,15 @@ func (m *awsAwsjson11_serializeOpUpdateBandwidthRateLimit) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3654,7 +4271,15 @@ func (m *awsAwsjson11_serializeOpUpdateBandwidthRateLimitSchedule) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3701,7 +4326,15 @@ func (m *awsAwsjson11_serializeOpUpdateChapCredentials) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3748,7 +4381,15 @@ func (m *awsAwsjson11_serializeOpUpdateFileSystemAssociation) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3795,7 +4436,15 @@ func (m *awsAwsjson11_serializeOpUpdateGatewayInformation) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3842,7 +4491,15 @@ func (m *awsAwsjson11_serializeOpUpdateGatewaySoftwareNow) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3889,7 +4546,15 @@ func (m *awsAwsjson11_serializeOpUpdateMaintenanceStartTime) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3936,7 +4601,15 @@ func (m *awsAwsjson11_serializeOpUpdateNFSFileShare) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3983,7 +4656,15 @@ func (m *awsAwsjson11_serializeOpUpdateSMBFileShare) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4030,7 +4711,15 @@ func (m *awsAwsjson11_serializeOpUpdateSMBFileShareVisibility) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4077,7 +4766,15 @@ func (m *awsAwsjson11_serializeOpUpdateSMBLocalGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4124,7 +4821,15 @@ func (m *awsAwsjson11_serializeOpUpdateSMBSecurityStrategy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4171,7 +4876,15 @@ func (m *awsAwsjson11_serializeOpUpdateSnapshotSchedule) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -4218,7 +4931,15 @@ func (m *awsAwsjson11_serializeOpUpdateVTLDeviceType) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/sts/serializers.go b/service/sts/serializers.go index cc823c10562..d5bc9b4bfbf 100644 --- a/service/sts/serializers.go +++ b/service/sts/serializers.go @@ -12,6 +12,7 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsquery_serializeOpAssumeRole struct { @@ -35,7 +36,15 @@ func (m *awsAwsquery_serializeOpAssumeRole) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -91,7 +100,15 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -147,7 +164,15 @@ func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -203,7 +228,15 @@ func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -259,7 +292,15 @@ func (m *awsAwsquery_serializeOpGetAccessKeyInfo) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -315,7 +356,15 @@ func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -367,7 +416,15 @@ func (m *awsAwsquery_serializeOpGetFederationToken) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -423,7 +480,15 @@ func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/support/serializers.go b/service/support/serializers.go index e6ff07d7243..6e8bfcee278 100644 --- a/service/support/serializers.go +++ b/service/support/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAddAttachmentsToSet struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAddAttachmentsToSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAddCommunicationToCase) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateCase) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpDescribeAttachment) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDescribeCases) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDescribeCommunications) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDescribeServices) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDescribeSeverityLevels) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrustedAdvisorCheckRefreshStatuses) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrustedAdvisorCheckResult) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrustedAdvisorChecks) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDescribeTrustedAdvisorCheckSummaries) HandleSer return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpRefreshTrustedAdvisorCheck) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpResolveCase) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/swf/serializers.go b/service/swf/serializers.go index 289f167f958..146aa412a3b 100644 --- a/service/swf/serializers.go +++ b/service/swf/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCountClosedWorkflowExecutions struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson10_serializeOpCountClosedWorkflowExecutions) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson10_serializeOpCountOpenWorkflowExecutions) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson10_serializeOpCountPendingActivityTasks) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson10_serializeOpCountPendingDecisionTasks) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson10_serializeOpDeprecateActivityType) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson10_serializeOpDeprecateDomain) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson10_serializeOpDeprecateWorkflowType) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson10_serializeOpDescribeActivityType) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson10_serializeOpDescribeDomain) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson10_serializeOpDescribeWorkflowExecution) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson10_serializeOpDescribeWorkflowType) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson10_serializeOpGetWorkflowExecutionHistory) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson10_serializeOpListActivityTypes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson10_serializeOpListClosedWorkflowExecutions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson10_serializeOpListDomains) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson10_serializeOpListOpenWorkflowExecutions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson10_serializeOpListWorkflowTypes) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson10_serializeOpPollForActivityTask) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson10_serializeOpPollForDecisionTask) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson10_serializeOpRecordActivityTaskHeartbeat) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson10_serializeOpRegisterActivityType) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson10_serializeOpRegisterDomain) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson10_serializeOpRegisterWorkflowType) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson10_serializeOpRequestCancelWorkflowExecution) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson10_serializeOpRespondActivityTaskCanceled) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson10_serializeOpRespondActivityTaskCompleted) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson10_serializeOpRespondActivityTaskFailed) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson10_serializeOpRespondDecisionTaskCompleted) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson10_serializeOpSignalWorkflowExecution) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson10_serializeOpStartWorkflowExecution) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson10_serializeOpTerminateWorkflowExecution) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson10_serializeOpUndeprecateActivityType) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson10_serializeOpUndeprecateDomain) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson10_serializeOpUndeprecateWorkflowType) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/textract/serializers.go b/service/textract/serializers.go index 5a56928bbf4..599d8743d07 100644 --- a/service/textract/serializers.go +++ b/service/textract/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAnalyzeDocument struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAnalyzeDocument) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAnalyzeExpense) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpDetectDocumentText) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpGetDocumentAnalysis) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpGetDocumentTextDetection) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpGetExpenseAnalysis) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpStartDocumentAnalysis) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpStartDocumentTextDetection) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpStartExpenseAnalysis) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/timestreamquery/serializers.go b/service/timestreamquery/serializers.go index 237036ad2fe..754a3367cd5 100644 --- a/service/timestreamquery/serializers.go +++ b/service/timestreamquery/serializers.go @@ -11,6 +11,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCancelQuery struct { @@ -34,7 +35,15 @@ func (m *awsAwsjson10_serializeOpCancelQuery) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -81,7 +90,15 @@ func (m *awsAwsjson10_serializeOpDescribeEndpoints) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -128,7 +145,15 @@ func (m *awsAwsjson10_serializeOpQuery) HandleSerialize(ctx context.Context, in return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/timestreamwrite/serializers.go b/service/timestreamwrite/serializers.go index 30f65679f7d..26c6e4d209d 100644 --- a/service/timestreamwrite/serializers.go +++ b/service/timestreamwrite/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCreateDatabase struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpCreateDatabase) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpCreateTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpDeleteDatabase) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpDeleteTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpDescribeDatabase) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpDescribeEndpoints) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpDescribeTable) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpListDatabases) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson10_serializeOpListTables) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson10_serializeOpUpdateDatabase) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson10_serializeOpUpdateTable) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson10_serializeOpWriteRecords) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/transcribe/serializers.go b/service/transcribe/serializers.go index 95e29c383e5..b2f15df0d2d 100644 --- a/service/transcribe/serializers.go +++ b/service/transcribe/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateCallAnalyticsCategory struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateCallAnalyticsCategory) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateLanguageModel) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateMedicalVocabulary) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateVocabulary) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateVocabularyFilter) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteCallAnalyticsCategory) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDeleteCallAnalyticsJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDeleteLanguageModel) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDeleteMedicalTranscriptionJob) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDeleteMedicalVocabulary) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDeleteTranscriptionJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDeleteVocabulary) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDeleteVocabularyFilter) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDescribeLanguageModel) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpGetCallAnalyticsCategory) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpGetCallAnalyticsJob) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpGetMedicalTranscriptionJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpGetMedicalVocabulary) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpGetTranscriptionJob) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpGetVocabulary) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpGetVocabularyFilter) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpListCallAnalyticsCategories) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpListCallAnalyticsJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpListLanguageModels) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpListMedicalTranscriptionJobs) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpListMedicalVocabularies) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpListTranscriptionJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpListVocabularies) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpListVocabularyFilters) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpStartCallAnalyticsJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpStartMedicalTranscriptionJob) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpStartTranscriptionJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpUpdateCallAnalyticsCategory) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpUpdateMedicalVocabulary) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpUpdateVocabulary) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpUpdateVocabularyFilter) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/transfer/serializers.go b/service/transfer/serializers.go index fe08b5c9c92..a16b4c568b9 100644 --- a/service/transfer/serializers.go +++ b/service/transfer/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateAccess struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpCreateAccess) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpCreateServer) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkflow) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpDeleteAccess) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpDeleteServer) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpDeleteSshPublicKey) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkflow) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccess) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDescribeExecution) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDescribeSecurityPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDescribeServer) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDescribeUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkflow) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpImportSshPublicKey) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpListAccesses) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpListExecutions) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpListSecurityPolicies) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpListServers) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpListWorkflows) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpSendWorkflowStepState) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpStartServer) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpStopServer) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpTestIdentityProvider) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpUpdateAccess) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpUpdateServer) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpUpdateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/translate/serializers.go b/service/translate/serializers.go index 0fc389db799..33b203dff60 100644 --- a/service/translate/serializers.go +++ b/service/translate/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateParallelData struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateParallelData) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpDeleteParallelData) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpDeleteTerminology) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpDescribeTextTranslationJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpGetParallelData) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpGetTerminology) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpImportTerminology) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpListParallelData) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpListTerminologies) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpListTextTranslationJobs) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpStartTextTranslationJob) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpStopTextTranslationJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpTranslateText) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpUpdateParallelData) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/voiceid/serializers.go b/service/voiceid/serializers.go index e76bb949b2c..2469fcba879 100644 --- a/service/voiceid/serializers.go +++ b/service/voiceid/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson10_serializeOpCreateDomain struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson10_serializeOpCreateDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson10_serializeOpDeleteDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson10_serializeOpDeleteFraudster) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson10_serializeOpDeleteSpeaker) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson10_serializeOpDescribeDomain) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson10_serializeOpDescribeFraudster) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson10_serializeOpDescribeFraudsterRegistrationJob) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson10_serializeOpDescribeSpeaker) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson10_serializeOpDescribeSpeakerEnrollmentJob) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson10_serializeOpEvaluateSession) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson10_serializeOpListDomains) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson10_serializeOpListFraudsterRegistrationJobs) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson10_serializeOpListSpeakerEnrollmentJobs) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson10_serializeOpListSpeakers) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson10_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson10_serializeOpOptOutSpeaker) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson10_serializeOpStartFraudsterRegistrationJob) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson10_serializeOpStartSpeakerEnrollmentJob) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson10_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson10_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson10_serializeOpUpdateDomain) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/waf/serializers.go b/service/waf/serializers.go index 904d5405408..ddaa91df7c0 100644 --- a/service/waf/serializers.go +++ b/service/waf/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpCreateByteMatchSet struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpCreateByteMatchSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateGeoMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateRateBasedRule) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateRegexMatchSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateSizeConstraintSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpCreateSqlInjectionMatchSet) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpCreateWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpCreateWebACLMigrationStack) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpCreateXssMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDeleteByteMatchSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteGeoMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDeleteLoggingConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDeletePermissionPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDeleteRateBasedRule) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDeleteRegexMatchSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDeleteRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDeleteRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDeleteRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDeleteSizeConstraintSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDeleteSqlInjectionMatchSet) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDeleteWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDeleteXssMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpGetByteMatchSet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpGetChangeToken) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpGetChangeTokenStatus) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpGetGeoMatchSet) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpGetIPSet) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpGetLoggingConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpGetPermissionPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpGetRateBasedRule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpGetRateBasedRuleManagedKeys) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpGetRegexMatchSet) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpGetRegexPatternSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpGetRule) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpGetRuleGroup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpGetSampledRequests) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpGetSizeConstraintSet) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpGetSqlInjectionMatchSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpGetWebACL) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpGetXssMatchSet) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpListActivatedRulesInRuleGroup) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpListByteMatchSets) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpListGeoMatchSets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpListIPSets) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpListLoggingConfigurations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpListRateBasedRules) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2433,7 +2842,15 @@ func (m *awsAwsjson11_serializeOpListRegexMatchSets) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2480,7 +2897,15 @@ func (m *awsAwsjson11_serializeOpListRegexPatternSets) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2527,7 +2952,15 @@ func (m *awsAwsjson11_serializeOpListRuleGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2574,7 +3007,15 @@ func (m *awsAwsjson11_serializeOpListRules) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2621,7 +3062,15 @@ func (m *awsAwsjson11_serializeOpListSizeConstraintSets) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3117,15 @@ func (m *awsAwsjson11_serializeOpListSqlInjectionMatchSets) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2715,7 +3172,15 @@ func (m *awsAwsjson11_serializeOpListSubscribedRuleGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2762,7 +3227,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2809,7 +3282,15 @@ func (m *awsAwsjson11_serializeOpListWebACLs) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2856,7 +3337,15 @@ func (m *awsAwsjson11_serializeOpListXssMatchSets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2903,7 +3392,15 @@ func (m *awsAwsjson11_serializeOpPutLoggingConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2950,7 +3447,15 @@ func (m *awsAwsjson11_serializeOpPutPermissionPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2997,7 +3502,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3044,7 +3557,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3091,7 +3612,15 @@ func (m *awsAwsjson11_serializeOpUpdateByteMatchSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3138,7 +3667,15 @@ func (m *awsAwsjson11_serializeOpUpdateGeoMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3185,7 +3722,15 @@ func (m *awsAwsjson11_serializeOpUpdateIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3232,7 +3777,15 @@ func (m *awsAwsjson11_serializeOpUpdateRateBasedRule) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3279,7 +3832,15 @@ func (m *awsAwsjson11_serializeOpUpdateRegexMatchSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3326,7 +3887,15 @@ func (m *awsAwsjson11_serializeOpUpdateRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3373,7 +3942,15 @@ func (m *awsAwsjson11_serializeOpUpdateRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3420,7 +3997,15 @@ func (m *awsAwsjson11_serializeOpUpdateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3467,7 +4052,15 @@ func (m *awsAwsjson11_serializeOpUpdateSizeConstraintSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3514,7 +4107,15 @@ func (m *awsAwsjson11_serializeOpUpdateSqlInjectionMatchSet) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3561,7 +4162,15 @@ func (m *awsAwsjson11_serializeOpUpdateWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3608,7 +4217,15 @@ func (m *awsAwsjson11_serializeOpUpdateXssMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/wafregional/serializers.go b/service/wafregional/serializers.go index eb5c53c8970..2c8ad4c35ac 100644 --- a/service/wafregional/serializers.go +++ b/service/wafregional/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateWebACL struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateWebACL) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCreateByteMatchSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateGeoMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateRateBasedRule) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateRegexMatchSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpCreateRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpCreateRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpCreateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpCreateSizeConstraintSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpCreateSqlInjectionMatchSet) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpCreateWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpCreateWebACLMigrationStack) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpCreateXssMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDeleteByteMatchSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpDeleteGeoMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpDeleteIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpDeleteLoggingConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpDeletePermissionPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpDeleteRateBasedRule) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpDeleteRegexMatchSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpDeleteRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpDeleteRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpDeleteRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpDeleteSizeConstraintSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpDeleteSqlInjectionMatchSet) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpDeleteWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpDeleteXssMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpDisassociateWebACL) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpGetByteMatchSet) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpGetChangeToken) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpGetChangeTokenStatus) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpGetGeoMatchSet) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpGetIPSet) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpGetLoggingConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpGetPermissionPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpGetRateBasedRule) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpGetRateBasedRuleManagedKeys) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpGetRegexMatchSet) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpGetRegexPatternSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpGetRule) HandleSerialize(ctx context.Context, i return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpGetRuleGroup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpGetSampledRequests) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpGetSizeConstraintSet) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpGetSqlInjectionMatchSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2151,7 +2512,15 @@ func (m *awsAwsjson11_serializeOpGetWebACL) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2198,7 +2567,15 @@ func (m *awsAwsjson11_serializeOpGetWebACLForResource) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2245,7 +2622,15 @@ func (m *awsAwsjson11_serializeOpGetXssMatchSet) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2292,7 +2677,15 @@ func (m *awsAwsjson11_serializeOpListActivatedRulesInRuleGroup) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2339,7 +2732,15 @@ func (m *awsAwsjson11_serializeOpListByteMatchSets) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2386,7 +2787,15 @@ func (m *awsAwsjson11_serializeOpListGeoMatchSets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2433,7 +2842,15 @@ func (m *awsAwsjson11_serializeOpListIPSets) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2480,7 +2897,15 @@ func (m *awsAwsjson11_serializeOpListLoggingConfigurations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2527,7 +2952,15 @@ func (m *awsAwsjson11_serializeOpListRateBasedRules) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2574,7 +3007,15 @@ func (m *awsAwsjson11_serializeOpListRegexMatchSets) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2621,7 +3062,15 @@ func (m *awsAwsjson11_serializeOpListRegexPatternSets) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2668,7 +3117,15 @@ func (m *awsAwsjson11_serializeOpListResourcesForWebACL) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2715,7 +3172,15 @@ func (m *awsAwsjson11_serializeOpListRuleGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2762,7 +3227,15 @@ func (m *awsAwsjson11_serializeOpListRules) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2809,7 +3282,15 @@ func (m *awsAwsjson11_serializeOpListSizeConstraintSets) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2856,7 +3337,15 @@ func (m *awsAwsjson11_serializeOpListSqlInjectionMatchSets) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2903,7 +3392,15 @@ func (m *awsAwsjson11_serializeOpListSubscribedRuleGroups) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2950,7 +3447,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2997,7 +3502,15 @@ func (m *awsAwsjson11_serializeOpListWebACLs) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3044,7 +3557,15 @@ func (m *awsAwsjson11_serializeOpListXssMatchSets) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3091,7 +3612,15 @@ func (m *awsAwsjson11_serializeOpPutLoggingConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3138,7 +3667,15 @@ func (m *awsAwsjson11_serializeOpPutPermissionPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3185,7 +3722,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3232,7 +3777,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3279,7 +3832,15 @@ func (m *awsAwsjson11_serializeOpUpdateByteMatchSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3326,7 +3887,15 @@ func (m *awsAwsjson11_serializeOpUpdateGeoMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3373,7 +3942,15 @@ func (m *awsAwsjson11_serializeOpUpdateIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3420,7 +3997,15 @@ func (m *awsAwsjson11_serializeOpUpdateRateBasedRule) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3467,7 +4052,15 @@ func (m *awsAwsjson11_serializeOpUpdateRegexMatchSet) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3514,7 +4107,15 @@ func (m *awsAwsjson11_serializeOpUpdateRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3561,7 +4162,15 @@ func (m *awsAwsjson11_serializeOpUpdateRule) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3608,7 +4217,15 @@ func (m *awsAwsjson11_serializeOpUpdateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3655,7 +4272,15 @@ func (m *awsAwsjson11_serializeOpUpdateSizeConstraintSet) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3702,7 +4327,15 @@ func (m *awsAwsjson11_serializeOpUpdateSqlInjectionMatchSet) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3749,7 +4382,15 @@ func (m *awsAwsjson11_serializeOpUpdateWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3796,7 +4437,15 @@ func (m *awsAwsjson11_serializeOpUpdateXssMatchSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/wafv2/serializers.go b/service/wafv2/serializers.go index 017a9a486e2..91113d18d7f 100644 --- a/service/wafv2/serializers.go +++ b/service/wafv2/serializers.go @@ -13,6 +13,7 @@ import ( "github.com/aws/smithy-go/middleware" smithytime "github.com/aws/smithy-go/time" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateWebACL struct { @@ -36,7 +37,15 @@ func (m *awsAwsjson11_serializeOpAssociateWebACL) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -83,7 +92,15 @@ func (m *awsAwsjson11_serializeOpCheckCapacity) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -130,7 +147,15 @@ func (m *awsAwsjson11_serializeOpCreateIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -177,7 +202,15 @@ func (m *awsAwsjson11_serializeOpCreateRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -224,7 +257,15 @@ func (m *awsAwsjson11_serializeOpCreateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -271,7 +312,15 @@ func (m *awsAwsjson11_serializeOpCreateWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -318,7 +367,15 @@ func (m *awsAwsjson11_serializeOpDeleteFirewallManagerRuleGroups) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -365,7 +422,15 @@ func (m *awsAwsjson11_serializeOpDeleteIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -412,7 +477,15 @@ func (m *awsAwsjson11_serializeOpDeleteLoggingConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -459,7 +532,15 @@ func (m *awsAwsjson11_serializeOpDeletePermissionPolicy) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -506,7 +587,15 @@ func (m *awsAwsjson11_serializeOpDeleteRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -553,7 +642,15 @@ func (m *awsAwsjson11_serializeOpDeleteRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -600,7 +697,15 @@ func (m *awsAwsjson11_serializeOpDeleteWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -647,7 +752,15 @@ func (m *awsAwsjson11_serializeOpDescribeManagedRuleGroup) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -694,7 +807,15 @@ func (m *awsAwsjson11_serializeOpDisassociateWebACL) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -741,7 +862,15 @@ func (m *awsAwsjson11_serializeOpGetIPSet) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -788,7 +917,15 @@ func (m *awsAwsjson11_serializeOpGetLoggingConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -835,7 +972,15 @@ func (m *awsAwsjson11_serializeOpGetManagedRuleSet) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -882,7 +1027,15 @@ func (m *awsAwsjson11_serializeOpGetPermissionPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -929,7 +1082,15 @@ func (m *awsAwsjson11_serializeOpGetRateBasedStatementManagedKeys) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -976,7 +1137,15 @@ func (m *awsAwsjson11_serializeOpGetRegexPatternSet) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1023,7 +1192,15 @@ func (m *awsAwsjson11_serializeOpGetRuleGroup) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1070,7 +1247,15 @@ func (m *awsAwsjson11_serializeOpGetSampledRequests) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1117,7 +1302,15 @@ func (m *awsAwsjson11_serializeOpGetWebACL) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1164,7 +1357,15 @@ func (m *awsAwsjson11_serializeOpGetWebACLForResource) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1211,7 +1412,15 @@ func (m *awsAwsjson11_serializeOpListAvailableManagedRuleGroups) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1258,7 +1467,15 @@ func (m *awsAwsjson11_serializeOpListAvailableManagedRuleGroupVersions) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1305,7 +1522,15 @@ func (m *awsAwsjson11_serializeOpListIPSets) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1352,7 +1577,15 @@ func (m *awsAwsjson11_serializeOpListLoggingConfigurations) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1399,7 +1632,15 @@ func (m *awsAwsjson11_serializeOpListManagedRuleSets) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1446,7 +1687,15 @@ func (m *awsAwsjson11_serializeOpListRegexPatternSets) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1493,7 +1742,15 @@ func (m *awsAwsjson11_serializeOpListResourcesForWebACL) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1540,7 +1797,15 @@ func (m *awsAwsjson11_serializeOpListRuleGroups) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1587,7 +1852,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1634,7 +1907,15 @@ func (m *awsAwsjson11_serializeOpListWebACLs) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1681,7 +1962,15 @@ func (m *awsAwsjson11_serializeOpPutLoggingConfiguration) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1728,7 +2017,15 @@ func (m *awsAwsjson11_serializeOpPutManagedRuleSetVersions) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1775,7 +2072,15 @@ func (m *awsAwsjson11_serializeOpPutPermissionPolicy) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1822,7 +2127,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1869,7 +2182,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1916,7 +2237,15 @@ func (m *awsAwsjson11_serializeOpUpdateIPSet) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1963,7 +2292,15 @@ func (m *awsAwsjson11_serializeOpUpdateManagedRuleSetVersionExpiryDate) HandleSe return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2010,7 +2347,15 @@ func (m *awsAwsjson11_serializeOpUpdateRegexPatternSet) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2057,7 +2402,15 @@ func (m *awsAwsjson11_serializeOpUpdateRuleGroup) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2104,7 +2457,15 @@ func (m *awsAwsjson11_serializeOpUpdateWebACL) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/workmail/serializers.go b/service/workmail/serializers.go index ade6fe3cfcd..e858829c473 100644 --- a/service/workmail/serializers.go +++ b/service/workmail/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateDelegateToResource struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateDelegateToResource) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAssociateMemberToGroup) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpCancelMailboxExportJob) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCreateAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateGroup) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateMobileDeviceAccessRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateOrganization) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpDeleteAccessControlRule) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDeleteAlias) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDeleteGroup) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDeleteMailboxPermissions) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDeleteMobileDeviceAccessOverride) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDeleteMobileDeviceAccessRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDeleteOrganization) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDeleteResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDeleteRetentionPolicy) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDeleteUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDeregisterFromWorkMail) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDeregisterMailDomain) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDescribeGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDescribeInboundDmarcSettings) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpDescribeMailboxExportJob) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpDescribeOrganization) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpDescribeResource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpDescribeUser) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpDisassociateDelegateFromResource) HandleSeriali return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpDisassociateMemberFromGroup) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpGetAccessControlEffect) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpGetDefaultRetentionPolicy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpGetMailboxDetails) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpGetMailDomain) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpGetMobileDeviceAccessEffect) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpGetMobileDeviceAccessOverride) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpListAccessControlRules) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpListAliases) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpListGroupMembers) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpListGroups) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpListMailboxExportJobs) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpListMailboxPermissions) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpListMailDomains) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessOverrides) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpListMobileDeviceAccessRules) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpListOrganizations) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpListResourceDelegates) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpListResources) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpListUsers) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpPutAccessControlRule) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpPutInboundDmarcSettings) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpPutMailboxPermissions) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpPutMobileDeviceAccessOverride) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpPutRetentionPolicy) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2573,7 +3006,15 @@ func (m *awsAwsjson11_serializeOpRegisterMailDomain) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2620,7 +3061,15 @@ func (m *awsAwsjson11_serializeOpRegisterToWorkMail) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2667,7 +3116,15 @@ func (m *awsAwsjson11_serializeOpResetPassword) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2714,7 +3171,15 @@ func (m *awsAwsjson11_serializeOpStartMailboxExportJob) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2761,7 +3226,15 @@ func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2808,7 +3281,15 @@ func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2855,7 +3336,15 @@ func (m *awsAwsjson11_serializeOpUpdateDefaultMailDomain) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2902,7 +3391,15 @@ func (m *awsAwsjson11_serializeOpUpdateMailboxQuota) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2949,7 +3446,15 @@ func (m *awsAwsjson11_serializeOpUpdateMobileDeviceAccessRule) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2996,7 +3501,15 @@ func (m *awsAwsjson11_serializeOpUpdatePrimaryEmailAddress) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -3043,7 +3556,15 @@ func (m *awsAwsjson11_serializeOpUpdateResource) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { diff --git a/service/workspaces/serializers.go b/service/workspaces/serializers.go index 1d10b9950ad..acc2f3af701 100644 --- a/service/workspaces/serializers.go +++ b/service/workspaces/serializers.go @@ -12,6 +12,7 @@ import ( smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" + "path" ) type awsAwsjson11_serializeOpAssociateConnectionAlias struct { @@ -35,7 +36,15 @@ func (m *awsAwsjson11_serializeOpAssociateConnectionAlias) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -82,7 +91,15 @@ func (m *awsAwsjson11_serializeOpAssociateIpGroups) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -129,7 +146,15 @@ func (m *awsAwsjson11_serializeOpAuthorizeIpRules) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -176,7 +201,15 @@ func (m *awsAwsjson11_serializeOpCopyWorkspaceImage) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -223,7 +256,15 @@ func (m *awsAwsjson11_serializeOpCreateConnectionAlias) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -270,7 +311,15 @@ func (m *awsAwsjson11_serializeOpCreateIpGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -317,7 +366,15 @@ func (m *awsAwsjson11_serializeOpCreateTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -364,7 +421,15 @@ func (m *awsAwsjson11_serializeOpCreateUpdatedWorkspaceImage) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -411,7 +476,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkspaceBundle) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -458,7 +531,15 @@ func (m *awsAwsjson11_serializeOpCreateWorkspaces) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -505,7 +586,15 @@ func (m *awsAwsjson11_serializeOpDeleteConnectionAlias) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -552,7 +641,15 @@ func (m *awsAwsjson11_serializeOpDeleteIpGroup) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -599,7 +696,15 @@ func (m *awsAwsjson11_serializeOpDeleteTags) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -646,7 +751,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkspaceBundle) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -693,7 +806,15 @@ func (m *awsAwsjson11_serializeOpDeleteWorkspaceImage) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -740,7 +861,15 @@ func (m *awsAwsjson11_serializeOpDeregisterWorkspaceDirectory) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -787,7 +916,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccount) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -834,7 +971,15 @@ func (m *awsAwsjson11_serializeOpDescribeAccountModifications) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -881,7 +1026,15 @@ func (m *awsAwsjson11_serializeOpDescribeClientProperties) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -928,7 +1081,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnectionAliases) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -975,7 +1136,15 @@ func (m *awsAwsjson11_serializeOpDescribeConnectionAliasPermissions) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1022,7 +1191,15 @@ func (m *awsAwsjson11_serializeOpDescribeIpGroups) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1069,7 +1246,15 @@ func (m *awsAwsjson11_serializeOpDescribeTags) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1116,7 +1301,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkspaceBundles) HandleSerialize(ctx c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1163,7 +1356,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkspaceDirectories) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1210,7 +1411,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkspaceImagePermissions) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1257,7 +1466,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkspaceImages) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1304,7 +1521,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkspaces) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1351,7 +1576,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkspacesConnectionStatus) HandleSeria return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1398,7 +1631,15 @@ func (m *awsAwsjson11_serializeOpDescribeWorkspaceSnapshots) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1445,7 +1686,15 @@ func (m *awsAwsjson11_serializeOpDisassociateConnectionAlias) HandleSerialize(ct return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1492,7 +1741,15 @@ func (m *awsAwsjson11_serializeOpDisassociateIpGroups) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1539,7 +1796,15 @@ func (m *awsAwsjson11_serializeOpImportWorkspaceImage) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1586,7 +1851,15 @@ func (m *awsAwsjson11_serializeOpListAvailableManagementCidrRanges) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1633,7 +1906,15 @@ func (m *awsAwsjson11_serializeOpMigrateWorkspace) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1680,7 +1961,15 @@ func (m *awsAwsjson11_serializeOpModifyAccount) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1727,7 +2016,15 @@ func (m *awsAwsjson11_serializeOpModifyClientProperties) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1774,7 +2071,15 @@ func (m *awsAwsjson11_serializeOpModifySelfservicePermissions) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1821,7 +2126,15 @@ func (m *awsAwsjson11_serializeOpModifyWorkspaceAccessProperties) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1868,7 +2181,15 @@ func (m *awsAwsjson11_serializeOpModifyWorkspaceCreationProperties) HandleSerial return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1915,7 +2236,15 @@ func (m *awsAwsjson11_serializeOpModifyWorkspaceProperties) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -1962,7 +2291,15 @@ func (m *awsAwsjson11_serializeOpModifyWorkspaceState) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2009,7 +2346,15 @@ func (m *awsAwsjson11_serializeOpRebootWorkspaces) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2056,7 +2401,15 @@ func (m *awsAwsjson11_serializeOpRebuildWorkspaces) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2103,7 +2456,15 @@ func (m *awsAwsjson11_serializeOpRegisterWorkspaceDirectory) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2150,7 +2511,15 @@ func (m *awsAwsjson11_serializeOpRestoreWorkspace) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2197,7 +2566,15 @@ func (m *awsAwsjson11_serializeOpRevokeIpRules) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2244,7 +2621,15 @@ func (m *awsAwsjson11_serializeOpStartWorkspaces) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2291,7 +2676,15 @@ func (m *awsAwsjson11_serializeOpStopWorkspaces) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2338,7 +2731,15 @@ func (m *awsAwsjson11_serializeOpTerminateWorkspaces) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2385,7 +2786,15 @@ func (m *awsAwsjson11_serializeOpUpdateConnectionAliasPermission) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2432,7 +2841,15 @@ func (m *awsAwsjson11_serializeOpUpdateRulesOfIpGroup) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2479,7 +2896,15 @@ func (m *awsAwsjson11_serializeOpUpdateWorkspaceBundle) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { @@ -2526,7 +2951,15 @@ func (m *awsAwsjson11_serializeOpUpdateWorkspaceImagePermission) HandleSerialize return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - request.Request.URL.Path = "/" + 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 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 { From 680aa20ae362ab5af043ec891bcc3ef3a6b66287 Mon Sep 17 00:00:00 2001 From: Sean McGrail Date: Wed, 10 Nov 2021 18:21:02 -0600 Subject: [PATCH 5/5] General Cleanup and Upgrade to Smithy 1.14.0 --- codegen/protocol-test-codegen/build.gradle.kts | 2 +- codegen/smithy-aws-go-codegen/build.gradle.kts | 6 +++--- .../smithy/aws/go/codegen/AwsProtocolUtils.java | 8 ++++++++ .../aws/go/codegen/RestJsonProtocolGenerator.java | 12 +++++++----- .../aws/go/codegen/RestXmlProtocolGenerator.java | 7 ++++--- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/codegen/protocol-test-codegen/build.gradle.kts b/codegen/protocol-test-codegen/build.gradle.kts index 2da07cf2910..483f949a668 100644 --- a/codegen/protocol-test-codegen/build.gradle.kts +++ b/codegen/protocol-test-codegen/build.gradle.kts @@ -20,7 +20,7 @@ plugins { } dependencies { - implementation("software.amazon.smithy:smithy-aws-protocol-tests:[1.13.1,1.14.0[") + implementation("software.amazon.smithy:smithy-aws-protocol-tests:[1.14.0,1.15.0[") implementation(project(":smithy-aws-go-codegen")) } diff --git a/codegen/smithy-aws-go-codegen/build.gradle.kts b/codegen/smithy-aws-go-codegen/build.gradle.kts index 5160921f994..ac1631a8a7e 100644 --- a/codegen/smithy-aws-go-codegen/build.gradle.kts +++ b/codegen/smithy-aws-go-codegen/build.gradle.kts @@ -32,9 +32,9 @@ tasks.withType { } dependencies { - api("software.amazon.smithy:smithy-aws-traits:[1.13.1,2.0.0[") - api("software.amazon.smithy:smithy-aws-iam-traits:[1.13.1,2.0.0[") - api("software.amazon.smithy:smithy-aws-cloudformation-traits:[1.13.1,2.0.0[") + api("software.amazon.smithy:smithy-aws-traits:[1.14.0,2.0.0[") + api("software.amazon.smithy:smithy-aws-iam-traits:[1.14.0,2.0.0[") + api("software.amazon.smithy:smithy-aws-cloudformation-traits:[1.14.0,2.0.0[") api("software.amazon.smithy.go:smithy-go-codegen:0.1.0") testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.0") testImplementation("org.junit.jupiter:junit-jupiter-engine:5.4.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 8146f1e83c0..805e62ec05c 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 @@ -29,6 +29,7 @@ import software.amazon.smithy.go.codegen.integration.HttpProtocolUnitTestResponseGenerator; import software.amazon.smithy.go.codegen.integration.IdempotencyTokenMiddlewareGenerator; import software.amazon.smithy.go.codegen.integration.ProtocolGenerator.GenerationContext; +import software.amazon.smithy.model.shapes.Shape; import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.utils.SetUtils; @@ -207,6 +208,13 @@ static void generateHttpProtocolTests(GenerationContext context) { .service(ShapeId.from("aws.protocoltests.json10#JsonRpc10")) .operation(ShapeId.from("aws.protocoltests.json10#EmptyInputAndEmptyOutput")) .addTestName("AwsJson10EmptyInputAndEmptyOutput") + .build(), + + // HTTP Payload Values that are unset vs set by the customer and how content-type should be handled. + HttpProtocolUnitTestGenerator.SkipTest.builder() + .service(ShapeId.from("aws.protocoltests.restjson#RestJson")) + .operation(ShapeId.from("aws.protocoltests.restjson#TestPayloadBlob")) + .addTestName("RestJsonHttpWithEmptyBlobPayload") .build() )); diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java index b43ea7748eb..6aa2dfef183 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestJsonProtocolGenerator.java @@ -47,6 +47,7 @@ import software.amazon.smithy.model.shapes.ServiceShape; import software.amazon.smithy.model.shapes.Shape; import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.model.shapes.ShapeType; import software.amazon.smithy.model.shapes.StructureShape; import software.amazon.smithy.model.shapes.UnionShape; import software.amazon.smithy.model.traits.EnumTrait; @@ -107,8 +108,7 @@ protected void generateOperationDocumentSerializer( protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( GenerationContext context, MemberShape memberShape, - String operand, - Consumer setStream + String operand ) { GoWriter writer = context.getWriter().get(); Model model = context.getModel(); @@ -123,6 +123,8 @@ protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( payloadShape, context.getService(), context.getProtocolName()); } + writeSetPayloadShapeHeader(writer, payloadShape); + GoValueAccessUtils.writeIfNonZeroValueMember(context.getModel(), context.getSymbolProvider(), writer, memberShape, operand, (s) -> { writer.addUseImports(SmithyGoDependency.SMITHY_JSON); @@ -133,14 +135,14 @@ protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( return out, metadata, &smithy.SerializationError{Err: err} } payload := bytes.NewReader(jsonEncoder.Bytes())""", functionName, s); - setStream.accept(writer); - if (payloadShape.isStructureShape()) { + writeSetStream(writer, "payload"); + if (payloadShape.getType() == ShapeType.STRUCTURE) { writer.openBlock("} else {", "", () -> { writer.write(""" jsonEncoder := smithyjson.NewEncoder() jsonEncoder.Value.Object().Close() payload := bytes.NewReader(jsonEncoder.Bytes())"""); - setStream.accept(writer); + writeSetStream(writer, "payload"); }); } }); diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java index 3abe8c3ba8b..a83fac819f3 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/RestXmlProtocolGenerator.java @@ -148,8 +148,7 @@ private void initalizeXmlEncoder( protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( GenerationContext context, MemberShape memberShape, - String operand, - Consumer setStream + String operand ) { GoWriter writer = context.getWriter().get(); Model model = context.getModel(); @@ -157,6 +156,8 @@ protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( GoValueAccessUtils.writeIfNonZeroValueMember(context.getModel(), context.getSymbolProvider(), writer, memberShape, operand, (s) -> { + writeSetPayloadShapeHeader(writer, payloadShape); + writer.addUseImports(SmithyGoDependency.SMITHY_XML); writer.addUseImports(SmithyGoDependency.BYTES); writer.write("xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil))"); @@ -180,7 +181,7 @@ protected void writeMiddlewarePayloadAsDocumentSerializerDelegator( writer.write("return out, metadata, &smithy.SerializationError{Err: err}"); }); writer.write("payload := bytes.NewReader(xmlEncoder.Bytes())"); - setStream.accept(writer); + writeSetStream(writer, "payload"); }); }