// Code generated by smithy-go-codegen DO NOT EDIT.

package cloudformation

import (
	"bytes"
	"context"
	"fmt"
	"github.com/aws/aws-sdk-go-v2/aws/protocol/query"
	"github.com/aws/aws-sdk-go-v2/service/cloudformation/types"
	smithy "github.com/aws/smithy-go"
	"github.com/aws/smithy-go/encoding/httpbinding"
	"github.com/aws/smithy-go/middleware"
	smithyhttp "github.com/aws/smithy-go/transport/http"
	"path"
	"sort"
)

type awsAwsquery_serializeOpActivateOrganizationsAccess struct {
}

func (*awsAwsquery_serializeOpActivateOrganizationsAccess) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpActivateOrganizationsAccess) 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.(*ActivateOrganizationsAccessInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ActivateOrganizationsAccess")
	body.Key("Version").String("2010-05-15")

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpActivateType struct {
}

func (*awsAwsquery_serializeOpActivateType) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpActivateType) 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.(*ActivateTypeInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ActivateType")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentActivateTypeInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpBatchDescribeTypeConfigurations struct {
}

func (*awsAwsquery_serializeOpBatchDescribeTypeConfigurations) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpBatchDescribeTypeConfigurations) 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.(*BatchDescribeTypeConfigurationsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("BatchDescribeTypeConfigurations")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentBatchDescribeTypeConfigurationsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCancelUpdateStack struct {
}

func (*awsAwsquery_serializeOpCancelUpdateStack) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpCancelUpdateStack) 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.(*CancelUpdateStackInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CancelUpdateStack")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentCancelUpdateStackInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpContinueUpdateRollback struct {
}

func (*awsAwsquery_serializeOpContinueUpdateRollback) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpContinueUpdateRollback) 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.(*ContinueUpdateRollbackInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ContinueUpdateRollback")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentContinueUpdateRollbackInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateChangeSet struct {
}

func (*awsAwsquery_serializeOpCreateChangeSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpCreateChangeSet) 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.(*CreateChangeSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateChangeSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentCreateChangeSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateGeneratedTemplate struct {
}

func (*awsAwsquery_serializeOpCreateGeneratedTemplate) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpCreateGeneratedTemplate) 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.(*CreateGeneratedTemplateInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateGeneratedTemplate")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentCreateGeneratedTemplateInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateStack struct {
}

func (*awsAwsquery_serializeOpCreateStack) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpCreateStack) 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.(*CreateStackInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateStack")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentCreateStackInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateStackInstances struct {
}

func (*awsAwsquery_serializeOpCreateStackInstances) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpCreateStackInstances) 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.(*CreateStackInstancesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateStackInstances")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentCreateStackInstancesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpCreateStackSet struct {
}

func (*awsAwsquery_serializeOpCreateStackSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpCreateStackSet) 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.(*CreateStackSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("CreateStackSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentCreateStackSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeactivateOrganizationsAccess struct {
}

func (*awsAwsquery_serializeOpDeactivateOrganizationsAccess) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeactivateOrganizationsAccess) 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.(*DeactivateOrganizationsAccessInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeactivateOrganizationsAccess")
	body.Key("Version").String("2010-05-15")

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeactivateType struct {
}

func (*awsAwsquery_serializeOpDeactivateType) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeactivateType) 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.(*DeactivateTypeInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeactivateType")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDeactivateTypeInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteChangeSet struct {
}

func (*awsAwsquery_serializeOpDeleteChangeSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeleteChangeSet) 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.(*DeleteChangeSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteChangeSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDeleteChangeSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteGeneratedTemplate struct {
}

func (*awsAwsquery_serializeOpDeleteGeneratedTemplate) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeleteGeneratedTemplate) 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.(*DeleteGeneratedTemplateInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteGeneratedTemplate")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDeleteGeneratedTemplateInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteStack struct {
}

func (*awsAwsquery_serializeOpDeleteStack) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeleteStack) 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.(*DeleteStackInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteStack")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDeleteStackInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteStackInstances struct {
}

func (*awsAwsquery_serializeOpDeleteStackInstances) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeleteStackInstances) 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.(*DeleteStackInstancesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteStackInstances")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDeleteStackInstancesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeleteStackSet struct {
}

func (*awsAwsquery_serializeOpDeleteStackSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeleteStackSet) 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.(*DeleteStackSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeleteStackSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDeleteStackSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDeregisterType struct {
}

func (*awsAwsquery_serializeOpDeregisterType) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDeregisterType) 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.(*DeregisterTypeInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DeregisterType")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDeregisterTypeInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeAccountLimits struct {
}

func (*awsAwsquery_serializeOpDescribeAccountLimits) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeAccountLimits) 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.(*DescribeAccountLimitsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeAccountLimits")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeAccountLimitsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeChangeSet struct {
}

func (*awsAwsquery_serializeOpDescribeChangeSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeChangeSet) 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.(*DescribeChangeSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeChangeSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeChangeSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeChangeSetHooks struct {
}

func (*awsAwsquery_serializeOpDescribeChangeSetHooks) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeChangeSetHooks) 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.(*DescribeChangeSetHooksInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeChangeSetHooks")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeChangeSetHooksInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeGeneratedTemplate struct {
}

func (*awsAwsquery_serializeOpDescribeGeneratedTemplate) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeGeneratedTemplate) 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.(*DescribeGeneratedTemplateInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeGeneratedTemplate")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeGeneratedTemplateInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeOrganizationsAccess struct {
}

func (*awsAwsquery_serializeOpDescribeOrganizationsAccess) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeOrganizationsAccess) 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.(*DescribeOrganizationsAccessInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeOrganizationsAccess")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeOrganizationsAccessInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribePublisher struct {
}

func (*awsAwsquery_serializeOpDescribePublisher) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribePublisher) 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.(*DescribePublisherInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribePublisher")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribePublisherInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeResourceScan struct {
}

func (*awsAwsquery_serializeOpDescribeResourceScan) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeResourceScan) 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.(*DescribeResourceScanInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeResourceScan")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeResourceScanInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackDriftDetectionStatus struct {
}

func (*awsAwsquery_serializeOpDescribeStackDriftDetectionStatus) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackDriftDetectionStatus) 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.(*DescribeStackDriftDetectionStatusInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackDriftDetectionStatus")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackDriftDetectionStatusInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackEvents struct {
}

func (*awsAwsquery_serializeOpDescribeStackEvents) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackEvents) 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.(*DescribeStackEventsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackEvents")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackEventsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackInstance struct {
}

func (*awsAwsquery_serializeOpDescribeStackInstance) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackInstance) 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.(*DescribeStackInstanceInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackInstance")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackInstanceInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackResource struct {
}

func (*awsAwsquery_serializeOpDescribeStackResource) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackResource) 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.(*DescribeStackResourceInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackResource")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackResourceInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackResourceDrifts struct {
}

func (*awsAwsquery_serializeOpDescribeStackResourceDrifts) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackResourceDrifts) 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.(*DescribeStackResourceDriftsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackResourceDrifts")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackResourceDriftsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackResources struct {
}

func (*awsAwsquery_serializeOpDescribeStackResources) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackResources) 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.(*DescribeStackResourcesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackResources")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackResourcesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStacks struct {
}

func (*awsAwsquery_serializeOpDescribeStacks) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStacks) 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.(*DescribeStacksInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStacks")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStacksInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackSet struct {
}

func (*awsAwsquery_serializeOpDescribeStackSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackSet) 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.(*DescribeStackSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeStackSetOperation struct {
}

func (*awsAwsquery_serializeOpDescribeStackSetOperation) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeStackSetOperation) 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.(*DescribeStackSetOperationInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeStackSetOperation")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeStackSetOperationInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeType struct {
}

func (*awsAwsquery_serializeOpDescribeType) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeType) 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.(*DescribeTypeInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeType")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeTypeInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDescribeTypeRegistration struct {
}

func (*awsAwsquery_serializeOpDescribeTypeRegistration) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDescribeTypeRegistration) 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.(*DescribeTypeRegistrationInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DescribeTypeRegistration")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDescribeTypeRegistrationInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDetectStackDrift struct {
}

func (*awsAwsquery_serializeOpDetectStackDrift) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDetectStackDrift) 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.(*DetectStackDriftInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DetectStackDrift")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDetectStackDriftInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDetectStackResourceDrift struct {
}

func (*awsAwsquery_serializeOpDetectStackResourceDrift) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDetectStackResourceDrift) 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.(*DetectStackResourceDriftInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DetectStackResourceDrift")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDetectStackResourceDriftInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpDetectStackSetDrift struct {
}

func (*awsAwsquery_serializeOpDetectStackSetDrift) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpDetectStackSetDrift) 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.(*DetectStackSetDriftInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("DetectStackSetDrift")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentDetectStackSetDriftInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpEstimateTemplateCost struct {
}

func (*awsAwsquery_serializeOpEstimateTemplateCost) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpEstimateTemplateCost) 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.(*EstimateTemplateCostInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("EstimateTemplateCost")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentEstimateTemplateCostInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpExecuteChangeSet struct {
}

func (*awsAwsquery_serializeOpExecuteChangeSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpExecuteChangeSet) 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.(*ExecuteChangeSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ExecuteChangeSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentExecuteChangeSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpGetGeneratedTemplate struct {
}

func (*awsAwsquery_serializeOpGetGeneratedTemplate) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpGetGeneratedTemplate) 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.(*GetGeneratedTemplateInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("GetGeneratedTemplate")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentGetGeneratedTemplateInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpGetStackPolicy struct {
}

func (*awsAwsquery_serializeOpGetStackPolicy) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpGetStackPolicy) 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.(*GetStackPolicyInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("GetStackPolicy")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentGetStackPolicyInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpGetTemplate struct {
}

func (*awsAwsquery_serializeOpGetTemplate) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpGetTemplate) 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.(*GetTemplateInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("GetTemplate")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentGetTemplateInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpGetTemplateSummary struct {
}

func (*awsAwsquery_serializeOpGetTemplateSummary) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpGetTemplateSummary) 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.(*GetTemplateSummaryInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("GetTemplateSummary")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentGetTemplateSummaryInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpImportStacksToStackSet struct {
}

func (*awsAwsquery_serializeOpImportStacksToStackSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpImportStacksToStackSet) 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.(*ImportStacksToStackSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ImportStacksToStackSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentImportStacksToStackSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListChangeSets struct {
}

func (*awsAwsquery_serializeOpListChangeSets) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListChangeSets) 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.(*ListChangeSetsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListChangeSets")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListChangeSetsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListExports struct {
}

func (*awsAwsquery_serializeOpListExports) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListExports) 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.(*ListExportsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListExports")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListExportsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListGeneratedTemplates struct {
}

func (*awsAwsquery_serializeOpListGeneratedTemplates) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListGeneratedTemplates) 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.(*ListGeneratedTemplatesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListGeneratedTemplates")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListGeneratedTemplatesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListImports struct {
}

func (*awsAwsquery_serializeOpListImports) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListImports) 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.(*ListImportsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListImports")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListImportsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListResourceScanRelatedResources struct {
}

func (*awsAwsquery_serializeOpListResourceScanRelatedResources) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListResourceScanRelatedResources) 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.(*ListResourceScanRelatedResourcesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListResourceScanRelatedResources")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListResourceScanRelatedResourcesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListResourceScanResources struct {
}

func (*awsAwsquery_serializeOpListResourceScanResources) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListResourceScanResources) 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.(*ListResourceScanResourcesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListResourceScanResources")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListResourceScanResourcesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListResourceScans struct {
}

func (*awsAwsquery_serializeOpListResourceScans) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListResourceScans) 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.(*ListResourceScansInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListResourceScans")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListResourceScansInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStackInstanceResourceDrifts struct {
}

func (*awsAwsquery_serializeOpListStackInstanceResourceDrifts) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStackInstanceResourceDrifts) 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.(*ListStackInstanceResourceDriftsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStackInstanceResourceDrifts")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStackInstanceResourceDriftsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStackInstances struct {
}

func (*awsAwsquery_serializeOpListStackInstances) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStackInstances) 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.(*ListStackInstancesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStackInstances")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStackInstancesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStackResources struct {
}

func (*awsAwsquery_serializeOpListStackResources) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStackResources) 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.(*ListStackResourcesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStackResources")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStackResourcesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStacks struct {
}

func (*awsAwsquery_serializeOpListStacks) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStacks) 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.(*ListStacksInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStacks")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStacksInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStackSetAutoDeploymentTargets struct {
}

func (*awsAwsquery_serializeOpListStackSetAutoDeploymentTargets) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStackSetAutoDeploymentTargets) 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.(*ListStackSetAutoDeploymentTargetsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStackSetAutoDeploymentTargets")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStackSetAutoDeploymentTargetsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStackSetOperationResults struct {
}

func (*awsAwsquery_serializeOpListStackSetOperationResults) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStackSetOperationResults) 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.(*ListStackSetOperationResultsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStackSetOperationResults")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStackSetOperationResultsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStackSetOperations struct {
}

func (*awsAwsquery_serializeOpListStackSetOperations) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStackSetOperations) 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.(*ListStackSetOperationsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStackSetOperations")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStackSetOperationsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListStackSets struct {
}

func (*awsAwsquery_serializeOpListStackSets) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListStackSets) 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.(*ListStackSetsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListStackSets")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListStackSetsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListTypeRegistrations struct {
}

func (*awsAwsquery_serializeOpListTypeRegistrations) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListTypeRegistrations) 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.(*ListTypeRegistrationsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListTypeRegistrations")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListTypeRegistrationsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListTypes struct {
}

func (*awsAwsquery_serializeOpListTypes) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListTypes) 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.(*ListTypesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListTypes")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListTypesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpListTypeVersions struct {
}

func (*awsAwsquery_serializeOpListTypeVersions) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpListTypeVersions) 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.(*ListTypeVersionsInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ListTypeVersions")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentListTypeVersionsInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpPublishType struct {
}

func (*awsAwsquery_serializeOpPublishType) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpPublishType) 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.(*PublishTypeInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("PublishType")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentPublishTypeInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRecordHandlerProgress struct {
}

func (*awsAwsquery_serializeOpRecordHandlerProgress) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpRecordHandlerProgress) 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.(*RecordHandlerProgressInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RecordHandlerProgress")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentRecordHandlerProgressInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRegisterPublisher struct {
}

func (*awsAwsquery_serializeOpRegisterPublisher) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpRegisterPublisher) 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.(*RegisterPublisherInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RegisterPublisher")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentRegisterPublisherInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRegisterType struct {
}

func (*awsAwsquery_serializeOpRegisterType) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpRegisterType) 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.(*RegisterTypeInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RegisterType")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentRegisterTypeInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpRollbackStack struct {
}

func (*awsAwsquery_serializeOpRollbackStack) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpRollbackStack) 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.(*RollbackStackInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("RollbackStack")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentRollbackStackInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpSetStackPolicy struct {
}

func (*awsAwsquery_serializeOpSetStackPolicy) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpSetStackPolicy) 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.(*SetStackPolicyInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("SetStackPolicy")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentSetStackPolicyInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpSetTypeConfiguration struct {
}

func (*awsAwsquery_serializeOpSetTypeConfiguration) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpSetTypeConfiguration) 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.(*SetTypeConfigurationInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("SetTypeConfiguration")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentSetTypeConfigurationInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpSetTypeDefaultVersion struct {
}

func (*awsAwsquery_serializeOpSetTypeDefaultVersion) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpSetTypeDefaultVersion) 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.(*SetTypeDefaultVersionInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("SetTypeDefaultVersion")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentSetTypeDefaultVersionInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpSignalResource struct {
}

func (*awsAwsquery_serializeOpSignalResource) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpSignalResource) 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.(*SignalResourceInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("SignalResource")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentSignalResourceInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpStartResourceScan struct {
}

func (*awsAwsquery_serializeOpStartResourceScan) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpStartResourceScan) 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.(*StartResourceScanInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("StartResourceScan")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentStartResourceScanInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpStopStackSetOperation struct {
}

func (*awsAwsquery_serializeOpStopStackSetOperation) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpStopStackSetOperation) 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.(*StopStackSetOperationInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("StopStackSetOperation")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentStopStackSetOperationInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpTestType struct {
}

func (*awsAwsquery_serializeOpTestType) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpTestType) 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.(*TestTypeInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("TestType")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentTestTypeInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpUpdateGeneratedTemplate struct {
}

func (*awsAwsquery_serializeOpUpdateGeneratedTemplate) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpUpdateGeneratedTemplate) 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.(*UpdateGeneratedTemplateInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("UpdateGeneratedTemplate")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentUpdateGeneratedTemplateInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpUpdateStack struct {
}

func (*awsAwsquery_serializeOpUpdateStack) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpUpdateStack) 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.(*UpdateStackInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("UpdateStack")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentUpdateStackInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpUpdateStackInstances struct {
}

func (*awsAwsquery_serializeOpUpdateStackInstances) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpUpdateStackInstances) 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.(*UpdateStackInstancesInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("UpdateStackInstances")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentUpdateStackInstancesInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpUpdateStackSet struct {
}

func (*awsAwsquery_serializeOpUpdateStackSet) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpUpdateStackSet) 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.(*UpdateStackSetInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("UpdateStackSet")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentUpdateStackSetInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpUpdateTerminationProtection struct {
}

func (*awsAwsquery_serializeOpUpdateTerminationProtection) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpUpdateTerminationProtection) 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.(*UpdateTerminationProtectionInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("UpdateTerminationProtection")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentUpdateTerminationProtectionInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}

type awsAwsquery_serializeOpValidateTemplate struct {
}

func (*awsAwsquery_serializeOpValidateTemplate) ID() string {
	return "OperationSerializer"
}

func (m *awsAwsquery_serializeOpValidateTemplate) 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.(*ValidateTemplateInput)
	_ = input
	if !ok {
		return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)}
	}

	operationPath := "/"
	if len(request.Request.URL.Path) == 0 {
		request.Request.URL.Path = operationPath
	} else {
		request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath)
		if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' {
			request.Request.URL.Path += "/"
		}
	}
	request.Request.Method = "POST"
	httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header)
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded")

	bodyWriter := bytes.NewBuffer(nil)
	bodyEncoder := query.NewEncoder(bodyWriter)
	body := bodyEncoder.Object()
	body.Key("Action").String("ValidateTemplate")
	body.Key("Version").String("2010-05-15")

	if err := awsAwsquery_serializeOpDocumentValidateTemplateInput(input, bodyEncoder.Value); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	err = bodyEncoder.Encode()
	if err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}

	if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil {
		return out, metadata, &smithy.SerializationError{Err: err}
	}
	in.Request = request

	return next.HandleSerialize(ctx, in)
}
func awsAwsquery_serializeDocumentAccountList(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentAutoDeployment(v *types.AutoDeployment, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Enabled != nil {
		objectKey := object.Key("Enabled")
		objectKey.Boolean(*v.Enabled)
	}

	if v.RetainStacksOnAccountRemoval != nil {
		objectKey := object.Key("RetainStacksOnAccountRemoval")
		objectKey.Boolean(*v.RetainStacksOnAccountRemoval)
	}

	return nil
}

func awsAwsquery_serializeDocumentCapabilities(v []types.Capability, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsAwsquery_serializeDocumentDeploymentTargets(v *types.DeploymentTargets, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.AccountFilterType) > 0 {
		objectKey := object.Key("AccountFilterType")
		objectKey.String(string(v.AccountFilterType))
	}

	if v.Accounts != nil {
		objectKey := object.Key("Accounts")
		if err := awsAwsquery_serializeDocumentAccountList(v.Accounts, objectKey); err != nil {
			return err
		}
	}

	if v.AccountsUrl != nil {
		objectKey := object.Key("AccountsUrl")
		objectKey.String(*v.AccountsUrl)
	}

	if v.OrganizationalUnitIds != nil {
		objectKey := object.Key("OrganizationalUnitIds")
		if err := awsAwsquery_serializeDocumentOrganizationalUnitIdList(v.OrganizationalUnitIds, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeDocumentJazzLogicalResourceIds(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentJazzResourceIdentifierProperties(v map[string]string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	object := value.Map("key", "value")

	keys := make([]string, 0, len(v))
	for key := range v {
		keys = append(keys, key)
	}
	sort.Strings(keys)

	for _, key := range keys {
		om := object.Key(key)
		om.String(v[key])
	}
	return nil
}

func awsAwsquery_serializeDocumentLoggingConfig(v *types.LoggingConfig, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogGroupName != nil {
		objectKey := object.Key("LogGroupName")
		objectKey.String(*v.LogGroupName)
	}

	if v.LogRoleArn != nil {
		objectKey := object.Key("LogRoleArn")
		objectKey.String(*v.LogRoleArn)
	}

	return nil
}

func awsAwsquery_serializeDocumentLogicalResourceIds(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentManagedExecution(v *types.ManagedExecution, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Active != nil {
		objectKey := object.Key("Active")
		objectKey.Boolean(*v.Active)
	}

	return nil
}

func awsAwsquery_serializeDocumentNotificationARNs(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentOperationResultFilter(v *types.OperationResultFilter, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Name) > 0 {
		objectKey := object.Key("Name")
		objectKey.String(string(v.Name))
	}

	if v.Values != nil {
		objectKey := object.Key("Values")
		objectKey.String(*v.Values)
	}

	return nil
}

func awsAwsquery_serializeDocumentOperationResultFilters(v []types.OperationResultFilter, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentOperationResultFilter(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentOrganizationalUnitIdList(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentParameter(v *types.Parameter, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ParameterKey != nil {
		objectKey := object.Key("ParameterKey")
		objectKey.String(*v.ParameterKey)
	}

	if v.ParameterValue != nil {
		objectKey := object.Key("ParameterValue")
		objectKey.String(*v.ParameterValue)
	}

	if v.ResolvedValue != nil {
		objectKey := object.Key("ResolvedValue")
		objectKey.String(*v.ResolvedValue)
	}

	if v.UsePreviousValue != nil {
		objectKey := object.Key("UsePreviousValue")
		objectKey.Boolean(*v.UsePreviousValue)
	}

	return nil
}

func awsAwsquery_serializeDocumentParameters(v []types.Parameter, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentParameter(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentRegionList(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentResourceDefinition(v *types.ResourceDefinition, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogicalResourceId != nil {
		objectKey := object.Key("LogicalResourceId")
		objectKey.String(*v.LogicalResourceId)
	}

	if v.ResourceIdentifier != nil {
		objectKey := object.Key("ResourceIdentifier")
		if err := awsAwsquery_serializeDocumentResourceIdentifierProperties(v.ResourceIdentifier, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceType != nil {
		objectKey := object.Key("ResourceType")
		objectKey.String(*v.ResourceType)
	}

	return nil
}

func awsAwsquery_serializeDocumentResourceDefinitions(v []types.ResourceDefinition, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentResourceDefinition(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentResourceIdentifierProperties(v map[string]string, value query.Value) error {
	if len(v) == 0 {
		return nil
	}
	object := value.Map("key", "value")

	keys := make([]string, 0, len(v))
	for key := range v {
		keys = append(keys, key)
	}
	sort.Strings(keys)

	for _, key := range keys {
		om := object.Key(key)
		om.String(v[key])
	}
	return nil
}

func awsAwsquery_serializeDocumentResourcesToImport(v []types.ResourceToImport, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentResourceToImport(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentResourcesToSkip(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentResourceToImport(v *types.ResourceToImport, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogicalResourceId != nil {
		objectKey := object.Key("LogicalResourceId")
		objectKey.String(*v.LogicalResourceId)
	}

	if v.ResourceIdentifier != nil {
		objectKey := object.Key("ResourceIdentifier")
		if err := awsAwsquery_serializeDocumentResourceIdentifierProperties(v.ResourceIdentifier, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceType != nil {
		objectKey := object.Key("ResourceType")
		objectKey.String(*v.ResourceType)
	}

	return nil
}

func awsAwsquery_serializeDocumentResourceTypes(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentRetainResources(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentRollbackConfiguration(v *types.RollbackConfiguration, value query.Value) error {
	object := value.Object()
	_ = object

	if v.MonitoringTimeInMinutes != nil {
		objectKey := object.Key("MonitoringTimeInMinutes")
		objectKey.Integer(*v.MonitoringTimeInMinutes)
	}

	if v.RollbackTriggers != nil {
		objectKey := object.Key("RollbackTriggers")
		if err := awsAwsquery_serializeDocumentRollbackTriggers(v.RollbackTriggers, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeDocumentRollbackTrigger(v *types.RollbackTrigger, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if v.Type != nil {
		objectKey := object.Key("Type")
		objectKey.String(*v.Type)
	}

	return nil
}

func awsAwsquery_serializeDocumentRollbackTriggers(v []types.RollbackTrigger, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentRollbackTrigger(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentScannedResourceIdentifier(v *types.ScannedResourceIdentifier, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ResourceIdentifier != nil {
		objectKey := object.Key("ResourceIdentifier")
		if err := awsAwsquery_serializeDocumentJazzResourceIdentifierProperties(v.ResourceIdentifier, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceType != nil {
		objectKey := object.Key("ResourceType")
		objectKey.String(*v.ResourceType)
	}

	return nil
}

func awsAwsquery_serializeDocumentScannedResourceIdentifiers(v []types.ScannedResourceIdentifier, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentScannedResourceIdentifier(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentStackIdList(v []string, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(v[i])
	}
	return nil
}

func awsAwsquery_serializeDocumentStackInstanceFilter(v *types.StackInstanceFilter, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Name) > 0 {
		objectKey := object.Key("Name")
		objectKey.String(string(v.Name))
	}

	if v.Values != nil {
		objectKey := object.Key("Values")
		objectKey.String(*v.Values)
	}

	return nil
}

func awsAwsquery_serializeDocumentStackInstanceFilters(v []types.StackInstanceFilter, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentStackInstanceFilter(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentStackResourceDriftStatusFilters(v []types.StackResourceDriftStatus, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsAwsquery_serializeDocumentStackSetOperationPreferences(v *types.StackSetOperationPreferences, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.ConcurrencyMode) > 0 {
		objectKey := object.Key("ConcurrencyMode")
		objectKey.String(string(v.ConcurrencyMode))
	}

	if v.FailureToleranceCount != nil {
		objectKey := object.Key("FailureToleranceCount")
		objectKey.Integer(*v.FailureToleranceCount)
	}

	if v.FailureTolerancePercentage != nil {
		objectKey := object.Key("FailureTolerancePercentage")
		objectKey.Integer(*v.FailureTolerancePercentage)
	}

	if v.MaxConcurrentCount != nil {
		objectKey := object.Key("MaxConcurrentCount")
		objectKey.Integer(*v.MaxConcurrentCount)
	}

	if v.MaxConcurrentPercentage != nil {
		objectKey := object.Key("MaxConcurrentPercentage")
		objectKey.Integer(*v.MaxConcurrentPercentage)
	}

	if len(v.RegionConcurrencyType) > 0 {
		objectKey := object.Key("RegionConcurrencyType")
		objectKey.String(string(v.RegionConcurrencyType))
	}

	if v.RegionOrder != nil {
		objectKey := object.Key("RegionOrder")
		if err := awsAwsquery_serializeDocumentRegionList(v.RegionOrder, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeDocumentStackStatusFilter(v []types.StackStatus, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		av.String(string(v[i]))
	}
	return nil
}

func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Key != nil {
		objectKey := object.Key("Key")
		objectKey.String(*v.Key)
	}

	if v.Value != nil {
		objectKey := object.Key("Value")
		objectKey.String(*v.Value)
	}

	return nil
}

func awsAwsquery_serializeDocumentTags(v []types.Tag, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentTemplateConfiguration(v *types.TemplateConfiguration, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.DeletionPolicy) > 0 {
		objectKey := object.Key("DeletionPolicy")
		objectKey.String(string(v.DeletionPolicy))
	}

	if len(v.UpdateReplacePolicy) > 0 {
		objectKey := object.Key("UpdateReplacePolicy")
		objectKey.String(string(v.UpdateReplacePolicy))
	}

	return nil
}

func awsAwsquery_serializeDocumentTemplateSummaryConfig(v *types.TemplateSummaryConfig, value query.Value) error {
	object := value.Object()
	_ = object

	if v.TreatUnrecognizedResourceTypesAsWarnings != nil {
		objectKey := object.Key("TreatUnrecognizedResourceTypesAsWarnings")
		objectKey.Boolean(*v.TreatUnrecognizedResourceTypesAsWarnings)
	}

	return nil
}

func awsAwsquery_serializeDocumentTypeConfigurationIdentifier(v *types.TypeConfigurationIdentifier, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeArn != nil {
		objectKey := object.Key("TypeArn")
		objectKey.String(*v.TypeArn)
	}

	if v.TypeConfigurationAlias != nil {
		objectKey := object.Key("TypeConfigurationAlias")
		objectKey.String(*v.TypeConfigurationAlias)
	}

	if v.TypeConfigurationArn != nil {
		objectKey := object.Key("TypeConfigurationArn")
		objectKey.String(*v.TypeConfigurationArn)
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	return nil
}

func awsAwsquery_serializeDocumentTypeConfigurationIdentifiers(v []types.TypeConfigurationIdentifier, value query.Value) error {
	array := value.Array("member")

	for i := range v {
		av := array.Value()
		if err := awsAwsquery_serializeDocumentTypeConfigurationIdentifier(&v[i], av); err != nil {
			return err
		}
	}
	return nil
}

func awsAwsquery_serializeDocumentTypeFilters(v *types.TypeFilters, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Category) > 0 {
		objectKey := object.Key("Category")
		objectKey.String(string(v.Category))
	}

	if v.PublisherId != nil {
		objectKey := object.Key("PublisherId")
		objectKey.String(*v.PublisherId)
	}

	if v.TypeNamePrefix != nil {
		objectKey := object.Key("TypeNamePrefix")
		objectKey.String(*v.TypeNamePrefix)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentActivateOrganizationsAccessInput(v *ActivateOrganizationsAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	return nil
}

func awsAwsquery_serializeOpDocumentActivateTypeInput(v *ActivateTypeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AutoUpdate != nil {
		objectKey := object.Key("AutoUpdate")
		objectKey.Boolean(*v.AutoUpdate)
	}

	if v.ExecutionRoleArn != nil {
		objectKey := object.Key("ExecutionRoleArn")
		objectKey.String(*v.ExecutionRoleArn)
	}

	if v.LoggingConfig != nil {
		objectKey := object.Key("LoggingConfig")
		if err := awsAwsquery_serializeDocumentLoggingConfig(v.LoggingConfig, objectKey); err != nil {
			return err
		}
	}

	if v.MajorVersion != nil {
		objectKey := object.Key("MajorVersion")
		objectKey.Long(*v.MajorVersion)
	}

	if v.PublicTypeArn != nil {
		objectKey := object.Key("PublicTypeArn")
		objectKey.String(*v.PublicTypeArn)
	}

	if v.PublisherId != nil {
		objectKey := object.Key("PublisherId")
		objectKey.String(*v.PublisherId)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	if v.TypeNameAlias != nil {
		objectKey := object.Key("TypeNameAlias")
		objectKey.String(*v.TypeNameAlias)
	}

	if len(v.VersionBump) > 0 {
		objectKey := object.Key("VersionBump")
		objectKey.String(string(v.VersionBump))
	}

	return nil
}

func awsAwsquery_serializeOpDocumentBatchDescribeTypeConfigurationsInput(v *BatchDescribeTypeConfigurationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.TypeConfigurationIdentifiers != nil {
		objectKey := object.Key("TypeConfigurationIdentifiers")
		if err := awsAwsquery_serializeDocumentTypeConfigurationIdentifiers(v.TypeConfigurationIdentifiers, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentCancelUpdateStackInput(v *CancelUpdateStackInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentContinueUpdateRollbackInput(v *ContinueUpdateRollbackInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.ResourcesToSkip != nil {
		objectKey := object.Key("ResourcesToSkip")
		if err := awsAwsquery_serializeDocumentResourcesToSkip(v.ResourcesToSkip, objectKey); err != nil {
			return err
		}
	}

	if v.RoleARN != nil {
		objectKey := object.Key("RoleARN")
		objectKey.String(*v.RoleARN)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentCreateChangeSetInput(v *CreateChangeSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Capabilities != nil {
		objectKey := object.Key("Capabilities")
		if err := awsAwsquery_serializeDocumentCapabilities(v.Capabilities, objectKey); err != nil {
			return err
		}
	}

	if v.ChangeSetName != nil {
		objectKey := object.Key("ChangeSetName")
		objectKey.String(*v.ChangeSetName)
	}

	if len(v.ChangeSetType) > 0 {
		objectKey := object.Key("ChangeSetType")
		objectKey.String(string(v.ChangeSetType))
	}

	if v.ClientToken != nil {
		objectKey := object.Key("ClientToken")
		objectKey.String(*v.ClientToken)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.ImportExistingResources != nil {
		objectKey := object.Key("ImportExistingResources")
		objectKey.Boolean(*v.ImportExistingResources)
	}

	if v.IncludeNestedStacks != nil {
		objectKey := object.Key("IncludeNestedStacks")
		objectKey.Boolean(*v.IncludeNestedStacks)
	}

	if v.NotificationARNs != nil {
		objectKey := object.Key("NotificationARNs")
		if err := awsAwsquery_serializeDocumentNotificationARNs(v.NotificationARNs, objectKey); err != nil {
			return err
		}
	}

	if len(v.OnStackFailure) > 0 {
		objectKey := object.Key("OnStackFailure")
		objectKey.String(string(v.OnStackFailure))
	}

	if v.Parameters != nil {
		objectKey := object.Key("Parameters")
		if err := awsAwsquery_serializeDocumentParameters(v.Parameters, objectKey); err != nil {
			return err
		}
	}

	if v.ResourcesToImport != nil {
		objectKey := object.Key("ResourcesToImport")
		if err := awsAwsquery_serializeDocumentResourcesToImport(v.ResourcesToImport, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceTypes != nil {
		objectKey := object.Key("ResourceTypes")
		if err := awsAwsquery_serializeDocumentResourceTypes(v.ResourceTypes, objectKey); err != nil {
			return err
		}
	}

	if v.RoleARN != nil {
		objectKey := object.Key("RoleARN")
		objectKey.String(*v.RoleARN)
	}

	if v.RollbackConfiguration != nil {
		objectKey := object.Key("RollbackConfiguration")
		if err := awsAwsquery_serializeDocumentRollbackConfiguration(v.RollbackConfiguration, objectKey); err != nil {
			return err
		}
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if v.Tags != nil {
		objectKey := object.Key("Tags")
		if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	if v.UsePreviousTemplate != nil {
		objectKey := object.Key("UsePreviousTemplate")
		objectKey.Boolean(*v.UsePreviousTemplate)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentCreateGeneratedTemplateInput(v *CreateGeneratedTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.GeneratedTemplateName != nil {
		objectKey := object.Key("GeneratedTemplateName")
		objectKey.String(*v.GeneratedTemplateName)
	}

	if v.Resources != nil {
		objectKey := object.Key("Resources")
		if err := awsAwsquery_serializeDocumentResourceDefinitions(v.Resources, objectKey); err != nil {
			return err
		}
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if v.TemplateConfiguration != nil {
		objectKey := object.Key("TemplateConfiguration")
		if err := awsAwsquery_serializeDocumentTemplateConfiguration(v.TemplateConfiguration, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentCreateStackInput(v *CreateStackInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Capabilities != nil {
		objectKey := object.Key("Capabilities")
		if err := awsAwsquery_serializeDocumentCapabilities(v.Capabilities, objectKey); err != nil {
			return err
		}
	}

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.DisableRollback != nil {
		objectKey := object.Key("DisableRollback")
		objectKey.Boolean(*v.DisableRollback)
	}

	if v.EnableTerminationProtection != nil {
		objectKey := object.Key("EnableTerminationProtection")
		objectKey.Boolean(*v.EnableTerminationProtection)
	}

	if v.NotificationARNs != nil {
		objectKey := object.Key("NotificationARNs")
		if err := awsAwsquery_serializeDocumentNotificationARNs(v.NotificationARNs, objectKey); err != nil {
			return err
		}
	}

	if len(v.OnFailure) > 0 {
		objectKey := object.Key("OnFailure")
		objectKey.String(string(v.OnFailure))
	}

	if v.Parameters != nil {
		objectKey := object.Key("Parameters")
		if err := awsAwsquery_serializeDocumentParameters(v.Parameters, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceTypes != nil {
		objectKey := object.Key("ResourceTypes")
		if err := awsAwsquery_serializeDocumentResourceTypes(v.ResourceTypes, objectKey); err != nil {
			return err
		}
	}

	if v.RetainExceptOnCreate != nil {
		objectKey := object.Key("RetainExceptOnCreate")
		objectKey.Boolean(*v.RetainExceptOnCreate)
	}

	if v.RoleARN != nil {
		objectKey := object.Key("RoleARN")
		objectKey.String(*v.RoleARN)
	}

	if v.RollbackConfiguration != nil {
		objectKey := object.Key("RollbackConfiguration")
		if err := awsAwsquery_serializeDocumentRollbackConfiguration(v.RollbackConfiguration, objectKey); err != nil {
			return err
		}
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if v.StackPolicyBody != nil {
		objectKey := object.Key("StackPolicyBody")
		objectKey.String(*v.StackPolicyBody)
	}

	if v.StackPolicyURL != nil {
		objectKey := object.Key("StackPolicyURL")
		objectKey.String(*v.StackPolicyURL)
	}

	if v.Tags != nil {
		objectKey := object.Key("Tags")
		if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	if v.TimeoutInMinutes != nil {
		objectKey := object.Key("TimeoutInMinutes")
		objectKey.Integer(*v.TimeoutInMinutes)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentCreateStackInstancesInput(v *CreateStackInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Accounts != nil {
		objectKey := object.Key("Accounts")
		if err := awsAwsquery_serializeDocumentAccountList(v.Accounts, objectKey); err != nil {
			return err
		}
	}

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.DeploymentTargets != nil {
		objectKey := object.Key("DeploymentTargets")
		if err := awsAwsquery_serializeDocumentDeploymentTargets(v.DeploymentTargets, objectKey); err != nil {
			return err
		}
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.OperationPreferences != nil {
		objectKey := object.Key("OperationPreferences")
		if err := awsAwsquery_serializeDocumentStackSetOperationPreferences(v.OperationPreferences, objectKey); err != nil {
			return err
		}
	}

	if v.ParameterOverrides != nil {
		objectKey := object.Key("ParameterOverrides")
		if err := awsAwsquery_serializeDocumentParameters(v.ParameterOverrides, objectKey); err != nil {
			return err
		}
	}

	if v.Regions != nil {
		objectKey := object.Key("Regions")
		if err := awsAwsquery_serializeDocumentRegionList(v.Regions, objectKey); err != nil {
			return err
		}
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentCreateStackSetInput(v *CreateStackSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AdministrationRoleARN != nil {
		objectKey := object.Key("AdministrationRoleARN")
		objectKey.String(*v.AdministrationRoleARN)
	}

	if v.AutoDeployment != nil {
		objectKey := object.Key("AutoDeployment")
		if err := awsAwsquery_serializeDocumentAutoDeployment(v.AutoDeployment, objectKey); err != nil {
			return err
		}
	}

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.Capabilities != nil {
		objectKey := object.Key("Capabilities")
		if err := awsAwsquery_serializeDocumentCapabilities(v.Capabilities, objectKey); err != nil {
			return err
		}
	}

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.ExecutionRoleName != nil {
		objectKey := object.Key("ExecutionRoleName")
		objectKey.String(*v.ExecutionRoleName)
	}

	if v.ManagedExecution != nil {
		objectKey := object.Key("ManagedExecution")
		if err := awsAwsquery_serializeDocumentManagedExecution(v.ManagedExecution, objectKey); err != nil {
			return err
		}
	}

	if v.Parameters != nil {
		objectKey := object.Key("Parameters")
		if err := awsAwsquery_serializeDocumentParameters(v.Parameters, objectKey); err != nil {
			return err
		}
	}

	if len(v.PermissionModel) > 0 {
		objectKey := object.Key("PermissionModel")
		objectKey.String(string(v.PermissionModel))
	}

	if v.StackId != nil {
		objectKey := object.Key("StackId")
		objectKey.String(*v.StackId)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	if v.Tags != nil {
		objectKey := object.Key("Tags")
		if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDeactivateOrganizationsAccessInput(v *DeactivateOrganizationsAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	return nil
}

func awsAwsquery_serializeOpDocumentDeactivateTypeInput(v *DeactivateTypeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDeleteChangeSetInput(v *DeleteChangeSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ChangeSetName != nil {
		objectKey := object.Key("ChangeSetName")
		objectKey.String(*v.ChangeSetName)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDeleteGeneratedTemplateInput(v *DeleteGeneratedTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.GeneratedTemplateName != nil {
		objectKey := object.Key("GeneratedTemplateName")
		objectKey.String(*v.GeneratedTemplateName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDeleteStackInput(v *DeleteStackInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.RetainResources != nil {
		objectKey := object.Key("RetainResources")
		if err := awsAwsquery_serializeDocumentRetainResources(v.RetainResources, objectKey); err != nil {
			return err
		}
	}

	if v.RoleARN != nil {
		objectKey := object.Key("RoleARN")
		objectKey.String(*v.RoleARN)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDeleteStackInstancesInput(v *DeleteStackInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Accounts != nil {
		objectKey := object.Key("Accounts")
		if err := awsAwsquery_serializeDocumentAccountList(v.Accounts, objectKey); err != nil {
			return err
		}
	}

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.DeploymentTargets != nil {
		objectKey := object.Key("DeploymentTargets")
		if err := awsAwsquery_serializeDocumentDeploymentTargets(v.DeploymentTargets, objectKey); err != nil {
			return err
		}
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.OperationPreferences != nil {
		objectKey := object.Key("OperationPreferences")
		if err := awsAwsquery_serializeDocumentStackSetOperationPreferences(v.OperationPreferences, objectKey); err != nil {
			return err
		}
	}

	if v.Regions != nil {
		objectKey := object.Key("Regions")
		if err := awsAwsquery_serializeDocumentRegionList(v.Regions, objectKey); err != nil {
			return err
		}
	}

	if v.RetainStacks != nil {
		objectKey := object.Key("RetainStacks")
		objectKey.Boolean(*v.RetainStacks)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDeleteStackSetInput(v *DeleteStackSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDeregisterTypeInput(v *DeregisterTypeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	if v.VersionId != nil {
		objectKey := object.Key("VersionId")
		objectKey.String(*v.VersionId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeAccountLimitsInput(v *DescribeAccountLimitsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeChangeSetHooksInput(v *DescribeChangeSetHooksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ChangeSetName != nil {
		objectKey := object.Key("ChangeSetName")
		objectKey.String(*v.ChangeSetName)
	}

	if v.LogicalResourceId != nil {
		objectKey := object.Key("LogicalResourceId")
		objectKey.String(*v.LogicalResourceId)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeChangeSetInput(v *DescribeChangeSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ChangeSetName != nil {
		objectKey := object.Key("ChangeSetName")
		objectKey.String(*v.ChangeSetName)
	}

	if v.IncludePropertyValues != nil {
		objectKey := object.Key("IncludePropertyValues")
		objectKey.Boolean(*v.IncludePropertyValues)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeGeneratedTemplateInput(v *DescribeGeneratedTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.GeneratedTemplateName != nil {
		objectKey := object.Key("GeneratedTemplateName")
		objectKey.String(*v.GeneratedTemplateName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeOrganizationsAccessInput(v *DescribeOrganizationsAccessInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribePublisherInput(v *DescribePublisherInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.PublisherId != nil {
		objectKey := object.Key("PublisherId")
		objectKey.String(*v.PublisherId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeResourceScanInput(v *DescribeResourceScanInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ResourceScanId != nil {
		objectKey := object.Key("ResourceScanId")
		objectKey.String(*v.ResourceScanId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackDriftDetectionStatusInput(v *DescribeStackDriftDetectionStatusInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.StackDriftDetectionId != nil {
		objectKey := object.Key("StackDriftDetectionId")
		objectKey.String(*v.StackDriftDetectionId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackEventsInput(v *DescribeStackEventsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackInstanceInput(v *DescribeStackInstanceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.StackInstanceAccount != nil {
		objectKey := object.Key("StackInstanceAccount")
		objectKey.String(*v.StackInstanceAccount)
	}

	if v.StackInstanceRegion != nil {
		objectKey := object.Key("StackInstanceRegion")
		objectKey.String(*v.StackInstanceRegion)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackResourceDriftsInput(v *DescribeStackResourceDriftsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if v.StackResourceDriftStatusFilters != nil {
		objectKey := object.Key("StackResourceDriftStatusFilters")
		if err := awsAwsquery_serializeDocumentStackResourceDriftStatusFilters(v.StackResourceDriftStatusFilters, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackResourceInput(v *DescribeStackResourceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogicalResourceId != nil {
		objectKey := object.Key("LogicalResourceId")
		objectKey.String(*v.LogicalResourceId)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackResourcesInput(v *DescribeStackResourcesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogicalResourceId != nil {
		objectKey := object.Key("LogicalResourceId")
		objectKey.String(*v.LogicalResourceId)
	}

	if v.PhysicalResourceId != nil {
		objectKey := object.Key("PhysicalResourceId")
		objectKey.String(*v.PhysicalResourceId)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackSetInput(v *DescribeStackSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStackSetOperationInput(v *DescribeStackSetOperationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeStacksInput(v *DescribeStacksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeTypeInput(v *DescribeTypeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if v.PublicVersionNumber != nil {
		objectKey := object.Key("PublicVersionNumber")
		objectKey.String(*v.PublicVersionNumber)
	}

	if v.PublisherId != nil {
		objectKey := object.Key("PublisherId")
		objectKey.String(*v.PublisherId)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	if v.VersionId != nil {
		objectKey := object.Key("VersionId")
		objectKey.String(*v.VersionId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDescribeTypeRegistrationInput(v *DescribeTypeRegistrationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.RegistrationToken != nil {
		objectKey := object.Key("RegistrationToken")
		objectKey.String(*v.RegistrationToken)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDetectStackDriftInput(v *DetectStackDriftInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogicalResourceIds != nil {
		objectKey := object.Key("LogicalResourceIds")
		if err := awsAwsquery_serializeDocumentLogicalResourceIds(v.LogicalResourceIds, objectKey); err != nil {
			return err
		}
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDetectStackResourceDriftInput(v *DetectStackResourceDriftInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogicalResourceId != nil {
		objectKey := object.Key("LogicalResourceId")
		objectKey.String(*v.LogicalResourceId)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentDetectStackSetDriftInput(v *DetectStackSetDriftInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.OperationPreferences != nil {
		objectKey := object.Key("OperationPreferences")
		if err := awsAwsquery_serializeDocumentStackSetOperationPreferences(v.OperationPreferences, objectKey); err != nil {
			return err
		}
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentEstimateTemplateCostInput(v *EstimateTemplateCostInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Parameters != nil {
		objectKey := object.Key("Parameters")
		if err := awsAwsquery_serializeDocumentParameters(v.Parameters, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentExecuteChangeSetInput(v *ExecuteChangeSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ChangeSetName != nil {
		objectKey := object.Key("ChangeSetName")
		objectKey.String(*v.ChangeSetName)
	}

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.DisableRollback != nil {
		objectKey := object.Key("DisableRollback")
		objectKey.Boolean(*v.DisableRollback)
	}

	if v.RetainExceptOnCreate != nil {
		objectKey := object.Key("RetainExceptOnCreate")
		objectKey.Boolean(*v.RetainExceptOnCreate)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentGetGeneratedTemplateInput(v *GetGeneratedTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.Format) > 0 {
		objectKey := object.Key("Format")
		objectKey.String(string(v.Format))
	}

	if v.GeneratedTemplateName != nil {
		objectKey := object.Key("GeneratedTemplateName")
		objectKey.String(*v.GeneratedTemplateName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentGetStackPolicyInput(v *GetStackPolicyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentGetTemplateInput(v *GetTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ChangeSetName != nil {
		objectKey := object.Key("ChangeSetName")
		objectKey.String(*v.ChangeSetName)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if len(v.TemplateStage) > 0 {
		objectKey := object.Key("TemplateStage")
		objectKey.String(string(v.TemplateStage))
	}

	return nil
}

func awsAwsquery_serializeOpDocumentGetTemplateSummaryInput(v *GetTemplateSummaryInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateSummaryConfig != nil {
		objectKey := object.Key("TemplateSummaryConfig")
		if err := awsAwsquery_serializeDocumentTemplateSummaryConfig(v.TemplateSummaryConfig, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentImportStacksToStackSetInput(v *ImportStacksToStackSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.OperationPreferences != nil {
		objectKey := object.Key("OperationPreferences")
		if err := awsAwsquery_serializeDocumentStackSetOperationPreferences(v.OperationPreferences, objectKey); err != nil {
			return err
		}
	}

	if v.OrganizationalUnitIds != nil {
		objectKey := object.Key("OrganizationalUnitIds")
		if err := awsAwsquery_serializeDocumentOrganizationalUnitIdList(v.OrganizationalUnitIds, objectKey); err != nil {
			return err
		}
	}

	if v.StackIds != nil {
		objectKey := object.Key("StackIds")
		if err := awsAwsquery_serializeDocumentStackIdList(v.StackIds, objectKey); err != nil {
			return err
		}
	}

	if v.StackIdsUrl != nil {
		objectKey := object.Key("StackIdsUrl")
		objectKey.String(*v.StackIdsUrl)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListChangeSetsInput(v *ListChangeSetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListExportsInput(v *ListExportsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListGeneratedTemplatesInput(v *ListGeneratedTemplatesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListImportsInput(v *ListImportsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ExportName != nil {
		objectKey := object.Key("ExportName")
		objectKey.String(*v.ExportName)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListResourceScanRelatedResourcesInput(v *ListResourceScanRelatedResourcesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.Resources != nil {
		objectKey := object.Key("Resources")
		if err := awsAwsquery_serializeDocumentScannedResourceIdentifiers(v.Resources, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceScanId != nil {
		objectKey := object.Key("ResourceScanId")
		objectKey.String(*v.ResourceScanId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListResourceScanResourcesInput(v *ListResourceScanResourcesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.ResourceIdentifier != nil {
		objectKey := object.Key("ResourceIdentifier")
		objectKey.String(*v.ResourceIdentifier)
	}

	if v.ResourceScanId != nil {
		objectKey := object.Key("ResourceScanId")
		objectKey.String(*v.ResourceScanId)
	}

	if v.ResourceTypePrefix != nil {
		objectKey := object.Key("ResourceTypePrefix")
		objectKey.String(*v.ResourceTypePrefix)
	}

	if v.TagKey != nil {
		objectKey := object.Key("TagKey")
		objectKey.String(*v.TagKey)
	}

	if v.TagValue != nil {
		objectKey := object.Key("TagValue")
		objectKey.String(*v.TagValue)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListResourceScansInput(v *ListResourceScansInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStackInstanceResourceDriftsInput(v *ListStackInstanceResourceDriftsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.StackInstanceAccount != nil {
		objectKey := object.Key("StackInstanceAccount")
		objectKey.String(*v.StackInstanceAccount)
	}

	if v.StackInstanceRegion != nil {
		objectKey := object.Key("StackInstanceRegion")
		objectKey.String(*v.StackInstanceRegion)
	}

	if v.StackInstanceResourceDriftStatuses != nil {
		objectKey := object.Key("StackInstanceResourceDriftStatuses")
		if err := awsAwsquery_serializeDocumentStackResourceDriftStatusFilters(v.StackInstanceResourceDriftStatuses, objectKey); err != nil {
			return err
		}
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStackInstancesInput(v *ListStackInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.Filters != nil {
		objectKey := object.Key("Filters")
		if err := awsAwsquery_serializeDocumentStackInstanceFilters(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackInstanceAccount != nil {
		objectKey := object.Key("StackInstanceAccount")
		objectKey.String(*v.StackInstanceAccount)
	}

	if v.StackInstanceRegion != nil {
		objectKey := object.Key("StackInstanceRegion")
		objectKey.String(*v.StackInstanceRegion)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStackResourcesInput(v *ListStackResourcesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStackSetAutoDeploymentTargetsInput(v *ListStackSetAutoDeploymentTargetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStackSetOperationResultsInput(v *ListStackSetOperationResultsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.Filters != nil {
		objectKey := object.Key("Filters")
		if err := awsAwsquery_serializeDocumentOperationResultFilters(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStackSetOperationsInput(v *ListStackSetOperationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStackSetsInput(v *ListStackSetsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if len(v.Status) > 0 {
		objectKey := object.Key("Status")
		objectKey.String(string(v.Status))
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListStacksInput(v *ListStacksInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.StackStatusFilter != nil {
		objectKey := object.Key("StackStatusFilter")
		if err := awsAwsquery_serializeDocumentStackStatusFilter(v.StackStatusFilter, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListTypeRegistrationsInput(v *ListTypeRegistrationsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if len(v.RegistrationStatusFilter) > 0 {
		objectKey := object.Key("RegistrationStatusFilter")
		objectKey.String(string(v.RegistrationStatusFilter))
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeArn != nil {
		objectKey := object.Key("TypeArn")
		objectKey.String(*v.TypeArn)
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListTypesInput(v *ListTypesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.DeprecatedStatus) > 0 {
		objectKey := object.Key("DeprecatedStatus")
		objectKey.String(string(v.DeprecatedStatus))
	}

	if v.Filters != nil {
		objectKey := object.Key("Filters")
		if err := awsAwsquery_serializeDocumentTypeFilters(v.Filters, objectKey); err != nil {
			return err
		}
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if len(v.ProvisioningType) > 0 {
		objectKey := object.Key("ProvisioningType")
		objectKey.String(string(v.ProvisioningType))
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if len(v.Visibility) > 0 {
		objectKey := object.Key("Visibility")
		objectKey.String(string(v.Visibility))
	}

	return nil
}

func awsAwsquery_serializeOpDocumentListTypeVersionsInput(v *ListTypeVersionsInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if len(v.DeprecatedStatus) > 0 {
		objectKey := object.Key("DeprecatedStatus")
		objectKey.String(string(v.DeprecatedStatus))
	}

	if v.MaxResults != nil {
		objectKey := object.Key("MaxResults")
		objectKey.Integer(*v.MaxResults)
	}

	if v.NextToken != nil {
		objectKey := object.Key("NextToken")
		objectKey.String(*v.NextToken)
	}

	if v.PublisherId != nil {
		objectKey := object.Key("PublisherId")
		objectKey.String(*v.PublisherId)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentPublishTypeInput(v *PublishTypeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if v.PublicVersionNumber != nil {
		objectKey := object.Key("PublicVersionNumber")
		objectKey.String(*v.PublicVersionNumber)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRecordHandlerProgressInput(v *RecordHandlerProgressInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.BearerToken != nil {
		objectKey := object.Key("BearerToken")
		objectKey.String(*v.BearerToken)
	}

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if len(v.CurrentOperationStatus) > 0 {
		objectKey := object.Key("CurrentOperationStatus")
		objectKey.String(string(v.CurrentOperationStatus))
	}

	if len(v.ErrorCode) > 0 {
		objectKey := object.Key("ErrorCode")
		objectKey.String(string(v.ErrorCode))
	}

	if len(v.OperationStatus) > 0 {
		objectKey := object.Key("OperationStatus")
		objectKey.String(string(v.OperationStatus))
	}

	if v.ResourceModel != nil {
		objectKey := object.Key("ResourceModel")
		objectKey.String(*v.ResourceModel)
	}

	if v.StatusMessage != nil {
		objectKey := object.Key("StatusMessage")
		objectKey.String(*v.StatusMessage)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRegisterPublisherInput(v *RegisterPublisherInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AcceptTermsAndConditions != nil {
		objectKey := object.Key("AcceptTermsAndConditions")
		objectKey.Boolean(*v.AcceptTermsAndConditions)
	}

	if v.ConnectionArn != nil {
		objectKey := object.Key("ConnectionArn")
		objectKey.String(*v.ConnectionArn)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRegisterTypeInput(v *RegisterTypeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.ExecutionRoleArn != nil {
		objectKey := object.Key("ExecutionRoleArn")
		objectKey.String(*v.ExecutionRoleArn)
	}

	if v.LoggingConfig != nil {
		objectKey := object.Key("LoggingConfig")
		if err := awsAwsquery_serializeDocumentLoggingConfig(v.LoggingConfig, objectKey); err != nil {
			return err
		}
	}

	if v.SchemaHandlerPackage != nil {
		objectKey := object.Key("SchemaHandlerPackage")
		objectKey.String(*v.SchemaHandlerPackage)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentRollbackStackInput(v *RollbackStackInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.RetainExceptOnCreate != nil {
		objectKey := object.Key("RetainExceptOnCreate")
		objectKey.Boolean(*v.RetainExceptOnCreate)
	}

	if v.RoleARN != nil {
		objectKey := object.Key("RoleARN")
		objectKey.String(*v.RoleARN)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentSetStackPolicyInput(v *SetStackPolicyInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if v.StackPolicyBody != nil {
		objectKey := object.Key("StackPolicyBody")
		objectKey.String(*v.StackPolicyBody)
	}

	if v.StackPolicyURL != nil {
		objectKey := object.Key("StackPolicyURL")
		objectKey.String(*v.StackPolicyURL)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentSetTypeConfigurationInput(v *SetTypeConfigurationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Configuration != nil {
		objectKey := object.Key("Configuration")
		objectKey.String(*v.Configuration)
	}

	if v.ConfigurationAlias != nil {
		objectKey := object.Key("ConfigurationAlias")
		objectKey.String(*v.ConfigurationAlias)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeArn != nil {
		objectKey := object.Key("TypeArn")
		objectKey.String(*v.TypeArn)
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentSetTypeDefaultVersionInput(v *SetTypeDefaultVersionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	if v.VersionId != nil {
		objectKey := object.Key("VersionId")
		objectKey.String(*v.VersionId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentSignalResourceInput(v *SignalResourceInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.LogicalResourceId != nil {
		objectKey := object.Key("LogicalResourceId")
		objectKey.String(*v.LogicalResourceId)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if len(v.Status) > 0 {
		objectKey := object.Key("Status")
		objectKey.String(string(v.Status))
	}

	if v.UniqueId != nil {
		objectKey := object.Key("UniqueId")
		objectKey.String(*v.UniqueId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentStartResourceScanInput(v *StartResourceScanInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentStopStackSetOperationInput(v *StopStackSetOperationInput, value query.Value) error {
	object := value.Object()
	_ = object

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentTestTypeInput(v *TestTypeInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Arn != nil {
		objectKey := object.Key("Arn")
		objectKey.String(*v.Arn)
	}

	if v.LogDeliveryBucket != nil {
		objectKey := object.Key("LogDeliveryBucket")
		objectKey.String(*v.LogDeliveryBucket)
	}

	if len(v.Type) > 0 {
		objectKey := object.Key("Type")
		objectKey.String(string(v.Type))
	}

	if v.TypeName != nil {
		objectKey := object.Key("TypeName")
		objectKey.String(*v.TypeName)
	}

	if v.VersionId != nil {
		objectKey := object.Key("VersionId")
		objectKey.String(*v.VersionId)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentUpdateGeneratedTemplateInput(v *UpdateGeneratedTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.AddResources != nil {
		objectKey := object.Key("AddResources")
		if err := awsAwsquery_serializeDocumentResourceDefinitions(v.AddResources, objectKey); err != nil {
			return err
		}
	}

	if v.GeneratedTemplateName != nil {
		objectKey := object.Key("GeneratedTemplateName")
		objectKey.String(*v.GeneratedTemplateName)
	}

	if v.NewGeneratedTemplateName != nil {
		objectKey := object.Key("NewGeneratedTemplateName")
		objectKey.String(*v.NewGeneratedTemplateName)
	}

	if v.RefreshAllResources != nil {
		objectKey := object.Key("RefreshAllResources")
		objectKey.Boolean(*v.RefreshAllResources)
	}

	if v.RemoveResources != nil {
		objectKey := object.Key("RemoveResources")
		if err := awsAwsquery_serializeDocumentJazzLogicalResourceIds(v.RemoveResources, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateConfiguration != nil {
		objectKey := object.Key("TemplateConfiguration")
		if err := awsAwsquery_serializeDocumentTemplateConfiguration(v.TemplateConfiguration, objectKey); err != nil {
			return err
		}
	}

	return nil
}

func awsAwsquery_serializeOpDocumentUpdateStackInput(v *UpdateStackInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Capabilities != nil {
		objectKey := object.Key("Capabilities")
		if err := awsAwsquery_serializeDocumentCapabilities(v.Capabilities, objectKey); err != nil {
			return err
		}
	}

	if v.ClientRequestToken != nil {
		objectKey := object.Key("ClientRequestToken")
		objectKey.String(*v.ClientRequestToken)
	}

	if v.DisableRollback != nil {
		objectKey := object.Key("DisableRollback")
		objectKey.Boolean(*v.DisableRollback)
	}

	if v.NotificationARNs != nil {
		objectKey := object.Key("NotificationARNs")
		if err := awsAwsquery_serializeDocumentNotificationARNs(v.NotificationARNs, objectKey); err != nil {
			return err
		}
	}

	if v.Parameters != nil {
		objectKey := object.Key("Parameters")
		if err := awsAwsquery_serializeDocumentParameters(v.Parameters, objectKey); err != nil {
			return err
		}
	}

	if v.ResourceTypes != nil {
		objectKey := object.Key("ResourceTypes")
		if err := awsAwsquery_serializeDocumentResourceTypes(v.ResourceTypes, objectKey); err != nil {
			return err
		}
	}

	if v.RetainExceptOnCreate != nil {
		objectKey := object.Key("RetainExceptOnCreate")
		objectKey.Boolean(*v.RetainExceptOnCreate)
	}

	if v.RoleARN != nil {
		objectKey := object.Key("RoleARN")
		objectKey.String(*v.RoleARN)
	}

	if v.RollbackConfiguration != nil {
		objectKey := object.Key("RollbackConfiguration")
		if err := awsAwsquery_serializeDocumentRollbackConfiguration(v.RollbackConfiguration, objectKey); err != nil {
			return err
		}
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	if v.StackPolicyBody != nil {
		objectKey := object.Key("StackPolicyBody")
		objectKey.String(*v.StackPolicyBody)
	}

	if v.StackPolicyDuringUpdateBody != nil {
		objectKey := object.Key("StackPolicyDuringUpdateBody")
		objectKey.String(*v.StackPolicyDuringUpdateBody)
	}

	if v.StackPolicyDuringUpdateURL != nil {
		objectKey := object.Key("StackPolicyDuringUpdateURL")
		objectKey.String(*v.StackPolicyDuringUpdateURL)
	}

	if v.StackPolicyURL != nil {
		objectKey := object.Key("StackPolicyURL")
		objectKey.String(*v.StackPolicyURL)
	}

	if v.Tags != nil {
		objectKey := object.Key("Tags")
		if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	if v.UsePreviousTemplate != nil {
		objectKey := object.Key("UsePreviousTemplate")
		objectKey.Boolean(*v.UsePreviousTemplate)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentUpdateStackInstancesInput(v *UpdateStackInstancesInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Accounts != nil {
		objectKey := object.Key("Accounts")
		if err := awsAwsquery_serializeDocumentAccountList(v.Accounts, objectKey); err != nil {
			return err
		}
	}

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.DeploymentTargets != nil {
		objectKey := object.Key("DeploymentTargets")
		if err := awsAwsquery_serializeDocumentDeploymentTargets(v.DeploymentTargets, objectKey); err != nil {
			return err
		}
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.OperationPreferences != nil {
		objectKey := object.Key("OperationPreferences")
		if err := awsAwsquery_serializeDocumentStackSetOperationPreferences(v.OperationPreferences, objectKey); err != nil {
			return err
		}
	}

	if v.ParameterOverrides != nil {
		objectKey := object.Key("ParameterOverrides")
		if err := awsAwsquery_serializeDocumentParameters(v.ParameterOverrides, objectKey); err != nil {
			return err
		}
	}

	if v.Regions != nil {
		objectKey := object.Key("Regions")
		if err := awsAwsquery_serializeDocumentRegionList(v.Regions, objectKey); err != nil {
			return err
		}
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentUpdateStackSetInput(v *UpdateStackSetInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.Accounts != nil {
		objectKey := object.Key("Accounts")
		if err := awsAwsquery_serializeDocumentAccountList(v.Accounts, objectKey); err != nil {
			return err
		}
	}

	if v.AdministrationRoleARN != nil {
		objectKey := object.Key("AdministrationRoleARN")
		objectKey.String(*v.AdministrationRoleARN)
	}

	if v.AutoDeployment != nil {
		objectKey := object.Key("AutoDeployment")
		if err := awsAwsquery_serializeDocumentAutoDeployment(v.AutoDeployment, objectKey); err != nil {
			return err
		}
	}

	if len(v.CallAs) > 0 {
		objectKey := object.Key("CallAs")
		objectKey.String(string(v.CallAs))
	}

	if v.Capabilities != nil {
		objectKey := object.Key("Capabilities")
		if err := awsAwsquery_serializeDocumentCapabilities(v.Capabilities, objectKey); err != nil {
			return err
		}
	}

	if v.DeploymentTargets != nil {
		objectKey := object.Key("DeploymentTargets")
		if err := awsAwsquery_serializeDocumentDeploymentTargets(v.DeploymentTargets, objectKey); err != nil {
			return err
		}
	}

	if v.Description != nil {
		objectKey := object.Key("Description")
		objectKey.String(*v.Description)
	}

	if v.ExecutionRoleName != nil {
		objectKey := object.Key("ExecutionRoleName")
		objectKey.String(*v.ExecutionRoleName)
	}

	if v.ManagedExecution != nil {
		objectKey := object.Key("ManagedExecution")
		if err := awsAwsquery_serializeDocumentManagedExecution(v.ManagedExecution, objectKey); err != nil {
			return err
		}
	}

	if v.OperationId != nil {
		objectKey := object.Key("OperationId")
		objectKey.String(*v.OperationId)
	}

	if v.OperationPreferences != nil {
		objectKey := object.Key("OperationPreferences")
		if err := awsAwsquery_serializeDocumentStackSetOperationPreferences(v.OperationPreferences, objectKey); err != nil {
			return err
		}
	}

	if v.Parameters != nil {
		objectKey := object.Key("Parameters")
		if err := awsAwsquery_serializeDocumentParameters(v.Parameters, objectKey); err != nil {
			return err
		}
	}

	if len(v.PermissionModel) > 0 {
		objectKey := object.Key("PermissionModel")
		objectKey.String(string(v.PermissionModel))
	}

	if v.Regions != nil {
		objectKey := object.Key("Regions")
		if err := awsAwsquery_serializeDocumentRegionList(v.Regions, objectKey); err != nil {
			return err
		}
	}

	if v.StackSetName != nil {
		objectKey := object.Key("StackSetName")
		objectKey.String(*v.StackSetName)
	}

	if v.Tags != nil {
		objectKey := object.Key("Tags")
		if err := awsAwsquery_serializeDocumentTags(v.Tags, objectKey); err != nil {
			return err
		}
	}

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	if v.UsePreviousTemplate != nil {
		objectKey := object.Key("UsePreviousTemplate")
		objectKey.Boolean(*v.UsePreviousTemplate)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentUpdateTerminationProtectionInput(v *UpdateTerminationProtectionInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.EnableTerminationProtection != nil {
		objectKey := object.Key("EnableTerminationProtection")
		objectKey.Boolean(*v.EnableTerminationProtection)
	}

	if v.StackName != nil {
		objectKey := object.Key("StackName")
		objectKey.String(*v.StackName)
	}

	return nil
}

func awsAwsquery_serializeOpDocumentValidateTemplateInput(v *ValidateTemplateInput, value query.Value) error {
	object := value.Object()
	_ = object

	if v.TemplateBody != nil {
		objectKey := object.Key("TemplateBody")
		objectKey.String(*v.TemplateBody)
	}

	if v.TemplateURL != nil {
		objectKey := object.Key("TemplateURL")
		objectKey.String(*v.TemplateURL)
	}

	return nil
}
