// Code generated by smithy-go-codegen DO NOT EDIT. package apigateway import ( "bytes" "context" "fmt" "github.com/aws/aws-sdk-go-v2/service/apigateway/types" smithy "github.com/aws/smithy-go" "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" ) type awsRestjson1_serializeOpCreateApiKey struct { } func (*awsRestjson1_serializeOpCreateApiKey) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateApiKey) 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.(*CreateApiKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/apikeys") 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_serializeOpDocumentCreateApiKeyInput(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_serializeOpHttpBindingsCreateApiKeyInput(v *CreateApiKeyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateApiKeyInput(v *CreateApiKeyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CustomerId != nil { ok := object.Key("customerId") ok.String(*v.CustomerId) } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.Enabled { ok := object.Key("enabled") ok.Boolean(v.Enabled) } if v.GenerateDistinctId { ok := object.Key("generateDistinctId") ok.Boolean(v.GenerateDistinctId) } if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.StageKeys != nil { ok := object.Key("stageKeys") if err := awsRestjson1_serializeDocumentListOfStageKeys(v.StageKeys, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } if v.Value != nil { ok := object.Key("value") ok.String(*v.Value) } return nil } type awsRestjson1_serializeOpCreateAuthorizer struct { } func (*awsRestjson1_serializeOpCreateAuthorizer) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateAuthorizer) 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.(*CreateAuthorizerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers") 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_serializeOpHttpBindingsCreateAuthorizerInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateAuthorizerInput(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_serializeOpHttpBindingsCreateAuthorizerInput(v *CreateAuthorizerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateAuthorizerInput(v *CreateAuthorizerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AuthorizerCredentials != nil { ok := object.Key("authorizerCredentials") ok.String(*v.AuthorizerCredentials) } if v.AuthorizerResultTtlInSeconds != nil { ok := object.Key("authorizerResultTtlInSeconds") ok.Integer(*v.AuthorizerResultTtlInSeconds) } if v.AuthorizerUri != nil { ok := object.Key("authorizerUri") ok.String(*v.AuthorizerUri) } if v.AuthType != nil { ok := object.Key("authType") ok.String(*v.AuthType) } if v.IdentitySource != nil { ok := object.Key("identitySource") ok.String(*v.IdentitySource) } if v.IdentityValidationExpression != nil { ok := object.Key("identityValidationExpression") ok.String(*v.IdentityValidationExpression) } if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.ProviderARNs != nil { ok := object.Key("providerARNs") if err := awsRestjson1_serializeDocumentListOfARNs(v.ProviderARNs, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("type") ok.String(string(v.Type)) } return nil } type awsRestjson1_serializeOpCreateBasePathMapping struct { } func (*awsRestjson1_serializeOpCreateBasePathMapping) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateBasePathMapping) 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.(*CreateBasePathMappingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings") 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_serializeOpHttpBindingsCreateBasePathMappingInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateBasePathMappingInput(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_serializeOpHttpBindingsCreateBasePathMappingInput(v *CreateBasePathMappingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateBasePathMappingInput(v *CreateBasePathMappingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BasePath != nil { ok := object.Key("basePath") ok.String(*v.BasePath) } if v.RestApiId != nil { ok := object.Key("restApiId") ok.String(*v.RestApiId) } if v.Stage != nil { ok := object.Key("stage") ok.String(*v.Stage) } return nil } type awsRestjson1_serializeOpCreateDeployment struct { } func (*awsRestjson1_serializeOpCreateDeployment) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateDeployment) 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.(*CreateDeploymentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments") 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_serializeOpHttpBindingsCreateDeploymentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateDeploymentInput(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_serializeOpHttpBindingsCreateDeploymentInput(v *CreateDeploymentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateDeploymentInput(v *CreateDeploymentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CacheClusterEnabled != nil { ok := object.Key("cacheClusterEnabled") ok.Boolean(*v.CacheClusterEnabled) } if len(v.CacheClusterSize) > 0 { ok := object.Key("cacheClusterSize") ok.String(string(v.CacheClusterSize)) } if v.CanarySettings != nil { ok := object.Key("canarySettings") if err := awsRestjson1_serializeDocumentDeploymentCanarySettings(v.CanarySettings, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.StageDescription != nil { ok := object.Key("stageDescription") ok.String(*v.StageDescription) } if v.StageName != nil { ok := object.Key("stageName") ok.String(*v.StageName) } if v.TracingEnabled != nil { ok := object.Key("tracingEnabled") ok.Boolean(*v.TracingEnabled) } if v.Variables != nil { ok := object.Key("variables") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Variables, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateDocumentationPart struct { } func (*awsRestjson1_serializeOpCreateDocumentationPart) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateDocumentationPart) 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.(*CreateDocumentationPartInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts") 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_serializeOpHttpBindingsCreateDocumentationPartInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateDocumentationPartInput(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_serializeOpHttpBindingsCreateDocumentationPartInput(v *CreateDocumentationPartInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateDocumentationPartInput(v *CreateDocumentationPartInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Location != nil { ok := object.Key("location") if err := awsRestjson1_serializeDocumentDocumentationPartLocation(v.Location, ok); err != nil { return err } } if v.Properties != nil { ok := object.Key("properties") ok.String(*v.Properties) } return nil } type awsRestjson1_serializeOpCreateDocumentationVersion struct { } func (*awsRestjson1_serializeOpCreateDocumentationVersion) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateDocumentationVersion) 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.(*CreateDocumentationVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions") 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_serializeOpHttpBindingsCreateDocumentationVersionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateDocumentationVersionInput(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_serializeOpHttpBindingsCreateDocumentationVersionInput(v *CreateDocumentationVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateDocumentationVersionInput(v *CreateDocumentationVersionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.DocumentationVersion != nil { ok := object.Key("documentationVersion") ok.String(*v.DocumentationVersion) } if v.StageName != nil { ok := object.Key("stageName") ok.String(*v.StageName) } return nil } type awsRestjson1_serializeOpCreateDomainName struct { } func (*awsRestjson1_serializeOpCreateDomainName) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateDomainName) 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.(*CreateDomainNameInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames") 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_serializeOpDocumentCreateDomainNameInput(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_serializeOpHttpBindingsCreateDomainNameInput(v *CreateDomainNameInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateDomainNameInput(v *CreateDomainNameInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CertificateArn != nil { ok := object.Key("certificateArn") ok.String(*v.CertificateArn) } if v.CertificateBody != nil { ok := object.Key("certificateBody") ok.String(*v.CertificateBody) } if v.CertificateChain != nil { ok := object.Key("certificateChain") ok.String(*v.CertificateChain) } if v.CertificateName != nil { ok := object.Key("certificateName") ok.String(*v.CertificateName) } if v.CertificatePrivateKey != nil { ok := object.Key("certificatePrivateKey") ok.String(*v.CertificatePrivateKey) } if v.DomainName != nil { ok := object.Key("domainName") ok.String(*v.DomainName) } if v.EndpointConfiguration != nil { ok := object.Key("endpointConfiguration") if err := awsRestjson1_serializeDocumentEndpointConfiguration(v.EndpointConfiguration, ok); err != nil { return err } } if v.MutualTlsAuthentication != nil { ok := object.Key("mutualTlsAuthentication") if err := awsRestjson1_serializeDocumentMutualTlsAuthenticationInput(v.MutualTlsAuthentication, ok); err != nil { return err } } if v.RegionalCertificateArn != nil { ok := object.Key("regionalCertificateArn") ok.String(*v.RegionalCertificateArn) } if v.RegionalCertificateName != nil { ok := object.Key("regionalCertificateName") ok.String(*v.RegionalCertificateName) } if len(v.SecurityPolicy) > 0 { ok := object.Key("securityPolicy") ok.String(string(v.SecurityPolicy)) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateModel struct { } func (*awsRestjson1_serializeOpCreateModel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateModel) 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.(*CreateModelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models") 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_serializeOpHttpBindingsCreateModelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateModelInput(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_serializeOpHttpBindingsCreateModelInput(v *CreateModelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateModelInput(v *CreateModelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ContentType != nil { ok := object.Key("contentType") ok.String(*v.ContentType) } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.Schema != nil { ok := object.Key("schema") ok.String(*v.Schema) } return nil } type awsRestjson1_serializeOpCreateRequestValidator struct { } func (*awsRestjson1_serializeOpCreateRequestValidator) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateRequestValidator) 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.(*CreateRequestValidatorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators") 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_serializeOpHttpBindingsCreateRequestValidatorInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateRequestValidatorInput(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_serializeOpHttpBindingsCreateRequestValidatorInput(v *CreateRequestValidatorInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateRequestValidatorInput(v *CreateRequestValidatorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.ValidateRequestBody { ok := object.Key("validateRequestBody") ok.Boolean(v.ValidateRequestBody) } if v.ValidateRequestParameters { ok := object.Key("validateRequestParameters") ok.Boolean(v.ValidateRequestParameters) } return nil } type awsRestjson1_serializeOpCreateResource struct { } func (*awsRestjson1_serializeOpCreateResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateResource) 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.(*CreateResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{parentId}") 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_serializeOpHttpBindingsCreateResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateResourceInput(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_serializeOpHttpBindingsCreateResourceInput(v *CreateResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ParentId == nil || len(*v.ParentId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member parentId must not be empty")} } if v.ParentId != nil { if err := encoder.SetURI("parentId").String(*v.ParentId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateResourceInput(v *CreateResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PathPart != nil { ok := object.Key("pathPart") ok.String(*v.PathPart) } return nil } type awsRestjson1_serializeOpCreateRestApi struct { } func (*awsRestjson1_serializeOpCreateRestApi) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateRestApi) 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.(*CreateRestApiInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis") 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_serializeOpDocumentCreateRestApiInput(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_serializeOpHttpBindingsCreateRestApiInput(v *CreateRestApiInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateRestApiInput(v *CreateRestApiInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ApiKeySource) > 0 { ok := object.Key("apiKeySource") ok.String(string(v.ApiKeySource)) } if v.BinaryMediaTypes != nil { ok := object.Key("binaryMediaTypes") if err := awsRestjson1_serializeDocumentListOfString(v.BinaryMediaTypes, ok); err != nil { return err } } if v.CloneFrom != nil { ok := object.Key("cloneFrom") ok.String(*v.CloneFrom) } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.DisableExecuteApiEndpoint { ok := object.Key("disableExecuteApiEndpoint") ok.Boolean(v.DisableExecuteApiEndpoint) } if v.EndpointConfiguration != nil { ok := object.Key("endpointConfiguration") if err := awsRestjson1_serializeDocumentEndpointConfiguration(v.EndpointConfiguration, ok); err != nil { return err } } if v.MinimumCompressionSize != nil { ok := object.Key("minimumCompressionSize") ok.Integer(*v.MinimumCompressionSize) } if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.Policy != nil { ok := object.Key("policy") ok.String(*v.Policy) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } if v.Version != nil { ok := object.Key("version") ok.String(*v.Version) } return nil } type awsRestjson1_serializeOpCreateStage struct { } func (*awsRestjson1_serializeOpCreateStage) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateStage) 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.(*CreateStageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages") 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_serializeOpHttpBindingsCreateStageInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateStageInput(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_serializeOpHttpBindingsCreateStageInput(v *CreateStageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateStageInput(v *CreateStageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CacheClusterEnabled { ok := object.Key("cacheClusterEnabled") ok.Boolean(v.CacheClusterEnabled) } if len(v.CacheClusterSize) > 0 { ok := object.Key("cacheClusterSize") ok.String(string(v.CacheClusterSize)) } if v.CanarySettings != nil { ok := object.Key("canarySettings") if err := awsRestjson1_serializeDocumentCanarySettings(v.CanarySettings, ok); err != nil { return err } } if v.DeploymentId != nil { ok := object.Key("deploymentId") ok.String(*v.DeploymentId) } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.DocumentationVersion != nil { ok := object.Key("documentationVersion") ok.String(*v.DocumentationVersion) } if v.StageName != nil { ok := object.Key("stageName") ok.String(*v.StageName) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } if v.TracingEnabled { ok := object.Key("tracingEnabled") ok.Boolean(v.TracingEnabled) } if v.Variables != nil { ok := object.Key("variables") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Variables, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateUsagePlan struct { } func (*awsRestjson1_serializeOpCreateUsagePlan) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateUsagePlan) 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.(*CreateUsagePlanInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans") 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_serializeOpDocumentCreateUsagePlanInput(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_serializeOpHttpBindingsCreateUsagePlanInput(v *CreateUsagePlanInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateUsagePlanInput(v *CreateUsagePlanInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApiStages != nil { ok := object.Key("apiStages") if err := awsRestjson1_serializeDocumentListOfApiStage(v.ApiStages, ok); err != nil { return err } } if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.Quota != nil { ok := object.Key("quota") if err := awsRestjson1_serializeDocumentQuotaSettings(v.Quota, ok); err != nil { return err } } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } if v.Throttle != nil { ok := object.Key("throttle") if err := awsRestjson1_serializeDocumentThrottleSettings(v.Throttle, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpCreateUsagePlanKey struct { } func (*awsRestjson1_serializeOpCreateUsagePlanKey) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateUsagePlanKey) 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.(*CreateUsagePlanKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys") 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_serializeOpHttpBindingsCreateUsagePlanKeyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentCreateUsagePlanKeyInput(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_serializeOpHttpBindingsCreateUsagePlanKeyInput(v *CreateUsagePlanKeyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentCreateUsagePlanKeyInput(v *CreateUsagePlanKeyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.KeyId != nil { ok := object.Key("keyId") ok.String(*v.KeyId) } if v.KeyType != nil { ok := object.Key("keyType") ok.String(*v.KeyType) } return nil } type awsRestjson1_serializeOpCreateVpcLink struct { } func (*awsRestjson1_serializeOpCreateVpcLink) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpCreateVpcLink) 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.(*CreateVpcLinkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/vpclinks") 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_serializeOpDocumentCreateVpcLinkInput(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_serializeOpHttpBindingsCreateVpcLinkInput(v *CreateVpcLinkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentCreateVpcLinkInput(v *CreateVpcLinkInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } if v.TargetArns != nil { ok := object.Key("targetArns") if err := awsRestjson1_serializeDocumentListOfString(v.TargetArns, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteApiKey struct { } func (*awsRestjson1_serializeOpDeleteApiKey) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteApiKey) 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.(*DeleteApiKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/apikeys/{apiKey}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteApiKeyInput(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_serializeOpHttpBindingsDeleteApiKeyInput(v *DeleteApiKeyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ApiKey == nil || len(*v.ApiKey) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member apiKey must not be empty")} } if v.ApiKey != nil { if err := encoder.SetURI("apiKey").String(*v.ApiKey); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteAuthorizer struct { } func (*awsRestjson1_serializeOpDeleteAuthorizer) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteAuthorizer) 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.(*DeleteAuthorizerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteAuthorizerInput(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_serializeOpHttpBindingsDeleteAuthorizerInput(v *DeleteAuthorizerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")} } if v.AuthorizerId != nil { if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteBasePathMapping struct { } func (*awsRestjson1_serializeOpDeleteBasePathMapping) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteBasePathMapping) 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.(*DeleteBasePathMappingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings/{basePath}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteBasePathMappingInput(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_serializeOpHttpBindingsDeleteBasePathMappingInput(v *DeleteBasePathMappingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.BasePath == nil || len(*v.BasePath) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member basePath must not be empty")} } if v.BasePath != nil { if err := encoder.SetURI("basePath").String(*v.BasePath); err != nil { return err } } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteClientCertificate struct { } func (*awsRestjson1_serializeOpDeleteClientCertificate) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteClientCertificate) 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.(*DeleteClientCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/clientcertificates/{clientCertificateId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteClientCertificateInput(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_serializeOpHttpBindingsDeleteClientCertificateInput(v *DeleteClientCertificateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ClientCertificateId == nil || len(*v.ClientCertificateId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member clientCertificateId must not be empty")} } if v.ClientCertificateId != nil { if err := encoder.SetURI("clientCertificateId").String(*v.ClientCertificateId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteDeployment struct { } func (*awsRestjson1_serializeOpDeleteDeployment) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteDeployment) 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.(*DeleteDeploymentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments/{deploymentId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteDeploymentInput(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_serializeOpHttpBindingsDeleteDeploymentInput(v *DeleteDeploymentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DeploymentId == nil || len(*v.DeploymentId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member deploymentId must not be empty")} } if v.DeploymentId != nil { if err := encoder.SetURI("deploymentId").String(*v.DeploymentId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteDocumentationPart struct { } func (*awsRestjson1_serializeOpDeleteDocumentationPart) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteDocumentationPart) 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.(*DeleteDocumentationPartInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts/{documentationPartId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteDocumentationPartInput(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_serializeOpHttpBindingsDeleteDocumentationPartInput(v *DeleteDocumentationPartInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DocumentationPartId == nil || len(*v.DocumentationPartId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member documentationPartId must not be empty")} } if v.DocumentationPartId != nil { if err := encoder.SetURI("documentationPartId").String(*v.DocumentationPartId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteDocumentationVersion struct { } func (*awsRestjson1_serializeOpDeleteDocumentationVersion) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteDocumentationVersion) 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.(*DeleteDocumentationVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions/{documentationVersion}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteDocumentationVersionInput(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_serializeOpHttpBindingsDeleteDocumentationVersionInput(v *DeleteDocumentationVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DocumentationVersion == nil || len(*v.DocumentationVersion) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member documentationVersion must not be empty")} } if v.DocumentationVersion != nil { if err := encoder.SetURI("documentationVersion").String(*v.DocumentationVersion); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteDomainName struct { } func (*awsRestjson1_serializeOpDeleteDomainName) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteDomainName) 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.(*DeleteDomainNameInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteDomainNameInput(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_serializeOpHttpBindingsDeleteDomainNameInput(v *DeleteDomainNameInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteGatewayResponse struct { } func (*awsRestjson1_serializeOpDeleteGatewayResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteGatewayResponse) 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.(*DeleteGatewayResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteGatewayResponseInput(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_serializeOpHttpBindingsDeleteGatewayResponseInput(v *DeleteGatewayResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if len(v.ResponseType) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")} } if len(v.ResponseType) > 0 { if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteIntegration struct { } func (*awsRestjson1_serializeOpDeleteIntegration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteIntegration) 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.(*DeleteIntegrationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteIntegrationInput(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_serializeOpHttpBindingsDeleteIntegrationInput(v *DeleteIntegrationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteIntegrationResponse struct { } func (*awsRestjson1_serializeOpDeleteIntegrationResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteIntegrationResponse) 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.(*DeleteIntegrationResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteIntegrationResponseInput(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_serializeOpHttpBindingsDeleteIntegrationResponseInput(v *DeleteIntegrationResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteMethod struct { } func (*awsRestjson1_serializeOpDeleteMethod) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteMethod) 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.(*DeleteMethodInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteMethodInput(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_serializeOpHttpBindingsDeleteMethodInput(v *DeleteMethodInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteMethodResponse struct { } func (*awsRestjson1_serializeOpDeleteMethodResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteMethodResponse) 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.(*DeleteMethodResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteMethodResponseInput(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_serializeOpHttpBindingsDeleteMethodResponseInput(v *DeleteMethodResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteModel struct { } func (*awsRestjson1_serializeOpDeleteModel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteModel) 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.(*DeleteModelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteModelInput(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_serializeOpHttpBindingsDeleteModelInput(v *DeleteModelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ModelName == nil || len(*v.ModelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")} } if v.ModelName != nil { if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteRequestValidator struct { } func (*awsRestjson1_serializeOpDeleteRequestValidator) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteRequestValidator) 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.(*DeleteRequestValidatorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators/{requestValidatorId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteRequestValidatorInput(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_serializeOpHttpBindingsDeleteRequestValidatorInput(v *DeleteRequestValidatorInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RequestValidatorId == nil || len(*v.RequestValidatorId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member requestValidatorId must not be empty")} } if v.RequestValidatorId != nil { if err := encoder.SetURI("requestValidatorId").String(*v.RequestValidatorId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteResource struct { } func (*awsRestjson1_serializeOpDeleteResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteResource) 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.(*DeleteResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteResourceInput(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_serializeOpHttpBindingsDeleteResourceInput(v *DeleteResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteRestApi struct { } func (*awsRestjson1_serializeOpDeleteRestApi) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteRestApi) 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.(*DeleteRestApiInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteRestApiInput(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_serializeOpHttpBindingsDeleteRestApiInput(v *DeleteRestApiInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteStage struct { } func (*awsRestjson1_serializeOpDeleteStage) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteStage) 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.(*DeleteStageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteStageInput(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_serializeOpHttpBindingsDeleteStageInput(v *DeleteStageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StageName == nil || len(*v.StageName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")} } if v.StageName != nil { if err := encoder.SetURI("stageName").String(*v.StageName); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteUsagePlan struct { } func (*awsRestjson1_serializeOpDeleteUsagePlan) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteUsagePlan) 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.(*DeleteUsagePlanInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteUsagePlanInput(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_serializeOpHttpBindingsDeleteUsagePlanInput(v *DeleteUsagePlanInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteUsagePlanKey struct { } func (*awsRestjson1_serializeOpDeleteUsagePlanKey) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteUsagePlanKey) 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.(*DeleteUsagePlanKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys/{keyId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteUsagePlanKeyInput(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_serializeOpHttpBindingsDeleteUsagePlanKeyInput(v *DeleteUsagePlanKeyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.KeyId == nil || len(*v.KeyId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member keyId must not be empty")} } if v.KeyId != nil { if err := encoder.SetURI("keyId").String(*v.KeyId); err != nil { return err } } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } type awsRestjson1_serializeOpDeleteVpcLink struct { } func (*awsRestjson1_serializeOpDeleteVpcLink) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpDeleteVpcLink) 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.(*DeleteVpcLinkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/vpclinks/{vpcLinkId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsDeleteVpcLinkInput(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_serializeOpHttpBindingsDeleteVpcLinkInput(v *DeleteVpcLinkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.VpcLinkId == nil || len(*v.VpcLinkId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member vpcLinkId must not be empty")} } if v.VpcLinkId != nil { if err := encoder.SetURI("vpcLinkId").String(*v.VpcLinkId); err != nil { return err } } return nil } type awsRestjson1_serializeOpFlushStageAuthorizersCache struct { } func (*awsRestjson1_serializeOpFlushStageAuthorizersCache) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpFlushStageAuthorizersCache) 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.(*FlushStageAuthorizersCacheInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/cache/authorizers") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsFlushStageAuthorizersCacheInput(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_serializeOpHttpBindingsFlushStageAuthorizersCacheInput(v *FlushStageAuthorizersCacheInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StageName == nil || len(*v.StageName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")} } if v.StageName != nil { if err := encoder.SetURI("stageName").String(*v.StageName); err != nil { return err } } return nil } type awsRestjson1_serializeOpFlushStageCache struct { } func (*awsRestjson1_serializeOpFlushStageCache) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpFlushStageCache) 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.(*FlushStageCacheInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/cache/data") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsFlushStageCacheInput(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_serializeOpHttpBindingsFlushStageCacheInput(v *FlushStageCacheInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StageName == nil || len(*v.StageName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")} } if v.StageName != nil { if err := encoder.SetURI("stageName").String(*v.StageName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGenerateClientCertificate struct { } func (*awsRestjson1_serializeOpGenerateClientCertificate) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGenerateClientCertificate) 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.(*GenerateClientCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/clientcertificates") 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_serializeOpDocumentGenerateClientCertificateInput(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_serializeOpHttpBindingsGenerateClientCertificateInput(v *GenerateClientCertificateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentGenerateClientCertificateInput(v *GenerateClientCertificateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Description != nil { ok := object.Key("description") ok.String(*v.Description) } if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetAccount struct { } func (*awsRestjson1_serializeOpGetAccount) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetAccount) 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.(*GetAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/account") 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_serializeOpHttpBindingsGetAccountInput(v *GetAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } type awsRestjson1_serializeOpGetApiKey struct { } func (*awsRestjson1_serializeOpGetApiKey) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetApiKey) 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.(*GetApiKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/apikeys/{apiKey}") 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_serializeOpHttpBindingsGetApiKeyInput(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_serializeOpHttpBindingsGetApiKeyInput(v *GetApiKeyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ApiKey == nil || len(*v.ApiKey) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member apiKey must not be empty")} } if v.ApiKey != nil { if err := encoder.SetURI("apiKey").String(*v.ApiKey); err != nil { return err } } if v.IncludeValue != nil { encoder.SetQuery("includeValue").Boolean(*v.IncludeValue) } return nil } type awsRestjson1_serializeOpGetApiKeys struct { } func (*awsRestjson1_serializeOpGetApiKeys) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetApiKeys) 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.(*GetApiKeysInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/apikeys") 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_serializeOpHttpBindingsGetApiKeysInput(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_serializeOpHttpBindingsGetApiKeysInput(v *GetApiKeysInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.CustomerId != nil { encoder.SetQuery("customerId").String(*v.CustomerId) } if v.IncludeValues != nil { encoder.SetQuery("includeValues").Boolean(*v.IncludeValues) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.NameQuery != nil { encoder.SetQuery("name").String(*v.NameQuery) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpGetAuthorizer struct { } func (*awsRestjson1_serializeOpGetAuthorizer) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetAuthorizer) 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.(*GetAuthorizerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}") 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_serializeOpHttpBindingsGetAuthorizerInput(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_serializeOpHttpBindingsGetAuthorizerInput(v *GetAuthorizerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")} } if v.AuthorizerId != nil { if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetAuthorizers struct { } func (*awsRestjson1_serializeOpGetAuthorizers) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetAuthorizers) 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.(*GetAuthorizersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers") 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_serializeOpHttpBindingsGetAuthorizersInput(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_serializeOpHttpBindingsGetAuthorizersInput(v *GetAuthorizersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetBasePathMapping struct { } func (*awsRestjson1_serializeOpGetBasePathMapping) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetBasePathMapping) 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.(*GetBasePathMappingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings/{basePath}") 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_serializeOpHttpBindingsGetBasePathMappingInput(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_serializeOpHttpBindingsGetBasePathMappingInput(v *GetBasePathMappingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.BasePath == nil || len(*v.BasePath) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member basePath must not be empty")} } if v.BasePath != nil { if err := encoder.SetURI("basePath").String(*v.BasePath); err != nil { return err } } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetBasePathMappings struct { } func (*awsRestjson1_serializeOpGetBasePathMappings) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetBasePathMappings) 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.(*GetBasePathMappingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings") 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_serializeOpHttpBindingsGetBasePathMappingsInput(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_serializeOpHttpBindingsGetBasePathMappingsInput(v *GetBasePathMappingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpGetClientCertificate struct { } func (*awsRestjson1_serializeOpGetClientCertificate) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetClientCertificate) 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.(*GetClientCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/clientcertificates/{clientCertificateId}") 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_serializeOpHttpBindingsGetClientCertificateInput(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_serializeOpHttpBindingsGetClientCertificateInput(v *GetClientCertificateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ClientCertificateId == nil || len(*v.ClientCertificateId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member clientCertificateId must not be empty")} } if v.ClientCertificateId != nil { if err := encoder.SetURI("clientCertificateId").String(*v.ClientCertificateId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetClientCertificates struct { } func (*awsRestjson1_serializeOpGetClientCertificates) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetClientCertificates) 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.(*GetClientCertificatesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/clientcertificates") 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_serializeOpHttpBindingsGetClientCertificatesInput(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_serializeOpHttpBindingsGetClientCertificatesInput(v *GetClientCertificatesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpGetDeployment struct { } func (*awsRestjson1_serializeOpGetDeployment) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDeployment) 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.(*GetDeploymentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments/{deploymentId}") 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_serializeOpHttpBindingsGetDeploymentInput(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_serializeOpHttpBindingsGetDeploymentInput(v *GetDeploymentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DeploymentId == nil || len(*v.DeploymentId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member deploymentId must not be empty")} } if v.DeploymentId != nil { if err := encoder.SetURI("deploymentId").String(*v.DeploymentId); err != nil { return err } } if v.Embed != nil { for i := range v.Embed { encoder.AddQuery("embed").String(v.Embed[i]) } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetDeployments struct { } func (*awsRestjson1_serializeOpGetDeployments) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDeployments) 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.(*GetDeploymentsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments") 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_serializeOpHttpBindingsGetDeploymentsInput(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_serializeOpHttpBindingsGetDeploymentsInput(v *GetDeploymentsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetDocumentationPart struct { } func (*awsRestjson1_serializeOpGetDocumentationPart) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDocumentationPart) 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.(*GetDocumentationPartInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts/{documentationPartId}") 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_serializeOpHttpBindingsGetDocumentationPartInput(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_serializeOpHttpBindingsGetDocumentationPartInput(v *GetDocumentationPartInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DocumentationPartId == nil || len(*v.DocumentationPartId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member documentationPartId must not be empty")} } if v.DocumentationPartId != nil { if err := encoder.SetURI("documentationPartId").String(*v.DocumentationPartId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetDocumentationParts struct { } func (*awsRestjson1_serializeOpGetDocumentationParts) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDocumentationParts) 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.(*GetDocumentationPartsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts") 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_serializeOpHttpBindingsGetDocumentationPartsInput(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_serializeOpHttpBindingsGetDocumentationPartsInput(v *GetDocumentationPartsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if len(v.LocationStatus) > 0 { encoder.SetQuery("locationStatus").String(string(v.LocationStatus)) } if v.NameQuery != nil { encoder.SetQuery("name").String(*v.NameQuery) } if v.Path != nil { encoder.SetQuery("path").String(*v.Path) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if len(v.Type) > 0 { encoder.SetQuery("type").String(string(v.Type)) } return nil } type awsRestjson1_serializeOpGetDocumentationVersion struct { } func (*awsRestjson1_serializeOpGetDocumentationVersion) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDocumentationVersion) 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.(*GetDocumentationVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions/{documentationVersion}") 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_serializeOpHttpBindingsGetDocumentationVersionInput(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_serializeOpHttpBindingsGetDocumentationVersionInput(v *GetDocumentationVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DocumentationVersion == nil || len(*v.DocumentationVersion) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member documentationVersion must not be empty")} } if v.DocumentationVersion != nil { if err := encoder.SetURI("documentationVersion").String(*v.DocumentationVersion); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetDocumentationVersions struct { } func (*awsRestjson1_serializeOpGetDocumentationVersions) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDocumentationVersions) 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.(*GetDocumentationVersionsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions") 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_serializeOpHttpBindingsGetDocumentationVersionsInput(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_serializeOpHttpBindingsGetDocumentationVersionsInput(v *GetDocumentationVersionsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetDomainName struct { } func (*awsRestjson1_serializeOpGetDomainName) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDomainName) 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.(*GetDomainNameInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}") 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_serializeOpHttpBindingsGetDomainNameInput(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_serializeOpHttpBindingsGetDomainNameInput(v *GetDomainNameInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetDomainNames struct { } func (*awsRestjson1_serializeOpGetDomainNames) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetDomainNames) 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.(*GetDomainNamesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames") 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_serializeOpHttpBindingsGetDomainNamesInput(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_serializeOpHttpBindingsGetDomainNamesInput(v *GetDomainNamesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpGetExport struct { } func (*awsRestjson1_serializeOpGetExport) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetExport) 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.(*GetExportInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/exports/{exportType}") 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_serializeOpHttpBindingsGetExportInput(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_serializeOpHttpBindingsGetExportInput(v *GetExportInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Accepts != nil && len(*v.Accepts) > 0 { locationName := "Accept" encoder.SetHeader(locationName).String(*v.Accepts) } if v.ExportType == nil || len(*v.ExportType) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member exportType must not be empty")} } if v.ExportType != nil { if err := encoder.SetURI("exportType").String(*v.ExportType); err != nil { return err } } if v.Parameters != nil { for qkey, qvalue := range v.Parameters { if encoder.HasQuery(qkey) { continue } encoder.SetQuery(qkey).String(qvalue) } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StageName == nil || len(*v.StageName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")} } if v.StageName != nil { if err := encoder.SetURI("stageName").String(*v.StageName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetGatewayResponse struct { } func (*awsRestjson1_serializeOpGetGatewayResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetGatewayResponse) 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.(*GetGatewayResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}") 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_serializeOpHttpBindingsGetGatewayResponseInput(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_serializeOpHttpBindingsGetGatewayResponseInput(v *GetGatewayResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if len(v.ResponseType) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")} } if len(v.ResponseType) > 0 { if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetGatewayResponses struct { } func (*awsRestjson1_serializeOpGetGatewayResponses) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetGatewayResponses) 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.(*GetGatewayResponsesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses") 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_serializeOpHttpBindingsGetGatewayResponsesInput(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_serializeOpHttpBindingsGetGatewayResponsesInput(v *GetGatewayResponsesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetIntegration struct { } func (*awsRestjson1_serializeOpGetIntegration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetIntegration) 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.(*GetIntegrationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration") 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_serializeOpHttpBindingsGetIntegrationInput(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_serializeOpHttpBindingsGetIntegrationInput(v *GetIntegrationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetIntegrationResponse struct { } func (*awsRestjson1_serializeOpGetIntegrationResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetIntegrationResponse) 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.(*GetIntegrationResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}") 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_serializeOpHttpBindingsGetIntegrationResponseInput(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_serializeOpHttpBindingsGetIntegrationResponseInput(v *GetIntegrationResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetMethod struct { } func (*awsRestjson1_serializeOpGetMethod) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetMethod) 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.(*GetMethodInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}") 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_serializeOpHttpBindingsGetMethodInput(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_serializeOpHttpBindingsGetMethodInput(v *GetMethodInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetMethodResponse struct { } func (*awsRestjson1_serializeOpGetMethodResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetMethodResponse) 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.(*GetMethodResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}") 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_serializeOpHttpBindingsGetMethodResponseInput(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_serializeOpHttpBindingsGetMethodResponseInput(v *GetMethodResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetModel struct { } func (*awsRestjson1_serializeOpGetModel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetModel) 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.(*GetModelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}") 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_serializeOpHttpBindingsGetModelInput(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_serializeOpHttpBindingsGetModelInput(v *GetModelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Flatten { encoder.SetQuery("flatten").Boolean(v.Flatten) } if v.ModelName == nil || len(*v.ModelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")} } if v.ModelName != nil { if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetModels struct { } func (*awsRestjson1_serializeOpGetModels) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetModels) 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.(*GetModelsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models") 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_serializeOpHttpBindingsGetModelsInput(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_serializeOpHttpBindingsGetModelsInput(v *GetModelsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetModelTemplate struct { } func (*awsRestjson1_serializeOpGetModelTemplate) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetModelTemplate) 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.(*GetModelTemplateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}/default_template") 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_serializeOpHttpBindingsGetModelTemplateInput(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_serializeOpHttpBindingsGetModelTemplateInput(v *GetModelTemplateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ModelName == nil || len(*v.ModelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")} } if v.ModelName != nil { if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetRequestValidator struct { } func (*awsRestjson1_serializeOpGetRequestValidator) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetRequestValidator) 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.(*GetRequestValidatorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators/{requestValidatorId}") 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_serializeOpHttpBindingsGetRequestValidatorInput(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_serializeOpHttpBindingsGetRequestValidatorInput(v *GetRequestValidatorInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RequestValidatorId == nil || len(*v.RequestValidatorId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member requestValidatorId must not be empty")} } if v.RequestValidatorId != nil { if err := encoder.SetURI("requestValidatorId").String(*v.RequestValidatorId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetRequestValidators struct { } func (*awsRestjson1_serializeOpGetRequestValidators) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetRequestValidators) 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.(*GetRequestValidatorsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators") 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_serializeOpHttpBindingsGetRequestValidatorsInput(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_serializeOpHttpBindingsGetRequestValidatorsInput(v *GetRequestValidatorsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetResource struct { } func (*awsRestjson1_serializeOpGetResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetResource) 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.(*GetResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}") 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_serializeOpHttpBindingsGetResourceInput(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_serializeOpHttpBindingsGetResourceInput(v *GetResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Embed != nil { for i := range v.Embed { encoder.AddQuery("embed").String(v.Embed[i]) } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetResources struct { } func (*awsRestjson1_serializeOpGetResources) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetResources) 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.(*GetResourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources") 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_serializeOpHttpBindingsGetResourcesInput(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_serializeOpHttpBindingsGetResourcesInput(v *GetResourcesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Embed != nil { for i := range v.Embed { encoder.AddQuery("embed").String(v.Embed[i]) } } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetRestApi struct { } func (*awsRestjson1_serializeOpGetRestApi) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetRestApi) 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.(*GetRestApiInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}") 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_serializeOpHttpBindingsGetRestApiInput(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_serializeOpHttpBindingsGetRestApiInput(v *GetRestApiInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetRestApis struct { } func (*awsRestjson1_serializeOpGetRestApis) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetRestApis) 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.(*GetRestApisInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis") 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_serializeOpHttpBindingsGetRestApisInput(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_serializeOpHttpBindingsGetRestApisInput(v *GetRestApisInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpGetSdk struct { } func (*awsRestjson1_serializeOpGetSdk) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetSdk) 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.(*GetSdkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}/sdks/{sdkType}") 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_serializeOpHttpBindingsGetSdkInput(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_serializeOpHttpBindingsGetSdkInput(v *GetSdkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Parameters != nil { for qkey, qvalue := range v.Parameters { if encoder.HasQuery(qkey) { continue } encoder.SetQuery(qkey).String(qvalue) } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.SdkType == nil || len(*v.SdkType) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member sdkType must not be empty")} } if v.SdkType != nil { if err := encoder.SetURI("sdkType").String(*v.SdkType); err != nil { return err } } if v.StageName == nil || len(*v.StageName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")} } if v.StageName != nil { if err := encoder.SetURI("stageName").String(*v.StageName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetSdkType struct { } func (*awsRestjson1_serializeOpGetSdkType) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetSdkType) 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.(*GetSdkTypeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/sdktypes/{id}") 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_serializeOpHttpBindingsGetSdkTypeInput(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_serializeOpHttpBindingsGetSdkTypeInput(v *GetSdkTypeInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Id == nil || len(*v.Id) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member id must not be empty")} } if v.Id != nil { if err := encoder.SetURI("id").String(*v.Id); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetSdkTypes struct { } func (*awsRestjson1_serializeOpGetSdkTypes) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetSdkTypes) 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.(*GetSdkTypesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/sdktypes") 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_serializeOpHttpBindingsGetSdkTypesInput(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_serializeOpHttpBindingsGetSdkTypesInput(v *GetSdkTypesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpGetStage struct { } func (*awsRestjson1_serializeOpGetStage) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetStage) 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.(*GetStageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}") 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_serializeOpHttpBindingsGetStageInput(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_serializeOpHttpBindingsGetStageInput(v *GetStageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StageName == nil || len(*v.StageName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")} } if v.StageName != nil { if err := encoder.SetURI("stageName").String(*v.StageName); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetStages struct { } func (*awsRestjson1_serializeOpGetStages) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetStages) 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.(*GetStagesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages") 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_serializeOpHttpBindingsGetStagesInput(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_serializeOpHttpBindingsGetStagesInput(v *GetStagesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DeploymentId != nil { encoder.SetQuery("deploymentId").String(*v.DeploymentId) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetTags struct { } func (*awsRestjson1_serializeOpGetTags) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetTags) 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.(*GetTagsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") 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_serializeOpHttpBindingsGetTagsInput(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_serializeOpHttpBindingsGetTagsInput(v *GetTagsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetUsage struct { } func (*awsRestjson1_serializeOpGetUsage) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetUsage) 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.(*GetUsageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/usage") 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_serializeOpHttpBindingsGetUsageInput(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_serializeOpHttpBindingsGetUsageInput(v *GetUsageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.EndDate != nil { encoder.SetQuery("endDate").String(*v.EndDate) } if v.KeyId != nil { encoder.SetQuery("keyId").String(*v.KeyId) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.StartDate != nil { encoder.SetQuery("startDate").String(*v.StartDate) } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetUsagePlan struct { } func (*awsRestjson1_serializeOpGetUsagePlan) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetUsagePlan) 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.(*GetUsagePlanInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}") 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_serializeOpHttpBindingsGetUsagePlanInput(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_serializeOpHttpBindingsGetUsagePlanInput(v *GetUsagePlanInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetUsagePlanKey struct { } func (*awsRestjson1_serializeOpGetUsagePlanKey) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetUsagePlanKey) 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.(*GetUsagePlanKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys/{keyId}") 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_serializeOpHttpBindingsGetUsagePlanKeyInput(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_serializeOpHttpBindingsGetUsagePlanKeyInput(v *GetUsagePlanKeyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.KeyId == nil || len(*v.KeyId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member keyId must not be empty")} } if v.KeyId != nil { if err := encoder.SetURI("keyId").String(*v.KeyId); err != nil { return err } } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetUsagePlanKeys struct { } func (*awsRestjson1_serializeOpGetUsagePlanKeys) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetUsagePlanKeys) 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.(*GetUsagePlanKeysInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys") 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_serializeOpHttpBindingsGetUsagePlanKeysInput(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_serializeOpHttpBindingsGetUsagePlanKeysInput(v *GetUsagePlanKeysInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.NameQuery != nil { encoder.SetQuery("name").String(*v.NameQuery) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetUsagePlans struct { } func (*awsRestjson1_serializeOpGetUsagePlans) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetUsagePlans) 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.(*GetUsagePlansInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans") 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_serializeOpHttpBindingsGetUsagePlansInput(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_serializeOpHttpBindingsGetUsagePlansInput(v *GetUsagePlansInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.KeyId != nil { encoder.SetQuery("keyId").String(*v.KeyId) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpGetVpcLink struct { } func (*awsRestjson1_serializeOpGetVpcLink) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetVpcLink) 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.(*GetVpcLinkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/vpclinks/{vpcLinkId}") 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_serializeOpHttpBindingsGetVpcLinkInput(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_serializeOpHttpBindingsGetVpcLinkInput(v *GetVpcLinkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.VpcLinkId == nil || len(*v.VpcLinkId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member vpcLinkId must not be empty")} } if v.VpcLinkId != nil { if err := encoder.SetURI("vpcLinkId").String(*v.VpcLinkId); err != nil { return err } } return nil } type awsRestjson1_serializeOpGetVpcLinks struct { } func (*awsRestjson1_serializeOpGetVpcLinks) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpGetVpcLinks) 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.(*GetVpcLinksInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/vpclinks") 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_serializeOpHttpBindingsGetVpcLinksInput(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_serializeOpHttpBindingsGetVpcLinksInput(v *GetVpcLinksInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.Limit != nil { encoder.SetQuery("limit").Integer(*v.Limit) } if v.Position != nil { encoder.SetQuery("position").String(*v.Position) } return nil } type awsRestjson1_serializeOpImportApiKeys struct { } func (*awsRestjson1_serializeOpImportApiKeys) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpImportApiKeys) 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.(*ImportApiKeysInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/apikeys?mode=import") 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_serializeOpHttpBindingsImportApiKeysInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if input.Body != nil { if !restEncoder.HasHeader("Content-Type") { restEncoder.SetHeader("Content-Type").String("application/octet-stream") } payload := bytes.NewReader(input.Body) 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_serializeOpHttpBindingsImportApiKeysInput(v *ImportApiKeysInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.FailOnWarnings { encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings) } if len(v.Format) > 0 { encoder.SetQuery("format").String(string(v.Format)) } return nil } type awsRestjson1_serializeOpImportDocumentationParts struct { } func (*awsRestjson1_serializeOpImportDocumentationParts) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpImportDocumentationParts) 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.(*ImportDocumentationPartsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts") 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_serializeOpHttpBindingsImportDocumentationPartsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if input.Body != nil { if !restEncoder.HasHeader("Content-Type") { restEncoder.SetHeader("Content-Type").String("application/octet-stream") } payload := bytes.NewReader(input.Body) 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_serializeOpHttpBindingsImportDocumentationPartsInput(v *ImportDocumentationPartsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.FailOnWarnings { encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings) } if len(v.Mode) > 0 { encoder.SetQuery("mode").String(string(v.Mode)) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpImportRestApi struct { } func (*awsRestjson1_serializeOpImportRestApi) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpImportRestApi) 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.(*ImportRestApiInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis?mode=import") 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_serializeOpHttpBindingsImportRestApiInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if input.Body != nil { if !restEncoder.HasHeader("Content-Type") { restEncoder.SetHeader("Content-Type").String("application/octet-stream") } payload := bytes.NewReader(input.Body) 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_serializeOpHttpBindingsImportRestApiInput(v *ImportRestApiInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.FailOnWarnings { encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings) } if v.Parameters != nil { for qkey, qvalue := range v.Parameters { if encoder.HasQuery(qkey) { continue } encoder.SetQuery(qkey).String(qvalue) } } return nil } type awsRestjson1_serializeOpPutGatewayResponse struct { } func (*awsRestjson1_serializeOpPutGatewayResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutGatewayResponse) 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.(*PutGatewayResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}") 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_serializeOpHttpBindingsPutGatewayResponseInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutGatewayResponseInput(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_serializeOpHttpBindingsPutGatewayResponseInput(v *PutGatewayResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if len(v.ResponseType) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")} } if len(v.ResponseType) > 0 { if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutGatewayResponseInput(v *PutGatewayResponseInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResponseParameters != nil { ok := object.Key("responseParameters") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseParameters, ok); err != nil { return err } } if v.ResponseTemplates != nil { ok := object.Key("responseTemplates") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseTemplates, ok); err != nil { return err } } if v.StatusCode != nil { ok := object.Key("statusCode") ok.String(*v.StatusCode) } return nil } type awsRestjson1_serializeOpPutIntegration struct { } func (*awsRestjson1_serializeOpPutIntegration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutIntegration) 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.(*PutIntegrationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration") 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_serializeOpHttpBindingsPutIntegrationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutIntegrationInput(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_serializeOpHttpBindingsPutIntegrationInput(v *PutIntegrationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutIntegrationInput(v *PutIntegrationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.CacheKeyParameters != nil { ok := object.Key("cacheKeyParameters") if err := awsRestjson1_serializeDocumentListOfString(v.CacheKeyParameters, ok); err != nil { return err } } if v.CacheNamespace != nil { ok := object.Key("cacheNamespace") ok.String(*v.CacheNamespace) } if v.ConnectionId != nil { ok := object.Key("connectionId") ok.String(*v.ConnectionId) } if len(v.ConnectionType) > 0 { ok := object.Key("connectionType") ok.String(string(v.ConnectionType)) } if len(v.ContentHandling) > 0 { ok := object.Key("contentHandling") ok.String(string(v.ContentHandling)) } if v.Credentials != nil { ok := object.Key("credentials") ok.String(*v.Credentials) } if v.IntegrationHttpMethod != nil { ok := object.Key("httpMethod") ok.String(*v.IntegrationHttpMethod) } if v.PassthroughBehavior != nil { ok := object.Key("passthroughBehavior") ok.String(*v.PassthroughBehavior) } if v.RequestParameters != nil { ok := object.Key("requestParameters") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.RequestParameters, ok); err != nil { return err } } if v.RequestTemplates != nil { ok := object.Key("requestTemplates") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.RequestTemplates, ok); err != nil { return err } } if v.TimeoutInMillis != nil { ok := object.Key("timeoutInMillis") ok.Integer(*v.TimeoutInMillis) } if v.TlsConfig != nil { ok := object.Key("tlsConfig") if err := awsRestjson1_serializeDocumentTlsConfig(v.TlsConfig, ok); err != nil { return err } } if len(v.Type) > 0 { ok := object.Key("type") ok.String(string(v.Type)) } if v.Uri != nil { ok := object.Key("uri") ok.String(*v.Uri) } return nil } type awsRestjson1_serializeOpPutIntegrationResponse struct { } func (*awsRestjson1_serializeOpPutIntegrationResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutIntegrationResponse) 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.(*PutIntegrationResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}") 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_serializeOpHttpBindingsPutIntegrationResponseInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutIntegrationResponseInput(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_serializeOpHttpBindingsPutIntegrationResponseInput(v *PutIntegrationResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutIntegrationResponseInput(v *PutIntegrationResponseInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if len(v.ContentHandling) > 0 { ok := object.Key("contentHandling") ok.String(string(v.ContentHandling)) } if v.ResponseParameters != nil { ok := object.Key("responseParameters") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseParameters, ok); err != nil { return err } } if v.ResponseTemplates != nil { ok := object.Key("responseTemplates") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseTemplates, ok); err != nil { return err } } if v.SelectionPattern != nil { ok := object.Key("selectionPattern") ok.String(*v.SelectionPattern) } return nil } type awsRestjson1_serializeOpPutMethod struct { } func (*awsRestjson1_serializeOpPutMethod) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutMethod) 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.(*PutMethodInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}") 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_serializeOpHttpBindingsPutMethodInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutMethodInput(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_serializeOpHttpBindingsPutMethodInput(v *PutMethodInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutMethodInput(v *PutMethodInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApiKeyRequired { ok := object.Key("apiKeyRequired") ok.Boolean(v.ApiKeyRequired) } if v.AuthorizationScopes != nil { ok := object.Key("authorizationScopes") if err := awsRestjson1_serializeDocumentListOfString(v.AuthorizationScopes, ok); err != nil { return err } } if v.AuthorizationType != nil { ok := object.Key("authorizationType") ok.String(*v.AuthorizationType) } if v.AuthorizerId != nil { ok := object.Key("authorizerId") ok.String(*v.AuthorizerId) } if v.OperationName != nil { ok := object.Key("operationName") ok.String(*v.OperationName) } if v.RequestModels != nil { ok := object.Key("requestModels") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.RequestModels, ok); err != nil { return err } } if v.RequestParameters != nil { ok := object.Key("requestParameters") if err := awsRestjson1_serializeDocumentMapOfStringToBoolean(v.RequestParameters, ok); err != nil { return err } } if v.RequestValidatorId != nil { ok := object.Key("requestValidatorId") ok.String(*v.RequestValidatorId) } return nil } type awsRestjson1_serializeOpPutMethodResponse struct { } func (*awsRestjson1_serializeOpPutMethodResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutMethodResponse) 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.(*PutMethodResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}") 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_serializeOpHttpBindingsPutMethodResponseInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentPutMethodResponseInput(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_serializeOpHttpBindingsPutMethodResponseInput(v *PutMethodResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentPutMethodResponseInput(v *PutMethodResponseInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ResponseModels != nil { ok := object.Key("responseModels") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.ResponseModels, ok); err != nil { return err } } if v.ResponseParameters != nil { ok := object.Key("responseParameters") if err := awsRestjson1_serializeDocumentMapOfStringToBoolean(v.ResponseParameters, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpPutRestApi struct { } func (*awsRestjson1_serializeOpPutRestApi) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpPutRestApi) 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.(*PutRestApiInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}") 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_serializeOpHttpBindingsPutRestApiInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if input.Body != nil { if !restEncoder.HasHeader("Content-Type") { restEncoder.SetHeader("Content-Type").String("application/octet-stream") } payload := bytes.NewReader(input.Body) 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_serializeOpHttpBindingsPutRestApiInput(v *PutRestApiInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.FailOnWarnings { encoder.SetQuery("failonwarnings").Boolean(v.FailOnWarnings) } if len(v.Mode) > 0 { encoder.SetQuery("mode").String(string(v.Mode)) } if v.Parameters != nil { for qkey, qvalue := range v.Parameters { if encoder.HasQuery(qkey) { continue } encoder.SetQuery(qkey).String(qvalue) } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } type awsRestjson1_serializeOpTagResource struct { } func (*awsRestjson1_serializeOpTagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*TagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") 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_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request return next.HandleSerialize(ctx, in) } func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Tags != nil { ok := object.Key("tags") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Tags, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpTestInvokeAuthorizer struct { } func (*awsRestjson1_serializeOpTestInvokeAuthorizer) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpTestInvokeAuthorizer) 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.(*TestInvokeAuthorizerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}") 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_serializeOpHttpBindingsTestInvokeAuthorizerInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTestInvokeAuthorizerInput(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_serializeOpHttpBindingsTestInvokeAuthorizerInput(v *TestInvokeAuthorizerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")} } if v.AuthorizerId != nil { if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentTestInvokeAuthorizerInput(v *TestInvokeAuthorizerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.AdditionalContext != nil { ok := object.Key("additionalContext") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.AdditionalContext, ok); err != nil { return err } } if v.Body != nil { ok := object.Key("body") ok.String(*v.Body) } if v.Headers != nil { ok := object.Key("headers") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Headers, ok); err != nil { return err } } if v.MultiValueHeaders != nil { ok := object.Key("multiValueHeaders") if err := awsRestjson1_serializeDocumentMapOfStringToList(v.MultiValueHeaders, ok); err != nil { return err } } if v.PathWithQueryString != nil { ok := object.Key("pathWithQueryString") ok.String(*v.PathWithQueryString) } if v.StageVariables != nil { ok := object.Key("stageVariables") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariables, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpTestInvokeMethod struct { } func (*awsRestjson1_serializeOpTestInvokeMethod) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpTestInvokeMethod) 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.(*TestInvokeMethodInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}") 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_serializeOpHttpBindingsTestInvokeMethodInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentTestInvokeMethodInput(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_serializeOpHttpBindingsTestInvokeMethodInput(v *TestInvokeMethodInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentTestInvokeMethodInput(v *TestInvokeMethodInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Body != nil { ok := object.Key("body") ok.String(*v.Body) } if v.ClientCertificateId != nil { ok := object.Key("clientCertificateId") ok.String(*v.ClientCertificateId) } if v.Headers != nil { ok := object.Key("headers") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.Headers, ok); err != nil { return err } } if v.MultiValueHeaders != nil { ok := object.Key("multiValueHeaders") if err := awsRestjson1_serializeDocumentMapOfStringToList(v.MultiValueHeaders, ok); err != nil { return err } } if v.PathWithQueryString != nil { ok := object.Key("pathWithQueryString") ok.String(*v.PathWithQueryString) } if v.StageVariables != nil { ok := object.Key("stageVariables") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariables, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUntagResource struct { } func (*awsRestjson1_serializeOpUntagResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } input, ok := in.Parameters.(*UntagResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" 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_serializeOpHttpBindingsUntagResourceInput(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_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} } if v.ResourceArn != nil { if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { return err } } if v.TagKeys != nil { for i := range v.TagKeys { encoder.AddQuery("tagKeys").String(v.TagKeys[i]) } } return nil } type awsRestjson1_serializeOpUpdateAccount struct { } func (*awsRestjson1_serializeOpUpdateAccount) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateAccount) 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.(*UpdateAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/account") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpDocumentUpdateAccountInput(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_serializeOpHttpBindingsUpdateAccountInput(v *UpdateAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } return nil } func awsRestjson1_serializeOpDocumentUpdateAccountInput(v *UpdateAccountInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateApiKey struct { } func (*awsRestjson1_serializeOpUpdateApiKey) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateApiKey) 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.(*UpdateApiKeyInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/apikeys/{apiKey}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateApiKeyInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateApiKeyInput(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_serializeOpHttpBindingsUpdateApiKeyInput(v *UpdateApiKeyInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ApiKey == nil || len(*v.ApiKey) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member apiKey must not be empty")} } if v.ApiKey != nil { if err := encoder.SetURI("apiKey").String(*v.ApiKey); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateApiKeyInput(v *UpdateApiKeyInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateAuthorizer struct { } func (*awsRestjson1_serializeOpUpdateAuthorizer) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateAuthorizer) 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.(*UpdateAuthorizerInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/authorizers/{authorizerId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateAuthorizerInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateAuthorizerInput(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_serializeOpHttpBindingsUpdateAuthorizerInput(v *UpdateAuthorizerInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.AuthorizerId == nil || len(*v.AuthorizerId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member authorizerId must not be empty")} } if v.AuthorizerId != nil { if err := encoder.SetURI("authorizerId").String(*v.AuthorizerId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateAuthorizerInput(v *UpdateAuthorizerInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateBasePathMapping struct { } func (*awsRestjson1_serializeOpUpdateBasePathMapping) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateBasePathMapping) 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.(*UpdateBasePathMappingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}/basepathmappings/{basePath}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateBasePathMappingInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateBasePathMappingInput(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_serializeOpHttpBindingsUpdateBasePathMappingInput(v *UpdateBasePathMappingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.BasePath == nil || len(*v.BasePath) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member basePath must not be empty")} } if v.BasePath != nil { if err := encoder.SetURI("basePath").String(*v.BasePath); err != nil { return err } } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateBasePathMappingInput(v *UpdateBasePathMappingInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateClientCertificate struct { } func (*awsRestjson1_serializeOpUpdateClientCertificate) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateClientCertificate) 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.(*UpdateClientCertificateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/clientcertificates/{clientCertificateId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateClientCertificateInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateClientCertificateInput(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_serializeOpHttpBindingsUpdateClientCertificateInput(v *UpdateClientCertificateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ClientCertificateId == nil || len(*v.ClientCertificateId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member clientCertificateId must not be empty")} } if v.ClientCertificateId != nil { if err := encoder.SetURI("clientCertificateId").String(*v.ClientCertificateId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateClientCertificateInput(v *UpdateClientCertificateInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateDeployment struct { } func (*awsRestjson1_serializeOpUpdateDeployment) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateDeployment) 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.(*UpdateDeploymentInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/deployments/{deploymentId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateDeploymentInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateDeploymentInput(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_serializeOpHttpBindingsUpdateDeploymentInput(v *UpdateDeploymentInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DeploymentId == nil || len(*v.DeploymentId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member deploymentId must not be empty")} } if v.DeploymentId != nil { if err := encoder.SetURI("deploymentId").String(*v.DeploymentId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateDeploymentInput(v *UpdateDeploymentInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateDocumentationPart struct { } func (*awsRestjson1_serializeOpUpdateDocumentationPart) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateDocumentationPart) 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.(*UpdateDocumentationPartInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/parts/{documentationPartId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateDocumentationPartInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateDocumentationPartInput(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_serializeOpHttpBindingsUpdateDocumentationPartInput(v *UpdateDocumentationPartInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DocumentationPartId == nil || len(*v.DocumentationPartId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member documentationPartId must not be empty")} } if v.DocumentationPartId != nil { if err := encoder.SetURI("documentationPartId").String(*v.DocumentationPartId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateDocumentationPartInput(v *UpdateDocumentationPartInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateDocumentationVersion struct { } func (*awsRestjson1_serializeOpUpdateDocumentationVersion) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateDocumentationVersion) 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.(*UpdateDocumentationVersionInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/documentation/versions/{documentationVersion}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateDocumentationVersionInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateDocumentationVersionInput(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_serializeOpHttpBindingsUpdateDocumentationVersionInput(v *UpdateDocumentationVersionInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DocumentationVersion == nil || len(*v.DocumentationVersion) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member documentationVersion must not be empty")} } if v.DocumentationVersion != nil { if err := encoder.SetURI("documentationVersion").String(*v.DocumentationVersion); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateDocumentationVersionInput(v *UpdateDocumentationVersionInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateDomainName struct { } func (*awsRestjson1_serializeOpUpdateDomainName) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateDomainName) 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.(*UpdateDomainNameInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/domainnames/{domainName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateDomainNameInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateDomainNameInput(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_serializeOpHttpBindingsUpdateDomainNameInput(v *UpdateDomainNameInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.DomainName == nil || len(*v.DomainName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member domainName must not be empty")} } if v.DomainName != nil { if err := encoder.SetURI("domainName").String(*v.DomainName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateDomainNameInput(v *UpdateDomainNameInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateGatewayResponse struct { } func (*awsRestjson1_serializeOpUpdateGatewayResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateGatewayResponse) 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.(*UpdateGatewayResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/gatewayresponses/{responseType}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateGatewayResponseInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateGatewayResponseInput(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_serializeOpHttpBindingsUpdateGatewayResponseInput(v *UpdateGatewayResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if len(v.ResponseType) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member responseType must not be empty")} } if len(v.ResponseType) > 0 { if err := encoder.SetURI("responseType").String(string(v.ResponseType)); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateGatewayResponseInput(v *UpdateGatewayResponseInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateIntegration struct { } func (*awsRestjson1_serializeOpUpdateIntegration) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateIntegration) 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.(*UpdateIntegrationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateIntegrationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateIntegrationInput(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_serializeOpHttpBindingsUpdateIntegrationInput(v *UpdateIntegrationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateIntegrationInput(v *UpdateIntegrationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateIntegrationResponse struct { } func (*awsRestjson1_serializeOpUpdateIntegrationResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateIntegrationResponse) 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.(*UpdateIntegrationResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/integration/responses/{statusCode}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateIntegrationResponseInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateIntegrationResponseInput(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_serializeOpHttpBindingsUpdateIntegrationResponseInput(v *UpdateIntegrationResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateIntegrationResponseInput(v *UpdateIntegrationResponseInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateMethod struct { } func (*awsRestjson1_serializeOpUpdateMethod) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateMethod) 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.(*UpdateMethodInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateMethodInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateMethodInput(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_serializeOpHttpBindingsUpdateMethodInput(v *UpdateMethodInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateMethodInput(v *UpdateMethodInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateMethodResponse struct { } func (*awsRestjson1_serializeOpUpdateMethodResponse) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateMethodResponse) 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.(*UpdateMethodResponseInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}/methods/{httpMethod}/responses/{statusCode}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateMethodResponseInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateMethodResponseInput(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_serializeOpHttpBindingsUpdateMethodResponseInput(v *UpdateMethodResponseInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.HttpMethod == nil || len(*v.HttpMethod) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member httpMethod must not be empty")} } if v.HttpMethod != nil { if err := encoder.SetURI("httpMethod").String(*v.HttpMethod); err != nil { return err } } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StatusCode == nil || len(*v.StatusCode) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member statusCode must not be empty")} } if v.StatusCode != nil { if err := encoder.SetURI("statusCode").String(*v.StatusCode); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateMethodResponseInput(v *UpdateMethodResponseInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateModel struct { } func (*awsRestjson1_serializeOpUpdateModel) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateModel) 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.(*UpdateModelInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/models/{modelName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateModelInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateModelInput(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_serializeOpHttpBindingsUpdateModelInput(v *UpdateModelInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ModelName == nil || len(*v.ModelName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member modelName must not be empty")} } if v.ModelName != nil { if err := encoder.SetURI("modelName").String(*v.ModelName); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateModelInput(v *UpdateModelInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateRequestValidator struct { } func (*awsRestjson1_serializeOpUpdateRequestValidator) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateRequestValidator) 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.(*UpdateRequestValidatorInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/requestvalidators/{requestValidatorId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateRequestValidatorInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateRequestValidatorInput(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_serializeOpHttpBindingsUpdateRequestValidatorInput(v *UpdateRequestValidatorInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RequestValidatorId == nil || len(*v.RequestValidatorId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member requestValidatorId must not be empty")} } if v.RequestValidatorId != nil { if err := encoder.SetURI("requestValidatorId").String(*v.RequestValidatorId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateRequestValidatorInput(v *UpdateRequestValidatorInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateResource struct { } func (*awsRestjson1_serializeOpUpdateResource) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateResource) 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.(*UpdateResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/resources/{resourceId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateResourceInput(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_serializeOpHttpBindingsUpdateResourceInput(v *UpdateResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.ResourceId == nil || len(*v.ResourceId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member resourceId must not be empty")} } if v.ResourceId != nil { if err := encoder.SetURI("resourceId").String(*v.ResourceId); err != nil { return err } } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateResourceInput(v *UpdateResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateRestApi struct { } func (*awsRestjson1_serializeOpUpdateRestApi) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateRestApi) 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.(*UpdateRestApiInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateRestApiInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateRestApiInput(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_serializeOpHttpBindingsUpdateRestApiInput(v *UpdateRestApiInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateRestApiInput(v *UpdateRestApiInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateStage struct { } func (*awsRestjson1_serializeOpUpdateStage) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateStage) 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.(*UpdateStageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/restapis/{restApiId}/stages/{stageName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateStageInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateStageInput(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_serializeOpHttpBindingsUpdateStageInput(v *UpdateStageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.RestApiId == nil || len(*v.RestApiId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member restApiId must not be empty")} } if v.RestApiId != nil { if err := encoder.SetURI("restApiId").String(*v.RestApiId); err != nil { return err } } if v.StageName == nil || len(*v.StageName) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member stageName must not be empty")} } if v.StageName != nil { if err := encoder.SetURI("stageName").String(*v.StageName); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateStageInput(v *UpdateStageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateUsage struct { } func (*awsRestjson1_serializeOpUpdateUsage) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateUsage) 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.(*UpdateUsageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}/keys/{keyId}/usage") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateUsageInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateUsageInput(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_serializeOpHttpBindingsUpdateUsageInput(v *UpdateUsageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.KeyId == nil || len(*v.KeyId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member keyId must not be empty")} } if v.KeyId != nil { if err := encoder.SetURI("keyId").String(*v.KeyId); err != nil { return err } } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateUsageInput(v *UpdateUsageInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateUsagePlan struct { } func (*awsRestjson1_serializeOpUpdateUsagePlan) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateUsagePlan) 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.(*UpdateUsagePlanInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/usageplans/{usagePlanId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateUsagePlanInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateUsagePlanInput(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_serializeOpHttpBindingsUpdateUsagePlanInput(v *UpdateUsagePlanInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.UsagePlanId == nil || len(*v.UsagePlanId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member usagePlanId must not be empty")} } if v.UsagePlanId != nil { if err := encoder.SetURI("usagePlanId").String(*v.UsagePlanId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateUsagePlanInput(v *UpdateUsagePlanInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } type awsRestjson1_serializeOpUpdateVpcLink struct { } func (*awsRestjson1_serializeOpUpdateVpcLink) ID() string { return "OperationSerializer" } func (m *awsRestjson1_serializeOpUpdateVpcLink) 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.(*UpdateVpcLinkInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } opPath, opQuery := httpbinding.SplitURI("/vpclinks/{vpcLinkId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "PATCH" 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_serializeOpHttpBindingsUpdateVpcLinkInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() if err := awsRestjson1_serializeOpDocumentUpdateVpcLinkInput(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_serializeOpHttpBindingsUpdateVpcLinkInput(v *UpdateVpcLinkInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } if v.VpcLinkId == nil || len(*v.VpcLinkId) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member vpcLinkId must not be empty")} } if v.VpcLinkId != nil { if err := encoder.SetURI("vpcLinkId").String(*v.VpcLinkId); err != nil { return err } } return nil } func awsRestjson1_serializeOpDocumentUpdateVpcLinkInput(v *UpdateVpcLinkInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PatchOperations != nil { ok := object.Key("patchOperations") if err := awsRestjson1_serializeDocumentListOfPatchOperation(v.PatchOperations, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentApiStage(v *types.ApiStage, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.ApiId != nil { ok := object.Key("apiId") ok.String(*v.ApiId) } if v.Stage != nil { ok := object.Key("stage") ok.String(*v.Stage) } if v.Throttle != nil { ok := object.Key("throttle") if err := awsRestjson1_serializeDocumentMapOfApiStageThrottleSettings(v.Throttle, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentCanarySettings(v *types.CanarySettings, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.DeploymentId != nil { ok := object.Key("deploymentId") ok.String(*v.DeploymentId) } if v.PercentTraffic != 0 { ok := object.Key("percentTraffic") ok.Double(v.PercentTraffic) } if v.StageVariableOverrides != nil { ok := object.Key("stageVariableOverrides") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariableOverrides, ok); err != nil { return err } } if v.UseStageCache { ok := object.Key("useStageCache") ok.Boolean(v.UseStageCache) } return nil } func awsRestjson1_serializeDocumentDeploymentCanarySettings(v *types.DeploymentCanarySettings, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.PercentTraffic != 0 { ok := object.Key("percentTraffic") ok.Double(v.PercentTraffic) } if v.StageVariableOverrides != nil { ok := object.Key("stageVariableOverrides") if err := awsRestjson1_serializeDocumentMapOfStringToString(v.StageVariableOverrides, ok); err != nil { return err } } if v.UseStageCache { ok := object.Key("useStageCache") ok.Boolean(v.UseStageCache) } return nil } func awsRestjson1_serializeDocumentDocumentationPartLocation(v *types.DocumentationPartLocation, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Method != nil { ok := object.Key("method") ok.String(*v.Method) } if v.Name != nil { ok := object.Key("name") ok.String(*v.Name) } if v.Path != nil { ok := object.Key("path") ok.String(*v.Path) } if v.StatusCode != nil { ok := object.Key("statusCode") ok.String(*v.StatusCode) } if len(v.Type) > 0 { ok := object.Key("type") ok.String(string(v.Type)) } return nil } func awsRestjson1_serializeDocumentEndpointConfiguration(v *types.EndpointConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Types != nil { ok := object.Key("types") if err := awsRestjson1_serializeDocumentListOfEndpointType(v.Types, ok); err != nil { return err } } if v.VpcEndpointIds != nil { ok := object.Key("vpcEndpointIds") if err := awsRestjson1_serializeDocumentListOfString(v.VpcEndpointIds, ok); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentListOfApiStage(v []types.ApiStage, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentApiStage(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentListOfARNs(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_serializeDocumentListOfEndpointType(v []types.EndpointType, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() av.String(string(v[i])) } return nil } func awsRestjson1_serializeDocumentListOfPatchOperation(v []types.PatchOperation, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentPatchOperation(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentListOfStageKeys(v []types.StageKey, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() if err := awsRestjson1_serializeDocumentStageKey(&v[i], av); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentListOfString(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_serializeDocumentMapOfApiStageThrottleSettings(v map[string]types.ThrottleSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) mapVar := v[key] if err := awsRestjson1_serializeDocumentThrottleSettings(&mapVar, om); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentMapOfStringToBoolean(v map[string]bool, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) om.Boolean(v[key]) } return nil } func awsRestjson1_serializeDocumentMapOfStringToList(v map[string][]string, value smithyjson.Value) error { object := value.Object() defer object.Close() for key := range v { om := object.Key(key) if vv := v[key]; vv == nil { continue } if err := awsRestjson1_serializeDocumentListOfString(v[key], om); err != nil { return err } } return nil } func awsRestjson1_serializeDocumentMapOfStringToString(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_serializeDocumentMutualTlsAuthenticationInput(v *types.MutualTlsAuthenticationInput, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.TruststoreUri != nil { ok := object.Key("truststoreUri") ok.String(*v.TruststoreUri) } if v.TruststoreVersion != nil { ok := object.Key("truststoreVersion") ok.String(*v.TruststoreVersion) } return nil } func awsRestjson1_serializeDocumentPatchOperation(v *types.PatchOperation, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.From != nil { ok := object.Key("from") ok.String(*v.From) } if len(v.Op) > 0 { ok := object.Key("op") ok.String(string(v.Op)) } if v.Path != nil { ok := object.Key("path") ok.String(*v.Path) } if v.Value != nil { ok := object.Key("value") ok.String(*v.Value) } return nil } func awsRestjson1_serializeDocumentQuotaSettings(v *types.QuotaSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.Limit != 0 { ok := object.Key("limit") ok.Integer(v.Limit) } if v.Offset != 0 { ok := object.Key("offset") ok.Integer(v.Offset) } if len(v.Period) > 0 { ok := object.Key("period") ok.String(string(v.Period)) } return nil } func awsRestjson1_serializeDocumentStageKey(v *types.StageKey, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.RestApiId != nil { ok := object.Key("restApiId") ok.String(*v.RestApiId) } if v.StageName != nil { ok := object.Key("stageName") ok.String(*v.StageName) } return nil } func awsRestjson1_serializeDocumentThrottleSettings(v *types.ThrottleSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.BurstLimit != 0 { ok := object.Key("burstLimit") ok.Integer(v.BurstLimit) } if v.RateLimit != 0 { ok := object.Key("rateLimit") ok.Double(v.RateLimit) } return nil } func awsRestjson1_serializeDocumentTlsConfig(v *types.TlsConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() if v.InsecureSkipVerification { ok := object.Key("insecureSkipVerification") ok.Boolean(v.InsecureSkipVerification) } return nil }